├── .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 ValueAvailable; 31 | } 32 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/IYamlSerializable.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; 23 | 24 | namespace YamlDotNet.Serialization 25 | { 26 | /// 27 | /// Allows an object to customize how it is serialized and deserialized. 28 | /// 29 | public interface IYamlSerializable 30 | { 31 | /// 32 | /// Reads this object's state from a YAML parser. 33 | /// 34 | void ReadYaml(IParser parser); 35 | 36 | /// 37 | /// Writes this object's state to a YAML emitter. 38 | /// 39 | void WriteYaml(IEmitter emitter); 40 | } 41 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/IYamlTypeConverter.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 | /// Allows to customize how a type is serialized and deserialized. 29 | /// 30 | public interface IYamlTypeConverter 31 | { 32 | /// 33 | /// Gets a value indicating whether the current converter supports converting the specified type. 34 | /// 35 | bool Accepts(Type type); 36 | 37 | /// 38 | /// Reads an object's state from a YAML parser. 39 | /// 40 | object ReadYaml(IParser parser, Type type); 41 | 42 | /// 43 | /// Writes the specified object's state to a YAML emitter. 44 | /// 45 | void WriteYaml(IEmitter emitter, object value, Type type); 46 | } 47 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NamingConventions/CamelCaseNamingConvention.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.Serialization.Utilities; 23 | 24 | namespace YamlDotNet.Serialization.NamingConventions 25 | { 26 | /// 27 | /// Convert the string with underscores (this_is_a_test) or hyphens (this-is-a-test) to 28 | /// camel case (thisIsATest). Camel case is the same as Pascal case, except the first letter 29 | /// is lowercase. 30 | /// 31 | public sealed class CamelCaseNamingConvention : INamingConvention 32 | { 33 | public string Apply(string value) 34 | { 35 | return value.ToCamelCase(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NamingConventions/HyphenatedNamingConvention.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.Serialization.Utilities; 23 | 24 | namespace YamlDotNet.Serialization.NamingConventions 25 | { 26 | /// 27 | /// Convert the string from camelcase (thisIsATest) to a hyphenated (this-is-a-test) string 28 | /// 29 | public sealed class HyphenatedNamingConvention : INamingConvention 30 | { 31 | public string Apply(string value) 32 | { 33 | return value.FromCamelCase("-"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NamingConventions/NullNamingConvention.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.NamingConventions 24 | { 25 | /// 26 | /// Performs no naming conversion. 27 | /// 28 | public sealed class NullNamingConvention : INamingConvention 29 | { 30 | public string Apply(string value) 31 | { 32 | return value; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NamingConventions/PascalCaseNamingConvention.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.Serialization.Utilities; 23 | 24 | namespace YamlDotNet.Serialization.NamingConventions 25 | { 26 | /// 27 | /// Convert the string with underscores (this_is_a_test) or hyphens (this-is-a-test) to 28 | /// pascal case (ThisIsATest). Pascal case is the same as camel case, except the first letter 29 | /// is uppercase. 30 | /// 31 | public sealed class PascalCaseNamingConvention : INamingConvention 32 | { 33 | public string Apply(string value) 34 | { 35 | return value.ToPascalCase(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NamingConventions/UnderscoredNamingConvention.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.Serialization.Utilities; 23 | 24 | namespace YamlDotNet.Serialization.NamingConventions 25 | { 26 | /// 27 | /// Convert the string from camelcase (thisIsATest) to a underscored (this_is_a_test) string 28 | /// 29 | public sealed class UnderscoredNamingConvention : INamingConvention 30 | { 31 | public string Apply(string value) 32 | { 33 | return value.FromCamelCase("_"); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NodeDeserializers/TypeConverterNodeDeserializer.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 System.Collections.Generic; 24 | using System.Linq; 25 | using YamlDotNet.Core; 26 | 27 | namespace YamlDotNet.Serialization.NodeDeserializers 28 | { 29 | public sealed class TypeConverterNodeDeserializer : INodeDeserializer 30 | { 31 | private readonly IEnumerable converters; 32 | 33 | public TypeConverterNodeDeserializer(IEnumerable converters) 34 | { 35 | if (converters == null) 36 | { 37 | throw new ArgumentNullException("converters"); 38 | } 39 | 40 | this.converters = converters; 41 | } 42 | 43 | bool INodeDeserializer.Deserialize(EventReader reader, Type expectedType, Func nestedObjectDeserializer, out object value) 44 | { 45 | var converter = converters.FirstOrDefault(c => c.Accepts(expectedType)); 46 | if (converter == null) 47 | { 48 | value = null; 49 | return false; 50 | } 51 | 52 | value = converter.ReadYaml(reader.Parser, expectedType); 53 | return true; 54 | } 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NodeTypeResolvers/DefaultContainersNodeTypeResolver.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 System.Collections.Generic; 24 | using YamlDotNet.Core.Events; 25 | 26 | namespace YamlDotNet.Serialization.NodeTypeResolvers 27 | { 28 | public sealed class DefaultContainersNodeTypeResolver : INodeTypeResolver 29 | { 30 | bool INodeTypeResolver.Resolve(NodeEvent nodeEvent, ref Type currentType) 31 | { 32 | if (currentType == typeof(object)) 33 | { 34 | if (nodeEvent is SequenceStart) 35 | { 36 | currentType = typeof(List); 37 | return true; 38 | } 39 | if (nodeEvent is MappingStart) 40 | { 41 | currentType = typeof(Dictionary); 42 | return true; 43 | } 44 | } 45 | 46 | return false; 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NodeTypeResolvers/TagNodeTypeResolver.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 System.Collections.Generic; 24 | using YamlDotNet.Core.Events; 25 | 26 | namespace YamlDotNet.Serialization.NodeTypeResolvers 27 | { 28 | public sealed class TagNodeTypeResolver : INodeTypeResolver 29 | { 30 | private readonly IDictionary tagMappings; 31 | 32 | public TagNodeTypeResolver(IDictionary tagMappings) 33 | { 34 | if (tagMappings == null) 35 | { 36 | throw new ArgumentNullException("tagMappings"); 37 | } 38 | 39 | this.tagMappings = tagMappings; 40 | } 41 | 42 | bool INodeTypeResolver.Resolve(NodeEvent nodeEvent, ref Type currentType) 43 | { 44 | Type predefinedType; 45 | if (!string.IsNullOrEmpty(nodeEvent.Tag) && tagMappings.TryGetValue(nodeEvent.Tag, out predefinedType)) 46 | { 47 | currentType = predefinedType; 48 | return true; 49 | } 50 | return false; 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/NodeTypeResolvers/TypeNameInTagNodeTypeResolver.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.NodeTypeResolvers 26 | { 27 | public sealed class TypeNameInTagNodeTypeResolver : INodeTypeResolver 28 | { 29 | bool INodeTypeResolver.Resolve(NodeEvent nodeEvent, ref Type currentType) 30 | { 31 | if (!string.IsNullOrEmpty(nodeEvent.Tag)) 32 | { 33 | // If type could not be loaded, make sure to pass resolving 34 | // to the next resolver 35 | try 36 | { 37 | currentType = Type.GetType(nodeEvent.Tag.Substring(1), true); 38 | return true; 39 | } 40 | catch { } 41 | } 42 | return false; 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/ObjectDescriptor.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 sealed class ObjectDescriptor : IObjectDescriptor 28 | { 29 | public object Value { get; private set; } 30 | public Type Type { get; private set; } 31 | public Type StaticType { get; private set; } 32 | public ScalarStyle ScalarStyle { get; private set; } 33 | 34 | public ObjectDescriptor(object value, Type type, Type staticType) 35 | : this(value, type, staticType, ScalarStyle.Any) 36 | { 37 | } 38 | 39 | public ObjectDescriptor(object value, Type type, Type staticType, ScalarStyle scalarStyle) 40 | { 41 | Value = value; 42 | 43 | if (type == null) 44 | { 45 | throw new ArgumentNullException("type"); 46 | } 47 | 48 | Type = type; 49 | 50 | if (staticType == null) 51 | { 52 | throw new ArgumentNullException("staticType"); 53 | } 54 | 55 | StaticType = staticType; 56 | 57 | ScalarStyle = scalarStyle; 58 | } 59 | } 60 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/ObjectFactories/LambdaObjectFactory.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.ObjectFactories 25 | { 26 | /// 27 | /// Creates objects using a Func{Type,object}"/>. 28 | /// 29 | public sealed class LambdaObjectFactory : IObjectFactory 30 | { 31 | private readonly Func _factory; 32 | 33 | public LambdaObjectFactory(Func factory) 34 | { 35 | if (factory == null) 36 | { 37 | throw new ArgumentNullException("factory"); 38 | } 39 | 40 | _factory = factory; 41 | } 42 | 43 | public object Create(Type type) 44 | { 45 | return _factory(type); 46 | } 47 | } 48 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/TypeInspectors/ReadableAndWritablePropertiesTypeInspector.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 System.Collections.Generic; 24 | using System.Linq; 25 | 26 | namespace YamlDotNet.Serialization.TypeInspectors 27 | { 28 | /// 29 | /// Returns the properties of a type that are both readable and writable. 30 | /// 31 | public sealed class ReadableAndWritablePropertiesTypeInspector : TypeInspectorSkeleton 32 | { 33 | private readonly ITypeInspector _innerTypeDescriptor; 34 | 35 | public ReadableAndWritablePropertiesTypeInspector(ITypeInspector innerTypeDescriptor) 36 | { 37 | _innerTypeDescriptor = innerTypeDescriptor; 38 | } 39 | 40 | public override IEnumerable GetProperties(Type type, object container) 41 | { 42 | return _innerTypeDescriptor.GetProperties(type, container) 43 | .Where(p => p.CanWrite); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/TypeResolvers/DynamicTypeResolver.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.TypeResolvers 25 | { 26 | /// 27 | /// The type returned will be the actual type of the value, if available. 28 | /// 29 | public sealed class DynamicTypeResolver : ITypeResolver 30 | { 31 | public Type Resolve(Type staticType, object actualValue) 32 | { 33 | return actualValue != null ? actualValue.GetType() : staticType; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/TypeResolvers/StaticTypeResolver.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.TypeResolvers 25 | { 26 | /// 27 | /// The type returned will always be the static type. 28 | /// 29 | public sealed class StaticTypeResolver : ITypeResolver 30 | { 31 | public Type Resolve(Type staticType, object actualValue) 32 | { 33 | return staticType; 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/Utilities/IPostDeserializationCallback.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.Utilities 23 | { 24 | /// 25 | /// Indicates that a class used as deserialization state 26 | /// needs to be notified after deserialization. 27 | /// 28 | public interface IPostDeserializationCallback 29 | { 30 | void OnDeserialization(); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/Utilities/YamlTypeConverters.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.Serialization.Converters; 24 | 25 | namespace YamlDotNet.Serialization.Utilities 26 | { 27 | internal static class YamlTypeConverters 28 | { 29 | private static readonly IEnumerable _builtInTypeConverters = new IYamlTypeConverter[] 30 | { 31 | new GuidConverter(), 32 | }; 33 | 34 | public static IEnumerable BuiltInConverters { get { return _builtInTypeConverters; } } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/YamlAliasAttribute.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 | /// Instructs the to use a different field name for serialization. 28 | /// 29 | [Obsolete("Please use YamlMember instead")] 30 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] 31 | public class YamlAliasAttribute : Attribute 32 | { 33 | /// 34 | /// Gets or sets the alias name. 35 | /// 36 | public string Alias { get; set; } 37 | 38 | /// 39 | /// Initializes a new instance of the class. 40 | /// 41 | /// The alias to use for this field. 42 | public YamlAliasAttribute(string alias) 43 | { 44 | Alias = alias; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/Serialization/YamlIgnoreAttribute.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 | /// Instructs the YamlSerializer not to serialize the public field or public read/write property value. 28 | /// 29 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false)] 30 | public sealed class YamlIgnoreAttribute : Attribute 31 | { 32 | } 33 | } 34 | 35 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/YamlDotNet.Signed.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YamlDotNet.Signed 5 | 0.0.1 6 | Antoine Aubry 7 | A .NET library for YAML. YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument. 8 | This package contains the YAML parser and serializer. This is the signed version of the package. 9 | en-US 10 | http://aaubry.net/pages/license.html 11 | http://aaubry.net/pages/yamldotnet.html 12 | http://aaubry.net/images/yamldotnet.png 13 | yaml parser development library serialization signed strongname 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /APIAddIn/YamlDotNet/YamlDotNet.Unsigned.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YamlDotNet 5 | 0.0.1 6 | Antoine Aubry 7 | A .NET library for YAML. YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument. 8 | This package contains the YAML parser and serializer. 9 | en-US 10 | http://aaubry.net/pages/license.html 11 | http://aaubry.net/pages/yamldotnet.html 12 | http://aaubry.net/images/yamldotnet.png 13 | yaml parser development library serialization 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /APIAddIn/packages/Moq.4.2.1510.2205/Moq.4.2.1510.2205.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Moq.4.2.1510.2205/Moq.4.2.1510.2205.nupkg -------------------------------------------------------------------------------- /APIAddIn/packages/Moq.4.2.1510.2205/lib/net35/Moq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Moq.4.2.1510.2205/lib/net35/Moq.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Moq.4.2.1510.2205/lib/net40/Moq.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Moq.4.2.1510.2205/lib/net40/Moq.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Moq.4.2.1510.2205/lib/sl5/Moq.Silverlight.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Moq.4.2.1510.2205/lib/sl5/Moq.Silverlight.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Mvp.Xml.2.3.0/Mvp.Xml.2.3.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Mvp.Xml.2.3.0/Mvp.Xml.2.3.0.nupkg -------------------------------------------------------------------------------- /APIAddIn/packages/Mvp.Xml.2.3.0/lib/net20/Mvp.Xml.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Mvp.Xml.2.3.0/lib/net20/Mvp.Xml.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Mvp.Xml.2.3.0/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2005, XMLMVP Project 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions 6 | are met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the 13 | distribution. 14 | * Neither the name of the XMLMVP Project nor the names of its 15 | contributors may be used to endorse or promote products derived 16 | from this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 21 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 22 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 23 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 24 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 25 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 28 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 | POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/Newtonsoft.Json.8.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/Newtonsoft.Json.8.0.2.nupkg -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/Newtonsoft.Json.8.0.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Newtonsoft.Json 5 | 8.0.2 6 | Json.NET 7 | James Newton-King 8 | James Newton-King 9 | https://raw.github.com/JamesNK/Newtonsoft.Json/master/LICENSE.md 10 | http://www.newtonsoft.com/json 11 | http://www.newtonsoft.com/content/images/nugeticon.png 12 | false 13 | Json.NET is a popular high-performance JSON framework for .NET 14 | en-US 15 | json 16 | 17 | -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net20/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net20/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net35/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net35/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net40/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net40/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/net45/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/portable-net40+sl5+wp80+win8+wpa81/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.8.0.2/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/Newtonsoft.Json.Schema.2.0.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/Newtonsoft.Json.Schema.2.0.2.nupkg -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/Newtonsoft.Json.Schema.2.0.2.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Newtonsoft.Json.Schema 5 | 2.0.2 6 | Json.NET Schema 7 | Newtonsoft 8 | Newtonsoft 9 | https://raw.github.com/JamesNK/Newtonsoft.Json.Schema/master/LICENSE.md 10 | http://www.newtonsoft.com/jsonschema 11 | http://www.newtonsoft.com/content/images/nugeticon.png 12 | true 13 | Json.NET Schema is a complete and easy-to-use JSON Schema framework for .NET 14 | en-US 15 | json schema jsonschema 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net35/Newtonsoft.Json.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net35/Newtonsoft.Json.Schema.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net40/Newtonsoft.Json.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net40/Newtonsoft.Json.Schema.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net45/Newtonsoft.Json.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/net45/Newtonsoft.Json.Schema.dll -------------------------------------------------------------------------------- /APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.Schema.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/Newtonsoft.Json.Schema.2.0.2/lib/portable-net45+wp80+win8+wpa81+dnxcore50/Newtonsoft.Json.Schema.dll -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/YamlDotNet.3.7.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/YamlDotNet.3.7.0/YamlDotNet.3.7.0.nupkg -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/YamlDotNet.3.7.0.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | YamlDotNet 5 | 3.7.0 6 | 7 | <authors>Antoine Aubry</authors> 8 | <owners>Antoine Aubry</owners> 9 | <licenseUrl>http://aaubry.net/pages/license.html</licenseUrl> 10 | <projectUrl>http://aaubry.net/pages/yamldotnet.html</projectUrl> 11 | <iconUrl>http://aaubry.net/images/yamldotnet.png</iconUrl> 12 | <requireLicenseAcceptance>false</requireLicenseAcceptance> 13 | <description>A .NET library for YAML. YamlDotNet provides low level parsing and emitting of YAML as well as a high level object model similar to XmlDocument.</description> 14 | <summary>This package contains the YAML parser and serializer.</summary> 15 | <releaseNotes /> 16 | <copyright /> 17 | <language>en-US</language> 18 | <tags>yaml parser development library serialization</tags> 19 | </metadata> 20 | </package> -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/lib/net35/YamlDotNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/YamlDotNet.3.7.0/lib/net35/YamlDotNet.dll -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/lib/net35/YamlDotNet.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/YamlDotNet.3.7.0/lib/net35/YamlDotNet.pdb -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/YamlDotNet.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/YamlDotNet.3.7.0/lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/YamlDotNet.dll -------------------------------------------------------------------------------- /APIAddIn/packages/YamlDotNet.3.7.0/lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/YamlDotNet.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/APIAddIn/packages/YamlDotNet.3.7.0/lib/portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1/YamlDotNet.pdb -------------------------------------------------------------------------------- /APIAddIn/packages/repositories.config: -------------------------------------------------------------------------------- 1 | <?xml version="1.0" encoding="utf-8"?> 2 | <repositories> 3 | <repository path="..\IAGAddIn\packages.config" /> 4 | <repository path="..\MyAddIn\packages.config" /> 5 | <repository path="..\UnitTestProject1\packages.config" /> 6 | </repositories> -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) [year] [fullname] 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do 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 | -------------------------------------------------------------------------------- /PanAPI/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | target 3 | -------------------------------------------------------------------------------- /PanAPI/pom.xml: -------------------------------------------------------------------------------- 1 | <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 2 | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 3 | <modelVersion>4.0.0</modelVersion> 4 | <groupId>nz.co.api</groupId> 5 | <artifactId>API.Resource</artifactId> 6 | <packaging>pom</packaging> 7 | <version>1.1-SNAPSHOT</version> 8 | <name>API.Resource</name> 9 | <url>http://maven.apache.org</url> 10 | 11 | <distributionManagement> 12 | <repository> 13 | <id>release-nexus</id> 14 | <name>Internal Releases</name> 15 | <url>http://nexust:8081/nexus/content/repositories/releases/</url> 16 | </repository> 17 | <snapshotRepository> 18 | <id>snapshot-nexus</id> 19 | <name>Internal Snapshots</name> 20 | <url>http://nexus:8081/nexus/content/repositories/snapshots/</url> 21 | </snapshotRepository> 22 | </distributionManagement> 23 | <build> 24 | <plugins> 25 | <plugin> 26 | <artifactId>maven-assembly-plugin</artifactId> 27 | <version>2.4</version> 28 | <executions> 29 | <execution> 30 | <id>api</id> <!-- this is used for inheritance merges --> 31 | <phase>package</phase> <!-- bind to the packaging phase --> 32 | <goals> 33 | <goal>single</goal> 34 | </goals> 35 | <configuration> 36 | <descriptors> 37 | <descriptor>src/main/assembly/zip.xml</descriptor> 38 | </descriptors> 39 | </configuration> 40 | </execution> 41 | <execution> 42 | <id>resource</id> <!-- this is used for inheritance merges --> 43 | <phase>package</phase> <!-- bind to the packaging phase --> 44 | <goals> 45 | <goal>single</goal> 46 | </goals> 47 | <configuration> 48 | <descriptors> 49 | <descriptor>src/main/assembly/zip-zip.xml</descriptor> 50 | </descriptors> 51 | </configuration> 52 | </execution> 53 | </executions> 54 | </plugin> 55 | </plugins> 56 | </build> 57 | <dependencies> 58 | </dependencies> 59 | 60 | </project> 61 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/annotations.1_0.raml: -------------------------------------------------------------------------------- 1 | #%RAML 1.0 Library 2 | 3 | annotationTypes: 4 | raml08: 5 | description: "This indicates the example is to be included in the 08 raml file." 6 | allowedTargets: Example 7 | testscenario: 8 | description: "This identifes the test scenario so that a request and response can be associated." 9 | type: string 10 | allowedTargets: Example 11 | test-type: 12 | allowedTargets: Example 13 | description: "This identifes the test as a positive or negative test" 14 | properties: 15 | expect: 16 | enum: [ positive, negative ] 17 | header: 18 | allowedTargets: Example 19 | description: "A name value pair" 20 | properties: 21 | headerName: 22 | headerValue: 23 | permission: 24 | description: "The permission to be able to call the API" 25 | type: string 26 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/documentation/getting-started.md: -------------------------------------------------------------------------------- 1 | This section used [Markdown](http://assemble.io/docs/Cheatsheet-Markdown.html) formatting 2 | 3 | Supported code blocks - [languages](https://github.com/github/linguist/blob/master/lib/linguist/languages.yml) 4 | 5 | ```javascript 6 | var s = "JavaScript syntax highlighting"; 7 | alert(s); 8 | ``` 9 | -- 10 | ```c# 11 | public class Hello1 12 | { 13 | public static void Main() 14 | { 15 | System.Console.WriteLine("Hello, World!"); 16 | } 17 | } 18 | ``` 19 | --- 20 | 21 | | Tables | Are | Cool | 22 | | ------------- |:-------------:| -----:| 23 | | col 3 is | right-aligned | $1600 | 24 | | col 2 is | centered | $12 | 25 | --- 26 | 1. Lists 27 | * items 28 | * items 29 | * items 30 | 2. Lists 31 | 3. Lists 32 | 33 | --- 34 | 35 | tasks lists: 36 | 37 | - [x] This is a complete item 38 | - [ ] This is an incomplete item 39 | 40 | --- 41 | 42 | ~~And [emoji](http://www.emoji-cheat-sheet.com/): :sparkles: :camel: :boom: :blush: :horse:~~ 43 | 44 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/documentation/getting-to-know-us.md: -------------------------------------------------------------------------------- 1 | Meet _**Max the Mule**_ 2 | ![Max the Mule](http://blogs.mulesoft.org/wp-content/uploads/2014/05/max-the-mule.png "Max the Mule") 3 | 4 | > My name is "Max" 5 | --- 6 | <a href="https://www.youtube.com/watch?v=ZoSiquMuBM4 7 | " target="_blank"><img src="https://img.youtube.com/vi/ZoSiquMuBM4/0.jpg" 8 | alt="Max the Mule" width="240" height="180" border="10" /></a> 9 | "Watch Me" -------------------------------------------------------------------------------- /PanAPI/src/main/api/documentation/references.md: -------------------------------------------------------------------------------- 1 | [HTTP Methods](http://en.wikipedia.org/wiki/Representational_state_transfer#Applied_to_web_services) 2 | [HTTP Error Codes](http://www.restapitutorial.com/lessons/httpmethods.html) -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample400BadRequest-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo": { 3 | "id": "1234", 4 | "code": "5432", 5 | "status": "4XX_CLIENT_ERROR", 6 | "message": "Field Validation Errors", 7 | "description": "There are field validation errors", 8 | "reasons": [ 9 | { 10 | "field": "Insured Name", 11 | "message": "Insured Name is required", 12 | "code": "FIELD_REQUIRED" 13 | } 14 | ] 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample401-Unauthorized-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo":{ 3 | "id": "{guid}", 4 | "status": "4XX_CLIENT_ERROR", 5 | "message": "Unauthorized", 6 | "description": "Bad or expired token" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample403-Forbidden-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo":{ 3 | "id": "{guid}", 4 | "code" : "0403", 5 | "status": "4XX_CLIENT_ERROR", 6 | "message": "Forbidden", 7 | "description": "The user does not have the correct permissions to access this resource" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample404Resp-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo": { 3 | "id": "{guid}", 4 | "status": "4XX_CLIENT_ERROR", 5 | "message": "Field Validation Errors", 6 | "description": "The object with id {id} not found" 7 | } 8 | } -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample405-MethodNotAllowed-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo": { 3 | "id": "1234", 4 | "code": "5432", 5 | "status": "4XX_CLIENT_ERROR", 6 | "message": "Method Not Allowed", 7 | "description": "The requested method is not allowed" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/samples/sample406-NotAcceptable-sample.json: -------------------------------------------------------------------------------- 1 | { 2 | "responseInfo":{ 3 | "id": "{guid}", 4 | "code": "0406", 5 | "status": "4XX_CLIENT_ERROR", 6 | "message": "Not Acceptable", 7 | "description": "The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/security-schemas-basic.1_0.raml: -------------------------------------------------------------------------------- 1 | basic: 2 | type: Basic Authentication 3 | description: Each request must contain the headers necessary for basic authentication 4 | describedBy: 5 | headers: 6 | Authorization: 7 | description: Used to send the Base64-encoded "username:password" 8 | credentials 9 | type: string 10 | responses: 11 | 401: 12 | description: | 13 | Unauthorized. Either the provided username and password 14 | combination is invalid, or the user is not allowed to access 15 | the content provided by the requested URL. 16 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/security-schemas-basic.raml: -------------------------------------------------------------------------------- 1 | - basic: 2 | type: Basic Authentication 3 | description: Each request must contain the headers necessary for basic authentication 4 | describedBy: 5 | headers: 6 | Authorization: 7 | description: Used to send the Base64-encoded "username:password" 8 | credentials 9 | type: string 10 | responses: 11 | 401: 12 | description: | 13 | Unauthorized. Either the provided username and password 14 | combination is invalid, or the user is not allowed to access 15 | the content provided by the requested URL. 16 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/security-schemas-oauth2-describedBy.raml: -------------------------------------------------------------------------------- 1 | headers: 2 | Authorization: 3 | required: true 4 | description: | 5 | Used to send a valid OAuth access token. 6 | type: string 7 | example: | 8 | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEzODY4OTkxMzEsImlzcyI6ImppcmE6MTU0ODk1OTUiLCJxc2giOiI4MDYzZmY0Y2ExZTQxZGY3YmM5MGM4YWI2ZDBmNjIwN2Q0OTFjZjZkYWQ3YzY2ZWE3OTdiNDYxNGI3MTkyMmU5IiwiaWF0IjoxMzg2ODk4OTUxfQ.uKqU9dTB6gKwG6jQCuXYAiMNdfNRw98Hw_IWuA5MaMo 9 | responses: 10 | 401: 11 | description: | 12 | **Unauthorized** 13 | Bad or expired token. To fix it, re-authenticate the user. 14 | *For example:* The user authentication failed, or the authentication token was not from a trusted Identity Provider 15 | body: 16 | application/json: 17 | schema: !include schemas/ErrorResponse.json 18 | example: !include samples/sample401-Unauthorized-sample.json 19 | 403: 20 | description: | 21 | **Forbidden** 22 | Bad authentication (OAUth) token. The user does not have the correct permissions to access this resource 23 | Re-authenticating the user won't help here. 24 | *For example:* wrong consumer key, bad nonce, expired timestamp, etc 25 | body: 26 | application/json: 27 | schema: !include schemas/ErrorResponse.json 28 | example: !include samples/sample403-Forbidden-sample.json 29 | -------------------------------------------------------------------------------- /PanAPI/src/main/api/traits/security-schemas.raml: -------------------------------------------------------------------------------- 1 | - JWT: 2 | description: | 3 | IAG uses JSON Web Tokens (JWT) to authenticate requests 4 | type: x-jwtAuth 5 | describedBy: 6 | headers: 7 | Authorization: 8 | required: true 9 | description: | 10 | Used to send a valid JWT access token. 11 | type: string 12 | example: | 13 | Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjEzODY4OTkxMzEsImlzcyI6ImppcmE6MTU0ODk1OTUiLCJxc2giOiI4MDYzZmY0Y2ExZTQxZGY3YmM5MGM4YWI2ZDBmNjIwN2Q0OTFjZjZkYWQ3YzY2ZWE3OTdiNDYxNGI3MTkyMmU5IiwiaWF0IjoxMzg2ODk4OTUxfQ.uKqU9dTB6gKwG6jQCuXYAiMNdfNRw98Hw_IWuA5MaMo 14 | responses: 15 | 401: 16 | description: | 17 | **Unauthorized** 18 | Bad or expired token. To fix it, re-authenticate the user. 19 | *For example:* The user authentication failed, or the authentication token was not from a trusted Identity Provider 20 | body: 21 | application/json: 22 | schema: !include ../schemas/ErrorResponse.json 23 | example: | 24 | { 25 | "responseInfo":{ 26 | "id": "{guid}", 27 | "code" : "0401", 28 | "status": "ERROR", 29 | "message": "Unauthorized", 30 | "description": "Bad or expired token" 31 | } 32 | } 33 | 403: 34 | description: | 35 | **Forbidden** 36 | Bad authentication (JWT) token. The user does not have the correct permissions to access this resource 37 | Re-authenticating the user won't help here. 38 | *For example:* wrong consumer key, bad nonce, expired timestamp, etc 39 | body: 40 | application/json: 41 | schema: !include ../schemas/ErrorResponse.json 42 | example: | 43 | { 44 | "responseInfo":{ 45 | "id": "{guid}", 46 | "code" : "0403", 47 | "status": "ERROR", 48 | "message": "Forbidden", 49 | "description": "The user does not have the correct permissions to access this resource" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /PanAPI/src/main/assembly/zip-zip.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> 4 | <id>resource</id> 5 | <formats> 6 | <format>zip</format> 7 | </formats> 8 | <includeBaseDirectory>false</includeBaseDirectory> 9 | <fileSets> 10 | <fileSet> 11 | <directory>src/main/resources</directory> 12 | <outputDirectory/> 13 | </fileSet> 14 | <fileSet> 15 | <directory>src/main/assembly</directory> 16 | <outputDirectory/> 17 | </fileSet> 18 | </fileSets> 19 | </assembly> 20 | -------------------------------------------------------------------------------- /PanAPI/src/main/assembly/zip.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> 4 | <id>api</id> 5 | <formats> 6 | <format>zip</format> 7 | </formats> 8 | <includeBaseDirectory>false</includeBaseDirectory> 9 | <fileSets> 10 | <fileSet> 11 | <directory>src/main/api</directory> 12 | <outputDirectory/> 13 | </fileSet> 14 | <fileSet> 15 | <directory>src/main/assembly</directory> 16 | <outputDirectory/> 17 | </fileSet> 18 | </fileSets> 19 | </assembly> 20 | -------------------------------------------------------------------------------- /PanAPI/src/main/resources/zip-api-implementation.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> 4 | <id>raml-implementation</id> 5 | <formats> 6 | <format>zip</format> 7 | </formats> 8 | <includeBaseDirectory>false</includeBaseDirectory> 9 | <fileSets> 10 | <fileSet> 11 | <directory>target/api-implementation</directory> 12 | <outputDirectory/> 13 | </fileSet> 14 | </fileSets> 15 | </assembly> 16 | -------------------------------------------------------------------------------- /PanAPI/src/main/resources/zip-api.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> 4 | <id>raml</id> 5 | <formats> 6 | <format>zip</format> 7 | </formats> 8 | <includeBaseDirectory>false</includeBaseDirectory> 9 | <fileSets> 10 | <fileSet> 11 | <directory>target/api</directory> 12 | <outputDirectory/> 13 | </fileSet> 14 | </fileSets> 15 | </assembly> 16 | -------------------------------------------------------------------------------- /PanAPI/src/main/resources/zip-client.xml: -------------------------------------------------------------------------------- 1 | <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 2 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 3 | xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd"> 4 | <id>raml-client</id> 5 | <formats> 6 | <format>zip</format> 7 | </formats> 8 | <includeBaseDirectory>false</includeBaseDirectory> 9 | <fileSets> 10 | <fileSet> 11 | <directory>target/raml-client</directory> 12 | <outputDirectory/> 13 | </fileSet> 14 | </fileSets> 15 | </assembly> 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # APIAddIn 2 | 3 | An Add In to Sparx Enterprise Architect to allows modelling and exporting of RAML,Json Schema and Json artefacts. 4 | 5 | Blogs about this functionality 6 | - [Modelling an API in SparxEA and building runtime artefacts](https://xceptionale.wordpress.com/2016/03/09/modelling-an-api-in-sparkea-and-building-runtime-artefacts/) 7 | - [Editing Samples and Updating the Enterprise Architect Model](https://xceptionale.wordpress.com/2016/02/21/editing-samples-and-updating-the-enterprise-architect-model/) 8 | - [Generating Object Diagram Samples from UML Class Models](https://xceptionale.wordpress.com/2016/02/21/generating-object-diagram-samples-from-uml-class-models/) 9 | - [Modelling API Schema as Class Diagrams in Enterprise Architect](https://xceptionale.wordpress.com/2016/02/21/modelling-api-schema-as-class-diagrams-in-enterprise-architect/) 10 | 11 | Videos introducing this functionality. 12 | - [Introduction](https://www.youtube.com/watch?v=uzPYato5kCk) 13 | - [Exporting class diagrams as json schemas](https://www.youtube.com/watch?v=FKTzZ6ObkGo) 14 | - [Generating samples](https://www.youtube.com/watch?v=A0gYgGENT6U) 15 | - [Synchronizing Json files into EA](https://www.youtube.com/watch?v=RnohxHbeX4w) 16 | - Validating RAML API,Json Schemas and Samples (no video as yet) 17 | 18 | 19 | # Installation 20 | 21 | - Build the solution in the APIAddIn folder using visual studio 22 | - Using Regedit add the registry key to list Sparx EA to the class. 23 | ![Synchronizing Json files into EA](./images/registry.png) 24 | - Start EA. 25 | - You should see the extension menus in Extensions-API MDG. 26 | - The extensions are context sensitive 27 | 28 | # Using this add in 29 | 30 | - [Use](./Using.md) 31 | 32 | 33 | 34 | # Thanks 35 | This project makes use of the [Yaml.NET](https://github.com/aaubry/YamlDotNet). I have had to clone the source code into this project as without changes I couldnt get the raml syntax to be generated correctly. 36 | 37 | This project also reliese upon the [SVG Export](http://community.sparxsystems.com/community-resources/706-svg-diagram-export-add-in). 38 | Please install this plugin. 39 | 40 | 41 | # Useful 42 | 43 | If this is useful to you or you would be interested to some other features/capabilities. Let me know. 44 | -------------------------------------------------------------------------------- /images/Outbound Simple Message V1606.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/Outbound Simple Message V1606.png -------------------------------------------------------------------------------- /images/api-diagram-method.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-diagram-method.png -------------------------------------------------------------------------------- /images/api-diagram-resourcetype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-diagram-resourcetype.png -------------------------------------------------------------------------------- /images/api-diagram-stereotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-diagram-stereotype.png -------------------------------------------------------------------------------- /images/api-diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-diagram.png -------------------------------------------------------------------------------- /images/api-object-classified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-object-classified.png -------------------------------------------------------------------------------- /images/api-object-title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-object-title.png -------------------------------------------------------------------------------- /images/api-object.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-object.png -------------------------------------------------------------------------------- /images/api-resource-classified.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/api-resource-classified.png -------------------------------------------------------------------------------- /images/community.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/community.png -------------------------------------------------------------------------------- /images/export-raml-1.0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/export-raml-1.0.gif -------------------------------------------------------------------------------- /images/link-traits-to-method.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/link-traits-to-method.gif -------------------------------------------------------------------------------- /images/metamodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/metamodel.png -------------------------------------------------------------------------------- /images/registry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/registry.png -------------------------------------------------------------------------------- /images/security-schema-oauth2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/security-schema-oauth2.gif -------------------------------------------------------------------------------- /images/security-schema-oauth2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/security-schema-oauth2.png -------------------------------------------------------------------------------- /images/security-scheme-oauth--example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/security-scheme-oauth--example.png -------------------------------------------------------------------------------- /images/security.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/security.png -------------------------------------------------------------------------------- /images/sync-sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/sync-sample.gif -------------------------------------------------------------------------------- /images/validate-sample.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bayeslife/api-add-in/5802a36c29ff4110e492662f4f8a06c933070d99/images/validate-sample.gif --------------------------------------------------------------------------------