├── .gitignore
├── API1
├── pom.xml
└── src
│ └── main
│ └── api
│ ├── api.raml
│ ├── documentation
│ ├── effort.md
│ └── history.md
│ ├── samples
│ ├── dessert-sample.Dessert.json
│ └── fruit-sample.Fruit.json
│ └── schemas
│ ├── Dessert.json
│ ├── Entity.json
│ └── Fruit.json
├── APIAddIn
├── APIAddIn.sln
├── APIAddIn
│ ├── APIAddIn.csproj
│ ├── APIAddinClass.cs
│ ├── APIManager.cs
│ ├── DataTypeManager.cs
│ ├── DependencyManager.cs
│ ├── DiagramManager.cs
│ ├── FileManager.cs
│ ├── Logger.cs
│ ├── MetaDataManager.cs
│ ├── ObjectManager.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── SampleManager.cs
│ ├── SchemaManager.cs
│ ├── ValidationErrors.cs
│ ├── WSDLManager.cs
│ ├── app.config
│ └── packages.config
├── APIAddInSetup
│ ├── APIAddInSetup.vdproj
│ ├── Debug
│ │ └── setup.exe
│ ├── Release
│ │ └── setup.exe
│ └── SparxEA_AddIn.reg
├── UnitTestProject1
│ ├── APIModels
│ │ └── APIModels.cs
│ ├── APITest.cs
│ ├── DependencyManagerTest.cs
│ ├── EAFacade
│ │ ├── EAAttribute.cs
│ │ ├── EACollection.cs
│ │ ├── EAConnector.cs
│ │ ├── EAConnectorEnd.cs
│ │ ├── EADiagram.cs
│ │ ├── EADiagramLink.cs
│ │ ├── EADiagramObject.cs
│ │ ├── EAElement.cs
│ │ ├── EAFactory.cs
│ │ ├── EAMetaModel.cs
│ │ ├── EAMethod.cs
│ │ ├── EAPackage.cs
│ │ ├── EAParameter.cs
│ │ ├── EARepository.cs
│ │ └── EATaggedValue.cs
│ ├── FileManagerTest.cs
│ ├── ObjectManagerTest.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ └── service.wsdl
│ ├── SampleManagerTests.cs
│ ├── SchemaManagerTest.cs
│ ├── UnitTestProject.csproj
│ ├── WSDLTest.cs
│ └── packages.config
├── UpgradeLog.htm
├── UpgradeLog2.htm
├── UpgradeLog3.htm
├── UpgradeLog4.htm
├── YamlDotNet
│ ├── Core
│ │ ├── AnchorNotFoundException.cs
│ │ ├── CharacterAnalyzer.cs
│ │ ├── Constants.cs
│ │ ├── Cursor.cs
│ │ ├── DuplicateAnchorException.cs
│ │ ├── Emitter.cs
│ │ ├── EmitterState.cs
│ │ ├── EventReader.cs
│ │ ├── Events
│ │ │ ├── AnchorAlias.cs
│ │ │ ├── Comment.cs
│ │ │ ├── DocumentEnd.cs
│ │ │ ├── DocumentStart.cs
│ │ │ ├── EventType.cs
│ │ │ ├── IParsingEventVisitor.cs
│ │ │ ├── MappingEnd.cs
│ │ │ ├── MappingStart.cs
│ │ │ ├── MappingStyle.cs
│ │ │ ├── NodeEvent.cs
│ │ │ ├── ParsingEvent.cs
│ │ │ ├── Scalar.cs
│ │ │ ├── SequenceEnd.cs
│ │ │ ├── SequenceStart.cs
│ │ │ ├── SequenceStyle.cs
│ │ │ ├── StreamEnd.cs
│ │ │ └── StreamStart.cs
│ │ ├── FakeList.cs
│ │ ├── ForwardAnchorNotSupportedException.cs
│ │ ├── HashCode.cs
│ │ ├── IEmitter.cs
│ │ ├── ILookAheadBuffer.cs
│ │ ├── IParser.cs
│ │ ├── IScanner.cs
│ │ ├── InsertionQueue.cs
│ │ ├── LookAheadBuffer.cs
│ │ ├── Mark.cs
│ │ ├── MergingParser.cs
│ │ ├── Parser.cs
│ │ ├── ParserState.cs
│ │ ├── ScalarStyle.cs
│ │ ├── Scanner.cs
│ │ ├── SemanticErrorException.cs
│ │ ├── SimpleKey.cs
│ │ ├── StringLookAheadBuffer.cs
│ │ ├── SyntaxErrorException.cs
│ │ ├── TagDirectiveCollection.cs
│ │ ├── Tokens
│ │ │ ├── Anchor.cs
│ │ │ ├── AnchorAlias.cs
│ │ │ ├── BlockEnd.cs
│ │ │ ├── BlockEntry.cs
│ │ │ ├── BlockMappingStart.cs
│ │ │ ├── BlockSequenceStart.cs
│ │ │ ├── Comment.cs
│ │ │ ├── DocumentEnd.cs
│ │ │ ├── DocumentStart.cs
│ │ │ ├── FlowEntry.cs
│ │ │ ├── FlowMappingEnd.cs
│ │ │ ├── FlowMappingStart.cs
│ │ │ ├── FlowSequenceEnd.cs
│ │ │ ├── FlowSequenceStart.cs
│ │ │ ├── Key.cs
│ │ │ ├── Scalar.cs
│ │ │ ├── StreamEnd.cs
│ │ │ ├── StreamStart.cs
│ │ │ ├── Tag.cs
│ │ │ ├── TagDirective.cs
│ │ │ ├── Token.cs
│ │ │ ├── Value.cs
│ │ │ └── VersionDirective.cs
│ │ ├── Version.cs
│ │ └── YamlException.cs
│ ├── Helpers
│ │ └── Portability.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── RepresentationModel
│ │ ├── DocumentLoadingState.cs
│ │ ├── EmitterState.cs
│ │ ├── IYamlVisitor.cs
│ │ ├── YamlAliasNode.cs
│ │ ├── YamlDocument.cs
│ │ ├── YamlMappingNode.cs
│ │ ├── YamlNode.cs
│ │ ├── YamlNodeIdentityEqualityComparer.cs
│ │ ├── YamlScalarNode.cs
│ │ ├── YamlSequenceNode.cs
│ │ ├── YamlStream.cs
│ │ └── YamlVisitor.cs
│ ├── Serialization
│ │ ├── Converters
│ │ │ └── GuidConverter.cs
│ │ ├── Deserializer.cs
│ │ ├── EventEmitters
│ │ │ ├── ChainedEventEmitter.cs
│ │ │ ├── JsonEventEmitter.cs
│ │ │ ├── TypeAssigningEventEmitter.cs
│ │ │ └── WriterEventEmitter.cs
│ │ ├── EventInfo.cs
│ │ ├── IAliasProvider.cs
│ │ ├── IEventEmitter.cs
│ │ ├── INamingConvention.cs
│ │ ├── INodeDeserializer.cs
│ │ ├── INodeTypeResolver.cs
│ │ ├── IObjectDescriptor.cs
│ │ ├── IObjectFactory.cs
│ │ ├── IObjectGraphTraversalStrategy.cs
│ │ ├── IObjectGraphVisitor.cs
│ │ ├── IPropertyDescriptor.cs
│ │ ├── ITypeInspector.cs
│ │ ├── ITypeResolver.cs
│ │ ├── IValueDeserializer.cs
│ │ ├── IValuePromise.cs
│ │ ├── IYamlSerializable.cs
│ │ ├── IYamlTypeConverter.cs
│ │ ├── NamingConventions
│ │ │ ├── CamelCaseNamingConvention.cs
│ │ │ ├── HyphenatedNamingConvention.cs
│ │ │ ├── NullNamingConvention.cs
│ │ │ ├── PascalCaseNamingConvention.cs
│ │ │ └── UnderscoredNamingConvention.cs
│ │ ├── NodeDeserializers
│ │ │ ├── ArrayNodeDeserializer.cs
│ │ │ ├── EnumerableNodeDeserializer.cs
│ │ │ ├── GenericCollectionNodeDeserializer.cs
│ │ │ ├── GenericDictionaryNodeDeserializer.cs
│ │ │ ├── NonGenericDictionaryNodeDeserializer.cs
│ │ │ ├── NonGenericListNodeDeserializer.cs
│ │ │ ├── NullNodeDeserializer.cs
│ │ │ ├── ObjectNodeDeserializer.cs
│ │ │ ├── ScalarNodeDeserializer.cs
│ │ │ └── TypeConverterNodeDeserializer.cs
│ │ ├── NodeTypeResolvers
│ │ │ ├── DefaultContainersNodeTypeResolver.cs
│ │ │ ├── TagNodeTypeResolver.cs
│ │ │ └── TypeNameInTagNodeTypeResolver.cs
│ │ ├── ObjectDescriptor.cs
│ │ ├── ObjectFactories
│ │ │ ├── DefaultObjectFactory.cs
│ │ │ └── LambdaObjectFactory.cs
│ │ ├── ObjectGraphTraversalStrategies
│ │ │ ├── FullObjectGraphTraversalStrategy.cs
│ │ │ └── RoundtripObjectGraphTraversalStrategy.cs
│ │ ├── ObjectGraphVisitors
│ │ │ ├── AnchorAssigner.cs
│ │ │ ├── AnchorAssigningObjectGraphVisitor.cs
│ │ │ ├── ChainedObjectGraphVisitor.cs
│ │ │ ├── CustomSerializationObjectGraphVisitor.cs
│ │ │ ├── DefaultExclusiveObjectGraphVisitor.cs
│ │ │ └── EmittingObjectGraphVisitor.cs
│ │ ├── PropertyDescriptor.cs
│ │ ├── SerializationOptions.cs
│ │ ├── Serializer.cs
│ │ ├── StreamFragment.cs
│ │ ├── TagMappings.cs
│ │ ├── TypeInspectors
│ │ │ ├── CachedTypeInspector.cs
│ │ │ ├── NamingConventionTypeInspector.cs
│ │ │ ├── ReadableAndWritablePropertiesTypeInspector.cs
│ │ │ ├── ReadablePropertiesTypeInspector.cs
│ │ │ └── TypeInspectorSkeleton.cs
│ │ ├── TypeResolvers
│ │ │ ├── DynamicTypeResolver.cs
│ │ │ └── StaticTypeResolver.cs
│ │ ├── Utilities
│ │ │ ├── IPostDeserializationCallback.cs
│ │ │ ├── ObjectAnchorCollection.cs
│ │ │ ├── ReflectionUtility.cs
│ │ │ ├── SerializerState.cs
│ │ │ ├── StringExtensions.cs
│ │ │ ├── TypeConverter.cs
│ │ │ └── YamlTypeConverters.cs
│ │ ├── ValueDeserializers
│ │ │ ├── AliasValueDeserializer.cs
│ │ │ └── NodeValueDeserializer.cs
│ │ ├── YamlAliasAttribute.cs
│ │ ├── YamlAttributesTypeInspector.cs
│ │ ├── YamlFormatter.cs
│ │ ├── YamlIgnoreAttribute.cs
│ │ └── YamlMember.cs
│ ├── YamlDotNet.Signed.nuspec
│ ├── YamlDotNet.Unsigned.nuspec
│ └── YamlDotNet.csproj
└── packages
│ ├── Moq.4.2.1510.2205
│ ├── Moq.4.2.1510.2205.nupkg
│ ├── Moq.4.2.1510.2205.nuspec
│ └── lib
│ │ ├── net35
│ │ ├── Moq.dll
│ │ └── Moq.xml
│ │ ├── net40
│ │ ├── Moq.dll
│ │ └── Moq.xml
│ │ └── sl5
│ │ ├── Moq.Silverlight.dll
│ │ └── Moq.Silverlight.xml
│ ├── Mvp.Xml.2.3.0
│ ├── Mvp.Xml.2.3.0.nupkg
│ ├── Mvp.Xml.2.3.0.nuspec
│ ├── ReleaseNotes.htm
│ ├── lib
│ │ └── net20
│ │ │ ├── Mvp.Xml.dll
│ │ │ └── Mvp.Xml.xml
│ └── license.txt
│ ├── Newtonsoft.Json.8.0.2
│ ├── Newtonsoft.Json.8.0.2.nupkg
│ ├── Newtonsoft.Json.8.0.2.nuspec
│ ├── lib
│ │ ├── net20
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net35
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net40
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── net45
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ ├── portable-net40+sl5+wp80+win8+wpa81
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ │ └── portable-net45+wp80+win8+wpa81+dnxcore50
│ │ │ ├── Newtonsoft.Json.dll
│ │ │ └── Newtonsoft.Json.xml
│ └── tools
│ │ └── install.ps1
│ ├── Newtonsoft.Json.Schema.2.0.2
│ ├── Newtonsoft.Json.Schema.2.0.2.nupkg
│ ├── Newtonsoft.Json.Schema.2.0.2.nuspec
│ └── lib
│ │ ├── net35
│ │ ├── Newtonsoft.Json.Schema.dll
│ │ └── Newtonsoft.Json.Schema.xml
│ │ ├── net40
│ │ ├── Newtonsoft.Json.Schema.dll
│ │ └── Newtonsoft.Json.Schema.xml
│ │ ├── net45
│ │ ├── Newtonsoft.Json.Schema.dll
│ │ └── Newtonsoft.Json.Schema.xml
│ │ └── portable-net45+wp80+win8+wpa81+dnxcore50
│ │ ├── Newtonsoft.Json.Schema.dll
│ │ └── Newtonsoft.Json.Schema.xml
│ ├── YamlDotNet.3.7.0
│ ├── YamlDotNet.3.7.0.nupkg
│ ├── YamlDotNet.3.7.0.nuspec
│ └── lib
│ │ ├── net35
│ │ ├── YamlDotNet.dll
│ │ ├── YamlDotNet.pdb
│ │ └── YamlDotNet.xml
│ │ └── portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1
│ │ ├── YamlDotNet.dll
│ │ ├── YamlDotNet.pdb
│ │ └── YamlDotNet.xml
│ └── repositories.config
├── LICENSE.txt
├── PanAPI
├── .gitignore
├── pom.xml
└── src
│ └── main
│ ├── api
│ ├── annotations.1_0.raml
│ ├── documentation
│ │ ├── getting-started.md
│ │ ├── getting-to-know-us.md
│ │ └── references.md
│ ├── resource-types-direct.1_0.raml
│ ├── resource-types.raml
│ ├── samples
│ │ ├── sample400BadRequest-sample.json
│ │ ├── sample401-Unauthorized-sample.json
│ │ ├── sample403-Forbidden-sample.json
│ │ ├── sample404Resp-sample.json
│ │ ├── sample405-MethodNotAllowed-sample.json
│ │ └── sample406-NotAcceptable-sample.json
│ ├── schemas
│ │ └── ErrorResponse.json
│ ├── security-schemas-basic.1_0.raml
│ ├── security-schemas-basic.raml
│ ├── security-schemas-oauth2-describedBy.raml
│ ├── traits.1_0.raml
│ ├── traits.raml
│ └── traits
│ │ ├── security-schemas.raml
│ │ └── traits.raml
│ ├── assembly
│ ├── zip-zip.xml
│ └── zip.xml
│ └── resources
│ ├── zip-api-implementation.xml
│ ├── zip-api.xml
│ └── zip-client.xml
├── README.md
├── Tutorial.md
├── Using.md
├── images
├── Outbound Simple Message V1606.png
├── api-diagram-method.png
├── api-diagram-resourcetype.png
├── api-diagram-stereotype.png
├── api-diagram.png
├── api-object-classified.png
├── api-object-title.png
├── api-object.png
├── api-resource-classified.png
├── community.png
├── export-raml-1.0.gif
├── link-traits-to-method.gif
├── metamodel.png
├── registry.png
├── security-schema-oauth2.gif
├── security-schema-oauth2.png
├── security-scheme-oauth--example.png
├── security.png
├── sync-sample.gif
└── validate-sample.gif
└── pom.xml
/.gitignore:
--------------------------------------------------------------------------------
1 | *.suo
2 | bin/
3 | obj/
4 | target
5 | *.EAP
6 | *.msi
--------------------------------------------------------------------------------
/API1/pom.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 | api
5 | API.Parent
6 | 1.0-SNAPSHOT
7 |
8 | 4.0.0
9 | nz.co.api
10 | API.Technical.API1
11 | jar
12 | 1.5.1-SNAPSHOT
13 | Technical API1
14 | http://maven.apache.org
15 |
16 |
17 |
18 |
19 |
20 | org.codehaus.mojo
21 | build-helper-maven-plugin
22 |
23 |
24 | maven-source-plugin
25 |
26 |
27 | maven-resources-plugin
28 | 2.6
29 |
30 |
31 | maven-assembly-plugin
32 | 2.4
33 |
34 |
35 | org.apache.maven.plugins
36 | maven-dependency-plugin
37 |
38 |
39 | org.jsonschema2pojo
40 | jsonschema2pojo-maven-plugin
41 |
42 |
43 | exec-maven-plugin
44 | org.codehaus.mojo
45 |
46 |
47 | org.codehaus.mojo
48 | build-helper-maven-plugin
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/API1/src/main/api/api.raml:
--------------------------------------------------------------------------------
1 | #%RAML 0.8
2 | title: The API Title
3 | baseUri: https://{environment}
4 | baseUriParameters:
5 | environment:
6 | enum: [api.di.net,api.live.biz.co.nz,api-internal.test.net,api.preprod.net,api-internal.dev.net,api.dev.net,api.test.net]
7 | documentation:
8 | - title: Description
9 | content: ''
10 | - title: History
11 | content: !include documentation/history.md
12 | - title: Effort
13 | content: !include documentation/effort.md
14 | securitySchemes: !include security-schemas-basic.raml
15 | traits: !include traits.raml
16 | resourceTypes: !include resource-types.raml
17 | schemas:
18 | - infoSchema: !include schemas/ErrorResponse.json
19 | - dessertSchema: !include schemas/Dessert.json
20 | - fruitSchema: !include schemas/Fruit.json
21 | /root-resource:
22 | uriParameters: {}
23 | /child-resource:
24 | uriParameters: {}
25 | type:
26 | item-put:
27 | infoSchema: infoSchema
28 | reqSchema: dessertSchema
29 | respSchema: dessertSchema
30 | sample400Resp: !include samples/sample400BadRequest-sample.json
31 | sample401Resp: !include samples/sample401-Unauthorized-sample.json
32 | sample403Resp: !include samples/sample403-Forbidden-sample.json
33 | sample404Resp: !include samples/sample404Resp-sample.json
34 | sample405Resp: !include samples/sample405-MethodNotAllowed-sample.json
35 | sample406Resp: !include samples/sample406-NotAcceptable-sample.json
36 | putSample200Resp: !include samples/dessert-sample.Dessert.json
37 | putSampleReq: !include samples/dessert-sample.Dessert.json
38 | put:
39 | description: >+
40 | The put method description
41 |
42 | type:
43 | item-get:
44 | infoSchema: infoSchema
45 | respSchema: fruitSchema
46 | sample400Resp: !include samples/sample400BadRequest-sample.json
47 | sample401Resp: !include samples/sample401-Unauthorized-sample.json
48 | sample403Resp: !include samples/sample403-Forbidden-sample.json
49 | sample404Resp: !include samples/sample404Resp-sample.json
50 | sample405Resp: !include samples/sample405-MethodNotAllowed-sample.json
51 | sample406Resp: !include samples/sample406-NotAcceptable-sample.json
52 | sample200Resp: !include samples/fruit-sample.Fruit.json
53 | get:
54 | description: >+
55 | The get method description
56 |
57 | queryParameters:
58 | species:
59 | description: >+
60 | The species of fruit
61 |
62 |
--------------------------------------------------------------------------------
/API1/src/main/api/documentation/effort.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/API1/src/main/api/documentation/effort.md
--------------------------------------------------------------------------------
/API1/src/main/api/documentation/history.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/API1/src/main/api/documentation/history.md
--------------------------------------------------------------------------------
/API1/src/main/api/samples/dessert-sample.Dessert.json:
--------------------------------------------------------------------------------
1 | {
2 | "ingredients": [
3 | {
4 | "amount": "1kg"
5 | }
6 | ],
7 | "orange": {
8 | "species": "Mandarin"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/API1/src/main/api/samples/fruit-sample.Fruit.json:
--------------------------------------------------------------------------------
1 | {
2 | "apple": {
3 | "taste": "Sweet",
4 | "species": "Macintosh"
5 | },
6 | "oranges": [
7 | {
8 | "species": "Valencia"
9 | }
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/API1/src/main/api/schemas/Dessert.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Dessert",
3 | "description": "",
4 | "javaType": "nz.co.iag.model.consumer.json.Dessert",
5 | "$schema": "http://json-schema.org/draft-04/schema#",
6 | "definitions": {
7 | "Ingredients": {
8 | "title": "Ingredients",
9 | "description": "",
10 | "javaType": "nz.co.iag.model.consumer.json.Ingredients",
11 | "$schema": "http://json-schema.org/draft-04/schema#",
12 | "type": "object",
13 | "additionalProperties": false,
14 | "properties": {
15 | "amount": {
16 | "description": "The amount of the ingredient",
17 | "type": "string"
18 | }
19 | },
20 | "required": [
21 | "amount"
22 | ]
23 | },
24 | "Orange": {
25 | "title": "Orange",
26 | "description": "",
27 | "javaType": "nz.co.iag.model.consumer.json.Orange",
28 | "$schema": "http://json-schema.org/draft-04/schema#",
29 | "type": "object",
30 | "additionalProperties": false,
31 | "properties": {
32 | "species": {
33 | "description": "The type of orange",
34 | "type": "string"
35 | }
36 | },
37 | "required": [
38 | "species"
39 | ]
40 | },
41 | "Dessert": {
42 | "$ref": "#"
43 | }
44 | },
45 | "type": "object",
46 | "additionalProperties": false,
47 | "properties": {
48 | "oranges": {
49 | "description": "",
50 | "type": "array",
51 | "items": {
52 | "$ref": "#/definitions/Orange"
53 | }
54 | },
55 | "ingredients": {
56 | "description": "",
57 | "type": "array",
58 | "items": {
59 | "$ref": "#/definitions/Ingredients"
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/API1/src/main/api/schemas/Entity.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Entity",
3 | "description": "",
4 | "javaType": "nz.co.iag.model.consumer.json.Entity",
5 | "$schema": "http://json-schema.org/draft-04/schema#",
6 | "definitions": {
7 | "Orange": {
8 | "title": "Orange",
9 | "description": "",
10 | "javaType": "nz.co.iag.model.consumer.json.Orange",
11 | "$schema": "http://json-schema.org/draft-04/schema#",
12 | "type": "object",
13 | "additionalProperties": false,
14 | "properties": {
15 | "species": {
16 | "description": "The type of orange",
17 | "type": "string"
18 | }
19 | },
20 | "required": [
21 | "species"
22 | ]
23 | },
24 | "Apple": {
25 | "title": "Apple",
26 | "description": "",
27 | "javaType": "nz.co.iag.model.consumer.json.Apple",
28 | "$schema": "http://json-schema.org/draft-04/schema#",
29 | "type": "object",
30 | "additionalProperties": false,
31 | "properties": {
32 | "taste": {
33 | "description": "The taste of the apple",
34 | "type": "string"
35 | },
36 | "species": {
37 | "description": "The type of apple",
38 | "type": "string"
39 | }
40 | },
41 | "required": [
42 | "taste",
43 | "species"
44 | ]
45 | },
46 | "Entity": {
47 | "$ref": "#"
48 | }
49 | },
50 | "type": "object",
51 | "additionalProperties": false,
52 | "properties": {
53 | "apple": {
54 | "$ref": "#/definitions/Apple"
55 | },
56 | "oranges": {
57 | "description": "",
58 | "type": "array",
59 | "items": {
60 | "$ref": "#/definitions/Orange"
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/API1/src/main/api/schemas/Fruit.json:
--------------------------------------------------------------------------------
1 | {
2 | "title": "Fruit",
3 | "description": "",
4 | "javaType": "nz.co.iag.model.consumer.json.Fruit",
5 | "$schema": "http://json-schema.org/draft-04/schema#",
6 | "definitions": {
7 | "Orange": {
8 | "title": "Orange",
9 | "description": "",
10 | "javaType": "nz.co.iag.model.consumer.json.Orange",
11 | "$schema": "http://json-schema.org/draft-04/schema#",
12 | "type": "object",
13 | "additionalProperties": false,
14 | "properties": {
15 | "species": {
16 | "description": "The type of orange",
17 | "type": "string"
18 | }
19 | },
20 | "required": [
21 | "species"
22 | ]
23 | },
24 | "Apple": {
25 | "title": "Apple",
26 | "description": "",
27 | "javaType": "nz.co.iag.model.consumer.json.Apple",
28 | "$schema": "http://json-schema.org/draft-04/schema#",
29 | "type": "object",
30 | "additionalProperties": false,
31 | "properties": {
32 | "taste": {
33 | "description": "The taste of the apple",
34 | "type": "string"
35 | },
36 | "species": {
37 | "description": "The type of apple",
38 | "type": "string"
39 | }
40 | },
41 | "required": [
42 | "taste",
43 | "species"
44 | ]
45 | },
46 | "Fruit": {
47 | "$ref": "#"
48 | }
49 | },
50 | "type": "object",
51 | "additionalProperties": false,
52 | "properties": {
53 | "apple": {
54 | "$ref": "#/definitions/Apple"
55 | },
56 | "oranges": {
57 | "description": "",
58 | "type": "array",
59 | "items": {
60 | "$ref": "#/definitions/Orange"
61 | }
62 | }
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/DataTypeManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Newtonsoft.Json.Schema;
7 |
8 | namespace APIAddIn
9 | {
10 | public class DataTypeManager
11 | {
12 |
13 | static public JSchema getCurrencyType()
14 | {
15 | return new JSchema
16 | {
17 | Type = JSchemaType.String,
18 | Pattern = @"^(?=\(.*\)|[^()]*$)\(?\d{1,3}(\d{3})?(\.\d\d)?\)?$",
19 | Description = "A currency represented as a formatted string. https://confluence.iag.com.au/display/NZTU/Representation+of+currency+in+Web+API",
20 | Title = "Currency"
21 | };
22 | }
23 |
24 | static public JSchema getNumberType()
25 | {
26 | return new JSchema { Type = JSchemaType.Number };
27 | }
28 |
29 | static public JSchema getIntegerType()
30 | {
31 | return new JSchema { Type = JSchemaType.Integer };
32 | }
33 |
34 | static public JSchema getDateType()
35 | {
36 | return new JSchema
37 | {
38 | Type = JSchemaType.String,
39 | Pattern = @"^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])$",
40 | Description = "A date represented as a formatted string. https://confluence.iag.com.au/x/sKT-CQ",
41 | Title = "Date"
42 | };
43 | }
44 |
45 | static public JSchema getDateTimeType()
46 | {
47 | return new JSchema
48 | {
49 | Type = JSchemaType.String,
50 | Pattern = @"^([0-9]+)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])[Tt]([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(([Zz])|([\+|\-]([01][0-9]|2[0-3]):[0-5][0-9]))$",
51 | Description = "A datetime represented as a formatted string. https://confluence.iag.com.au/x/sKT-CQ",
52 | Title = "Date Time"
53 | };
54 | }
55 |
56 | static public JSchema getBooleanType()
57 | {
58 | return new JSchema { Type = JSchemaType.Boolean };
59 | }
60 |
61 | static public JSchema getStringType()
62 | {
63 | return new JSchema { Type = JSchemaType.String };
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/DependencyManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace APIAddIn
8 | {
9 | /* This class keeps track of dependencies to prevent infinite loops during serialization of graph */
10 | public class DependencyManager
11 | {
12 | List dependencies = new List();
13 |
14 | public List getDependencies()
15 | {
16 | return dependencies;
17 | }
18 |
19 | public void setDependency(string dependedUpon1, string dependsUpon2)
20 | {
21 | if (dependsUpon2 == null)
22 | {
23 | dependencies.Add(dependedUpon1);
24 | }
25 | else if (dependedUpon1 == dependsUpon2)
26 | {
27 | int dependedUpon1Index = dependencies.IndexOf(dependedUpon1);
28 | if(dependedUpon1Index<0)
29 | dependencies.Insert(0,dependedUpon1);
30 | else
31 | return;
32 | }
33 | else
34 | {
35 | int dependedUpon1Index = dependencies.IndexOf(dependedUpon1);
36 | int dependsUpon2Index = dependencies.IndexOf(dependsUpon2);
37 | if (dependsUpon2Index == -1 && dependedUpon1Index == -1)
38 | {
39 | dependencies.Insert(0,dependsUpon2);
40 | dependencies.Insert(0, dependedUpon1);
41 | }
42 | else if (dependsUpon2Index == -1)
43 | {
44 | dependencies.Insert(dependedUpon1Index+1, dependsUpon2);
45 | }
46 | else if (dependedUpon1Index == -1)
47 | {
48 | dependencies.Insert(dependsUpon2Index, dependedUpon1);
49 | }
50 | else
51 | {
52 | if (dependedUpon1Index > dependsUpon2Index)
53 | {
54 | //dependencies.RemoveAt(dependedUpon1Index);
55 | //dependencies.Insert(dependsUpon2Index, dependedUpon1);
56 |
57 | dependencies.RemoveAt(dependsUpon2Index);
58 | dependencies.Insert(dependedUpon1Index, dependsUpon2);
59 | }
60 | }
61 |
62 | }
63 | }
64 |
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/Logger.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace APIAddIn
8 | {
9 | public class Logger
10 | {
11 |
12 | bool toggle = false;//false
13 |
14 | EA.Repository repository = null;
15 |
16 | public void setRepository(EA.Repository r){
17 | this.repository = r;
18 | }
19 |
20 | public void toggleLogging(EA.Repository r)
21 | {
22 | this.toggle = !this.toggle;
23 | this.repository = r;
24 | if (this.toggle)
25 | {
26 | enable(r);
27 | }
28 |
29 | }
30 |
31 | public void enable(EA.Repository r)
32 | {
33 | this.toggle = true;
34 | this.repository = r;
35 | if (this.toggle)
36 | {
37 | repository.CreateOutputTab("IAG");
38 | repository.EnsureOutputVisible("IAG");
39 | repository.ClearOutput("IAG");
40 | log("Logger is enabled");
41 | string version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
42 | log("APIAddIn version " + version);
43 | }
44 | }
45 |
46 | public void log(string msg)
47 | {
48 | if (toggle)
49 | repository.WriteOutput("IAG", msg, 0);
50 | }
51 | }
52 |
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("APIAddIn")]
9 | [assembly: AssemblyDescription("Sparx EA AddIn for API Definition")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("https://github.com/bayeslife/api-add-in")]
12 | [assembly: AssemblyProduct("APIAddIn")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(true)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("1f0dfd63-171a-4bcb-aa6f-3a160ef2bf8f")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.4")]
36 | [assembly: AssemblyFileVersion("1.0.0.4")]
37 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace APIAddIn.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 |
26 | [global::System.Configuration.UserScopedSettingAttribute()]
27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28 | [global::System.Configuration.DefaultSettingValueAttribute("C:\\\\Generated")]
29 | public string BasePath {
30 | get {
31 | return ((string)(this["BasePath"]));
32 | }
33 | set {
34 | this["BasePath"] = value;
35 | }
36 | }
37 |
38 | [global::System.Configuration.UserScopedSettingAttribute()]
39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
40 | [global::System.Configuration.DefaultSettingValueAttribute("C:\\\\Generated")]
41 | public string DiagramPath {
42 | get {
43 | return ((string)(this["DiagramPath"]));
44 | }
45 | set {
46 | this["DiagramPath"] = value;
47 | }
48 | }
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | C:\\Generated
7 |
8 |
9 | C:\\Generated
10 |
11 |
12 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/ValidationErrors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace APIAddIn
8 | {
9 | public class ValidationErrors
10 | {
11 |
12 | public List messages = new List();
13 |
14 | public void add(String validation)
15 | {
16 | messages.Add(validation);
17 | }
18 |
19 |
20 | public Boolean hasAny()
21 | {
22 | return messages.Count > 0;
23 | }
24 |
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/app.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | C:\\Generated
12 |
13 |
14 | C:\\Generated
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddIn/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/APIAddIn/APIAddInSetup/Debug/setup.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/APIAddInSetup/Debug/setup.exe
--------------------------------------------------------------------------------
/APIAddIn/APIAddInSetup/Release/setup.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/APIAddInSetup/Release/setup.exe
--------------------------------------------------------------------------------
/APIAddIn/APIAddInSetup/SparxEA_AddIn.reg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/APIAddInSetup/SparxEA_AddIn.reg
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/EAFacade/EADiagramLink.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 |
7 | namespace UnitTestProject1.EAFacade
8 | {
9 | public class EADiagramLink : EA.DiagramLink
10 | {
11 | public int ConnectorID{get;set;}
12 |
13 |
14 | public int DiagramID
15 | {
16 | get
17 | {
18 | throw new NotImplementedException();
19 | }
20 | set
21 | {
22 | throw new NotImplementedException();
23 | }
24 | }
25 |
26 | public string Geometry
27 | {
28 | get
29 | {
30 | throw new NotImplementedException();
31 | }
32 | set
33 | {
34 | throw new NotImplementedException();
35 | }
36 | }
37 |
38 | public string GetLastError()
39 | {
40 | throw new NotImplementedException();
41 | }
42 |
43 | public int InstanceID
44 | {
45 | get
46 | {
47 | throw new NotImplementedException();
48 | }
49 | set
50 | {
51 | throw new NotImplementedException();
52 | }
53 | }
54 |
55 | public bool IsHidden { get; set;}
56 |
57 |
58 | public EA.ObjectType ObjectType
59 | {
60 | get { throw new NotImplementedException(); }
61 | }
62 |
63 | public string Path
64 | {
65 | get
66 | {
67 | throw new NotImplementedException();
68 | }
69 | set
70 | {
71 | throw new NotImplementedException();
72 | }
73 | }
74 |
75 | public string Style
76 | {
77 | get
78 | {
79 | throw new NotImplementedException();
80 | }
81 | set
82 | {
83 | throw new NotImplementedException();
84 | }
85 | }
86 |
87 | public bool Update()
88 | {
89 | return true;
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/FileManagerTest.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | using Microsoft.VisualStudio.TestTools.UnitTesting;
4 | using APIAddIn;
5 | using Newtonsoft.Json.Linq;
6 | using Newtonsoft.Json.Schema;
7 | using UnitTestProject1.EAFacade;
8 |
9 | namespace UnitTestProject1
10 | {
11 | [TestClass]
12 | public class FileManagerTest
13 | {
14 | [TestMethod]
15 | public void TestFileManager()
16 | {
17 | FileManager fm = new FileManager((Logger)null);
18 |
19 | fm.setBasePath(@"c:\tmp");
20 | fm.initializeAPI("api");
21 |
22 | string p = fm.apiPath("api1", APIAddinClass.RAML_0_8, fm.getNamespace(EARepository.Repository, EARepository.currentPackage));
23 | Assert.AreEqual(@"c:\tmp\api1\src\main\api\api.raml", fm.apiPath("api1", APIAddinClass.RAML_0_8, ""));
24 | Assert.AreNotEqual(@"c:\tmp2\api1\src\main\api\api.raml", fm.apiPath("api1", APIAddinClass.RAML_0_8, ""));
25 |
26 | Assert.AreEqual(@"c:\tmp\schema1\src\main\api\schemas\schema1.json", fm.schemaPath("schema1", ""));
27 | Assert.AreNotEqual(@"c:\tmp2\schema1\src\main\api\schemas\schema1.json", fm.schemaPath("schema1", ""));
28 |
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("UnitTestProject1")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("UnitTestProject1")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("892ca328-307c-4f97-b4c5-ebffa3b5d9f5")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/SampleManagerTests.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.VisualStudio.TestTools.UnitTesting;
3 | using APIAddIn;
4 |
5 | namespace UnitTestProject1
6 | {
7 | [TestClass]
8 | public class SampleManagerTests
9 | {
10 | [TestMethod]
11 | public void TestConvertEATypeToValue_Positive()
12 | {
13 | {
14 | object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_NUMBER, "5.23");
15 | Assert.IsTrue(o is float);
16 | }
17 | {
18 | object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_BOOLEAN, "true");
19 | Assert.IsTrue(o is bool);
20 | }
21 | {
22 | object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_STRING, "John");
23 | Assert.IsTrue(o is string);
24 | }
25 | }
26 |
27 | [TestMethod]
28 | public void TestConvertEATypeToValue_Negative()
29 | {
30 | {
31 | //Not a great test
32 | object o = SampleManager.convertEATypeToValue(APIAddinClass.EA_TYPE_NUMBER, "true");
33 | Assert.IsFalse(o is float);
34 | }
35 |
36 | }
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/WSDLTest.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Microsoft.VisualStudio.TestTools.UnitTesting;
7 | using APIAddIn;
8 | using UnitTestProject1.EAFacade;
9 | using UnitTestProject1.APIModels;
10 | using System.Web.Services.Description;
11 |
12 | namespace UnitTestProject1
13 | {
14 | [TestClass]
15 | public class WSDLTest
16 | {
17 | [TestMethod]
18 | public void importWSDL()
19 | {
20 | EAMetaModel meta = new EAMetaModel().setupSOAPackage();
21 |
22 |
23 | string filename = @"..\..\Resources\service.wsdl";
24 |
25 | WSDLManager mgr = new WSDLManager();
26 |
27 | mgr.importWSDL(filename,EARepository.Repository,meta.soaDiagram);
28 |
29 | }
30 |
31 | [TestMethod]
32 | public void exportWSDL()
33 | {
34 | EAMetaModel meta = new EAMetaModel();
35 | EA.Element component = new EAElement();
36 | component.Name = "CommunicationManagement";
37 | component.Version = "http://usermodel.namespace";
38 |
39 | {
40 | object obj = component.Methods.AddNew("operation1", "");
41 | EA.Method op1 = (EA.Method)obj;
42 | op1.Name = "DoSomething1";
43 | object objParam = op1.Parameters.AddNew("paramString", "");
44 | EA.Parameter param = (EA.Parameter)objParam;
45 | param.Name = "paramStringName";
46 | param.Type = "String";
47 | param.Kind = "Input";
48 | }
49 | {
50 | object obj = component.Methods.AddNew("operation2", "");
51 | EA.Method op1 = (EA.Method)obj;
52 | op1.Name = "DoSomething2";
53 | object objParam = op1.Parameters.AddNew("paramString", "");
54 | EA.Parameter param = (EA.Parameter)objParam;
55 | param.Name = "paramStringName";
56 | param.Type = "String";
57 | param.Kind = "Input";
58 | }
59 |
60 | WSDLManager mgr = new WSDLManager();
61 |
62 | ServiceDescription sd = mgr.exportWSDL(EARepository.Repository, component);
63 |
64 |
65 | sd.Write(@"service.wsdl");
66 |
67 | Assert.IsNotNull(sd);
68 | Assert.AreEqual(1, sd.PortTypes.Count);
69 |
70 | }
71 |
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/APIAddIn/UnitTestProject1/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/APIAddIn/UpgradeLog.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/UpgradeLog.htm
--------------------------------------------------------------------------------
/APIAddIn/UpgradeLog2.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/UpgradeLog2.htm
--------------------------------------------------------------------------------
/APIAddIn/UpgradeLog3.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/UpgradeLog3.htm
--------------------------------------------------------------------------------
/APIAddIn/UpgradeLog4.htm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/UpgradeLog4.htm
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Constants.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core.Tokens;
24 |
25 | namespace YamlDotNet.Core
26 | {
27 | ///
28 | /// Defines constants thar relate to the YAML specification.
29 | ///
30 | internal static class Constants
31 | {
32 | public static readonly TagDirective[] DefaultTagDirectives = new[]
33 | {
34 | new TagDirective("!", "!"),
35 | new TagDirective("!!", "tag:yaml.org,2002:"),
36 | };
37 |
38 | public const int MajorVersion = 1;
39 | public const int MinorVersion = 1;
40 |
41 | public const char HandleCharacter = '!';
42 | public const string DefaultHandle = "!";
43 | }
44 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Cursor.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | [Serializable]
27 | internal class Cursor
28 | {
29 | public int Index { get; set; }
30 | public int Line { get; set; }
31 | public int LineOffset { get; set; }
32 |
33 | public Cursor()
34 | {
35 | Line = 1;
36 | }
37 |
38 | public Cursor(Cursor cursor)
39 | {
40 | Index = cursor.Index;
41 | Line = cursor.Line;
42 | LineOffset = cursor.LineOffset;
43 | }
44 |
45 | public Mark Mark()
46 | {
47 | return new Mark(Index, Line, LineOffset + 1);
48 | }
49 |
50 | public void Skip()
51 | {
52 | Index++;
53 | LineOffset++;
54 | }
55 |
56 | public void SkipLineByOffset(int offset)
57 | {
58 | Index += offset;
59 | Line++;
60 | LineOffset = 0;
61 | }
62 |
63 | public void ForceSkipLineAfterNonBreak()
64 | {
65 | if (LineOffset != 0)
66 | {
67 | Line++;
68 | LineOffset = 0;
69 | }
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/EmitterState.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Core
23 | {
24 | internal enum EmitterState
25 | {
26 | StreamStart,
27 | StreamEnd,
28 | FirstDocumentStart,
29 | DocumentStart,
30 | DocumentContent,
31 | DocumentEnd,
32 | FlowSequenceFirstItem,
33 | FlowSequenceItem,
34 | FlowMappingFirstKey,
35 | FlowMappingKey,
36 | FlowMappingSimpleValue,
37 | FlowMappingValue,
38 | BlockSequenceFirstItem,
39 | BlockSequenceItem,
40 | BlockMappingFirstKey,
41 | BlockMappingKey,
42 | BlockMappingSimpleValue,
43 | BlockMappingValue
44 | }
45 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Events/Comment.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | namespace YamlDotNet.Core.Events
24 | {
25 | public class Comment : ParsingEvent
26 | {
27 | public string Value { get; private set; }
28 | public bool IsInline { get; private set; }
29 |
30 | public Comment(string value, bool isInline)
31 | : this(value, isInline, Mark.Empty, Mark.Empty)
32 | {
33 | }
34 |
35 | public Comment(string value, bool isInline, Mark start, Mark end)
36 | : base(start, end)
37 | {
38 | Value = value;
39 | IsInline = isInline;
40 | }
41 |
42 | internal override EventType Type
43 | {
44 | get { return EventType.Comment; }
45 | }
46 |
47 | public override void Accept(IParsingEventVisitor visitor)
48 | {
49 | visitor.Visit(this);
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Events/EventType.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Core.Events
23 | {
24 | internal enum EventType
25 | {
26 | None,
27 | StreamStart,
28 | StreamEnd,
29 | DocumentStart,
30 | DocumentEnd,
31 | Alias,
32 | Scalar,
33 | SequenceStart,
34 | SequenceEnd,
35 | MappingStart,
36 | MappingEnd,
37 | Comment,
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Events/IParsingEventVisitor.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) 2014 Leon Mlakar
3 | // Copyright (c) Antoine Aubry and contributors
4 |
5 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | // this software and associated documentation files (the "Software"), to deal in
7 | // the Software without restriction, including without limitation the rights to
8 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
9 | // of the Software, and to permit persons to whom the Software is furnished to do
10 | // so, subject to the following conditions:
11 |
12 | // The above copyright notice and this permission notice shall be included in all
13 | // copies or substantial portions of the Software.
14 |
15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | // SOFTWARE.
22 |
23 | namespace YamlDotNet.Core.Events
24 | {
25 | ///
26 | /// Callback interface for external event Visitor.
27 | ///
28 | public interface IParsingEventVisitor
29 | {
30 | void Visit(AnchorAlias e);
31 | void Visit(StreamStart e);
32 | void Visit(StreamEnd e);
33 | void Visit(DocumentStart e);
34 | void Visit(DocumentEnd e);
35 | void Visit(Scalar e);
36 | void Visit(SequenceStart e);
37 | void Visit(SequenceEnd e);
38 | void Visit(MappingStart e);
39 | void Visit(MappingEnd e);
40 | void Visit(Comment e);
41 | }
42 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Events/MappingStyle.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Core.Events
23 | {
24 | ///
25 | /// Specifies the style of a mapping.
26 | ///
27 | public enum MappingStyle
28 | {
29 | ///
30 | /// Let the emitter choose the style.
31 | ///
32 | Any,
33 |
34 | ///
35 | /// The block mapping style.
36 | ///
37 | Block,
38 |
39 | ///
40 | /// The flow mapping style.
41 | ///
42 | Flow
43 | }
44 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Events/SequenceStyle.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Core.Events
23 | {
24 | ///
25 | /// Specifies the style of a sequence.
26 | ///
27 | public enum SequenceStyle
28 | {
29 | ///
30 | /// Let the emitter choose the style.
31 | ///
32 | Any,
33 |
34 | ///
35 | /// The block sequence style.
36 | ///
37 | Block,
38 |
39 | ///
40 | /// The flow sequence style.
41 | ///
42 | Flow
43 | }
44 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/HashCode.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | ///
27 | /// Supports implementations of by providing methods to combine two hash codes.
28 | ///
29 | internal static class HashCode
30 | {
31 | ///
32 | /// Combines two hash codes.
33 | ///
34 | /// The first hash code.
35 | /// The second hash code.
36 | ///
37 | public static int CombineHashCodes(int h1, int h2)
38 | {
39 | return ((h1 << 5) + h1) ^ h2;
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/IEmitter.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using YamlDotNet.Core.Events;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | ///
27 | /// Represents a YAML stream emitter.
28 | ///
29 | public interface IEmitter
30 | {
31 | ///
32 | /// Emits an event.
33 | ///
34 | void Emit(ParsingEvent @event);
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/ILookAheadBuffer.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | internal interface ILookAheadBuffer
27 | {
28 | ///
29 | /// Gets a value indicating whether the end of the input reader has been reached.
30 | ///
31 | bool EndOfInput
32 | {
33 | get;
34 | }
35 |
36 | ///
37 | /// Gets the character at thhe specified offset.
38 | ///
39 | char Peek(int offset);
40 |
41 | ///
42 | /// Skips the next characters. Those characters must have been
43 | /// obtained first by calling the method.
44 | ///
45 | void Skip(int length);
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/IParser.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using YamlDotNet.Core.Events;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | ///
27 | /// Represents a YAML stream paser.
28 | ///
29 | public interface IParser
30 | {
31 | ///
32 | /// Gets the current event.
33 | ///
34 | ParsingEvent Current { get; }
35 |
36 | ///
37 | /// Moves to the next event.
38 | ///
39 | /// Returns true if there are more events available, otherwise returns false.
40 | bool MoveNext();
41 | }
42 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/IScanner.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System.Collections.Generic;
23 | using YamlDotNet.Core.Tokens;
24 |
25 | namespace YamlDotNet.Core
26 | {
27 | ///
28 | /// Defines the interface for a stand-alone YAML scanner that
29 | /// converts a sequence of characters into a sequence of YAML tokens.
30 | ///
31 | public interface IScanner
32 | {
33 | ///
34 | /// Gets the current position inside the input stream.
35 | ///
36 | /// The current position.
37 | Mark CurrentPosition
38 | {
39 | get;
40 | }
41 |
42 | ///
43 | /// Gets the current token.
44 | ///
45 | Token Current
46 | {
47 | get;
48 | }
49 |
50 | ///
51 | /// Moves to the next token and consumes the current token.
52 | ///
53 | bool MoveNext();
54 |
55 | ///
56 | /// Moves to the next token without consuming the current token.
57 | ///
58 | bool MoveNextWithoutConsuming();
59 |
60 | ///
61 | /// Consumes the current token.
62 | ///
63 | void ConsumeCurrent();
64 | }
65 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/ParserState.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Core
23 | {
24 | internal enum ParserState
25 | {
26 | StreamStart,
27 | StreamEnd,
28 | ImplicitDocumentStart,
29 | DocumentStart,
30 | DocumentContent,
31 | DocumentEnd,
32 | BlockNode,
33 | BlockNodeOrIndentlessSequence,
34 | FlowNode,
35 | BlockSequenceFirstEntry,
36 | BlockSequenceEntry,
37 | IndentlessSequenceEntry,
38 | BlockMappingFirstKey,
39 | BlockMappingKey,
40 | BlockMappingValue,
41 | FlowSequenceFirstEntry,
42 | FlowSequenceEntry,
43 | FlowSequenceEntryMappingKey,
44 | FlowSequenceEntryMappingValue,
45 | FlowSequenceEntryMappingEnd,
46 | FlowMappingFirstKey,
47 | FlowMappingKey,
48 | FlowMappingValue,
49 | FlowMappingEmptyValue
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/ScalarStyle.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | ///
27 | /// Specifies the style of a YAML scalar.
28 | ///
29 | public enum ScalarStyle
30 | {
31 | ///
32 | /// Let the emitter choose the style.
33 | ///
34 | Any,
35 |
36 | ///
37 | /// The plain scalar style.
38 | ///
39 | Plain,
40 |
41 | ///
42 | /// The single-quoted scalar style.
43 | ///
44 | SingleQuoted,
45 |
46 | ///
47 | /// The double-quoted scalar style.
48 | ///
49 | DoubleQuoted,
50 |
51 | ///
52 | /// The literal scalar style.
53 | ///
54 | Literal,
55 |
56 | ///
57 | /// The folded scalar style.
58 | ///
59 | Folded,
60 |
61 | ///
62 | /// Raw
63 | ///
64 | Raw,
65 |
66 |
67 | }
68 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/SimpleKey.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core
25 | {
26 | [Serializable]
27 | internal class SimpleKey
28 | {
29 | private readonly Cursor cursor;
30 |
31 | public bool IsPossible { get; set; }
32 |
33 | public bool IsRequired { get; private set; }
34 | public int TokenNumber { get; private set; }
35 | public int Index { get { return cursor.Index; } }
36 | public int Line { get { return cursor.Line; } }
37 | public int LineOffset { get { return cursor.LineOffset; } }
38 |
39 | public Mark Mark { get { return cursor.Mark(); } }
40 |
41 | public SimpleKey()
42 | {
43 | cursor = new Cursor();
44 | }
45 |
46 | public SimpleKey(bool isPossible, bool isRequired, int tokenNumber, Cursor cursor)
47 | {
48 | IsPossible = isPossible;
49 | IsRequired = isRequired;
50 | TokenNumber = tokenNumber;
51 | this.cursor = new Cursor(cursor);
52 | }
53 | }
54 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/BlockEnd.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a block end token.
29 | ///
30 | [Serializable]
31 | public class BlockEnd : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public BlockEnd()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public BlockEnd(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/BlockEntry.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a block entry event.
29 | ///
30 | [Serializable]
31 | public class BlockEntry : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public BlockEntry()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public BlockEntry(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/BlockMappingStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a block mapping start token.
29 | ///
30 | [Serializable]
31 | public class BlockMappingStart : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public BlockMappingStart()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public BlockMappingStart(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/BlockSequenceStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a block sequence start token.
29 | ///
30 | [Serializable]
31 | public class BlockSequenceStart : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public BlockSequenceStart()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public BlockSequenceStart(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/Comment.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core.Tokens
25 | {
26 | ///
27 | /// Represents a comment
28 | ///
29 | [Serializable]
30 | public class Comment : Token
31 | {
32 | ///
33 | /// Gets the value of the comment
34 | ///
35 | public string Value { get; private set; }
36 |
37 | ///
38 | /// Gets a value indicating whether the comment appears other tokens on that line.
39 | ///
40 | public bool IsInline { get; private set; }
41 |
42 | ///
43 | /// Initializes a new instance of the class.
44 | ///
45 | public Comment(string value, bool isInline)
46 | : this(value, isInline, Mark.Empty, Mark.Empty)
47 | {
48 | }
49 |
50 | ///
51 | /// Initializes a new instance of the class.
52 | ///
53 | public Comment(string value, bool isInline, Mark start, Mark end)
54 | : base(start, end)
55 | {
56 | IsInline = isInline;
57 | Value = value;
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/DocumentEnd.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a document end token.
29 | ///
30 | [Serializable]
31 | public class DocumentEnd : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public DocumentEnd()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public DocumentEnd(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/DocumentStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a document start token.
29 | ///
30 | [Serializable]
31 | public class DocumentStart : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public DocumentStart()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public DocumentStart(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/FlowEntry.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a flow entry event.
29 | ///
30 | [Serializable]
31 | public class FlowEntry : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public FlowEntry()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public FlowEntry(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/FlowMappingEnd.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a flow mapping end token.
29 | ///
30 | [Serializable]
31 | public class FlowMappingEnd : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public FlowMappingEnd()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public FlowMappingEnd(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/FlowMappingStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a flow mapping start token.
29 | ///
30 | [Serializable]
31 | public class FlowMappingStart : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public FlowMappingStart()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public FlowMappingStart(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/FlowSequenceEnd.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a flow sequence end token.
29 | ///
30 | [Serializable]
31 | public class FlowSequenceEnd : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public FlowSequenceEnd()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public FlowSequenceEnd(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/FlowSequenceStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a flow sequence start token.
29 | ///
30 | [Serializable]
31 | public class FlowSequenceStart : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public FlowSequenceStart()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public FlowSequenceStart(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/Key.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a key token.
29 | ///
30 | [Serializable]
31 | public class Key : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public Key()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public Key(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/StreamEnd.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | using System;
24 |
25 | namespace YamlDotNet.Core.Tokens
26 | {
27 | ///
28 | /// Represents a stream end event.
29 | ///
30 | [Serializable]
31 | public class StreamEnd : Token
32 | {
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | public StreamEnd()
37 | : this(Mark.Empty, Mark.Empty)
38 | {
39 | }
40 |
41 | ///
42 | /// Initializes a new instance of the class.
43 | ///
44 | /// The start position of the token.
45 | /// The end position of the token.
46 | public StreamEnd(Mark start, Mark end)
47 | : base(start, end)
48 | {
49 | }
50 | }
51 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/StreamStart.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core.Tokens
25 | {
26 | ///
27 | /// Represents a stream start token.
28 | ///
29 | [Serializable]
30 | public class StreamStart : Token
31 | {
32 | ///
33 | /// Initializes a new instance of the class.
34 | ///
35 | public StreamStart()
36 | : this(Mark.Empty, Mark.Empty)
37 | {
38 | }
39 |
40 | ///
41 | /// Initializes a new instance of the class.
42 | ///
43 | /// The start position of the token.
44 | /// The end position of the token.
45 | public StreamStart(Mark start, Mark end)
46 | : base(start, end)
47 | {
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Core/Tokens/Value.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Core.Tokens
25 | {
26 | ///
27 | /// Represents a value token.
28 | ///
29 | [Serializable]
30 | public class Value : Token
31 | {
32 | ///
33 | /// Initializes a new instance of the class.
34 | ///
35 | public Value()
36 | : this(Mark.Empty, Mark.Empty)
37 | {
38 | }
39 |
40 | ///
41 | /// Initializes a new instance of the class.
42 | ///
43 | /// The start position of the token.
44 | /// The end position of the token.
45 | public Value(Mark start, Mark end)
46 | : base(start, end)
47 | {
48 | }
49 | }
50 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/YamlDotNet/Properties/AssemblyInfo.cs
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/RepresentationModel/EmitterState.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System.Collections.Generic;
23 |
24 | namespace YamlDotNet.RepresentationModel
25 | {
26 | ///
27 | /// Holds state that is used when emitting a stream.
28 | ///
29 | internal class EmitterState
30 | {
31 | private readonly HashSet emittedAnchors = new HashSet();
32 |
33 | ///
34 | /// Gets the already emitted anchors.
35 | ///
36 | /// The emitted anchors.
37 | public HashSet EmittedAnchors
38 | {
39 | get
40 | {
41 | return emittedAnchors;
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/RepresentationModel/YamlNodeIdentityEqualityComparer.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System.Collections.Generic;
23 |
24 | namespace YamlDotNet.RepresentationModel
25 | {
26 | ///
27 | /// Comparer that is based on identity comparisons.
28 | ///
29 | public sealed class YamlNodeIdentityEqualityComparer : IEqualityComparer
30 | {
31 | #region IEqualityComparer Members
32 |
33 | ///
34 | public bool Equals(YamlNode x, YamlNode y)
35 | {
36 | return ReferenceEquals(x, y);
37 | }
38 |
39 | ///
40 | public int GetHashCode(YamlNode obj)
41 | {
42 | return obj.GetHashCode();
43 | }
44 |
45 | #endregion
46 | }
47 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/Converters/GuidConverter.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Serialization.Converters
23 | {
24 | ///
25 | /// Converter for System.Guid.
26 | ///
27 | public class GuidConverter : IYamlTypeConverter
28 | {
29 | public bool Accepts(System.Type type)
30 | {
31 | return type == typeof (System.Guid);
32 | }
33 |
34 | public object ReadYaml(Core.IParser parser, System.Type type)
35 | {
36 | var value = ((Core.Events.Scalar)parser.Current).Value;
37 | parser.MoveNext();
38 | return new System.Guid(value);
39 | }
40 |
41 | public void WriteYaml(Core.IEmitter emitter, object value, System.Type type)
42 | {
43 | var guid = (System.Guid) value;
44 | emitter.Emit(new Core.Events.Scalar(guid.ToString("D")));
45 | }
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/Deserializer.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/YamlDotNet/Serialization/Deserializer.cs
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IAliasProvider.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Serialization
23 | {
24 | public interface IAliasProvider
25 | {
26 | string GetAlias(object target);
27 | }
28 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IEventEmitter.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Serialization
23 | {
24 | public interface IEventEmitter
25 | {
26 | void Emit(AliasEventInfo eventInfo);
27 | void Emit(ScalarEventInfo eventInfo);
28 | void Emit(MappingStartEventInfo eventInfo);
29 | void Emit(MappingEndEventInfo eventInfo);
30 | void Emit(SequenceStartEventInfo eventInfo);
31 | void Emit(SequenceEndEventInfo eventInfo);
32 | }
33 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/INamingConvention.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 |
23 | namespace YamlDotNet.Serialization
24 | {
25 | ///
26 | /// Translates property names according to a specific convention.
27 | ///
28 | public interface INamingConvention
29 | {
30 | string Apply(string value);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/INodeDeserializer.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | // THE SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core;
24 |
25 | namespace YamlDotNet.Serialization
26 | {
27 | public interface INodeDeserializer
28 | {
29 | bool Deserialize(EventReader reader, Type expectedType, Func nestedObjectDeserializer, out object value);
30 | }
31 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/INodeTypeResolver.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | // THE SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core.Events;
24 |
25 | namespace YamlDotNet.Serialization
26 | {
27 | public interface INodeTypeResolver
28 | {
29 | ///
30 | /// Determines the type of the specified node.
31 | ///
32 | /// The node to be deserialized.
33 | /// The type that has been determined so far.
34 | ///
35 | /// true if has been resolved completely;
36 | /// false if the next type should be invoked.
37 | ///
38 | bool Resolve(NodeEvent nodeEvent, ref Type currentType);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IObjectDescriptor.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core;
24 |
25 | namespace YamlDotNet.Serialization
26 | {
27 | ///
28 | /// Represents an object along with its type.
29 | ///
30 | public interface IObjectDescriptor
31 | {
32 | ///
33 | /// A reference to the object.
34 | ///
35 | object Value { get; }
36 |
37 | ///
38 | /// The type that should be used when to interpret the .
39 | ///
40 | Type Type { get; }
41 |
42 | ///
43 | /// The type of as determined by its container (e.g. a property).
44 | ///
45 | Type StaticType { get; }
46 |
47 | ///
48 | /// The style to be used for scalars.
49 | ///
50 | ScalarStyle ScalarStyle { get; }
51 | }
52 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IObjectFactory.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Serialization
25 | {
26 | ///
27 | /// Creates instances of types.
28 | ///
29 | ///
30 | /// This interface allows to provide a custom logic for creating instances during deserialization.
31 | ///
32 | public interface IObjectFactory
33 | {
34 | ///
35 | /// Creates an instance of the specified type.
36 | ///
37 | object Create(Type type);
38 | }
39 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IObjectGraphTraversalStrategy.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | namespace YamlDotNet.Serialization
23 | {
24 | ///
25 | /// Defines a strategy that walks through an object graph.
26 | ///
27 | public interface IObjectGraphTraversalStrategy
28 | {
29 | ///
30 | /// Traverses the specified object graph.
31 | ///
32 | /// The graph.
33 | /// An that is to be notified during the traversal.
34 | void Traverse(IObjectDescriptor graph, IObjectGraphVisitor visitor);
35 | }
36 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IPropertyDescriptor.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core;
24 |
25 | namespace YamlDotNet.Serialization
26 | {
27 | public interface IPropertyDescriptor
28 | {
29 | string Name { get; }
30 | bool CanWrite { get; }
31 | Type Type { get; }
32 | Type TypeOverride { get; set; }
33 | int Order { get; set; }
34 | ScalarStyle ScalarStyle { get; set; }
35 |
36 | T GetCustomAttribute() where T : Attribute;
37 |
38 | IObjectDescriptor Read(object target);
39 | void Write(object target, object value);
40 | }
41 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/ITypeResolver.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 |
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy of
5 | // this software and associated documentation files (the "Software"), to deal in
6 | // the Software without restriction, including without limitation the rights to
7 | // use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
8 | // of the Software, and to permit persons to whom the Software is furnished to do
9 | // so, subject to the following conditions:
10 |
11 | // The above copyright notice and this permission notice shall be included in all
12 | // copies or substantial portions of the Software.
13 |
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 | // SOFTWARE.
21 |
22 | using System;
23 |
24 | namespace YamlDotNet.Serialization
25 | {
26 | ///
27 | /// Resolves the type of values.
28 | ///
29 | public interface ITypeResolver
30 | {
31 | Type Resolve(Type staticType, object actualValue);
32 | }
33 | }
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IValueDeserializer.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | // THE SOFTWARE.
21 |
22 | using System;
23 | using YamlDotNet.Core;
24 | using YamlDotNet.Serialization.Utilities;
25 |
26 | namespace YamlDotNet.Serialization
27 | {
28 | public interface IValueDeserializer
29 | {
30 | object DeserializeValue(EventReader reader, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer);
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/APIAddIn/YamlDotNet/Serialization/IValuePromise.cs:
--------------------------------------------------------------------------------
1 | // This file is part of YamlDotNet - A .NET library for YAML.
2 | // Copyright (c) Antoine Aubry and contributors
3 | //
4 | // Permission is hereby granted, free of charge, to any person obtaining a copy
5 | // of this software and associated documentation files (the "Software"), to deal
6 | // in the Software without restriction, including without limitation the rights
7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 | // copies of the Software, and to permit persons to whom the Software is
9 | // furnished to do so, subject to the following conditions:
10 | //
11 | // The above copyright notice and this permission notice shall be included in
12 | // all copies or substantial portions of the Software.
13 | //
14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20 | // THE SOFTWARE.
21 |
22 | using System;
23 | using System.Diagnostics.CodeAnalysis;
24 |
25 | namespace YamlDotNet.Serialization
26 | {
27 | public interface IValuePromise
28 | {
29 | [SuppressMessage("Microsoft.Design", "CA1009:DeclareEventHandlersCorrectly")]
30 | event Action