diff --git a/README.md b/README.md index 2bbf406670..a162aad8c3 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,8 @@ Edit your `package.json`: } }, "dotnet": { - "namespace": "Acme.Hello" + "namespace": "Acme.HelloNamespace", + "packageId": "Acme.HelloPackage" }, "sphinx": { } } @@ -136,7 +137,8 @@ You should also see a `.jsii` file in the root: "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Acme.Hello" + "namespace": "Acme.HelloNamespace", + "packageId": "Acme.HelloPackage" }, "java": { "maven": { @@ -262,10 +264,26 @@ The following targets are currently supported: * `dotnet` - packages the module as a .NET/NuGet package. Requires the following config: -```json +```js { "dotnet": { - "namespace": "Acme.Hello" + /* Required. */ + "namespace": "Acme.HelloNamespace", + + /* Required. */ + "packageId": "Acme.HelloPackage", + + /* Optional. Default: Value of packageId. */ + "title": "ACME Hello", + + /* Optional. Default: null (no icon). */ + "iconUrl": "path/to/icon.svg", + + /* Optional. Used in conjunction with assemblyOriginatorKey. Default: false. */ + "signAssembly": true, + + /* Optional. Used in conjunction with signAssembly. Default: null. */ + "assemblyOriginatorKey": "path/to/key.snk" } } ``` diff --git a/packages/jsii-calc-base-of-base/package.json b/packages/jsii-calc-base-of-base/package.json index 0b09410858..73cb64bb8b 100644 --- a/packages/jsii-calc-base-of-base/package.json +++ b/packages/jsii-calc-base-of-base/package.json @@ -1,6 +1,7 @@ { "name": "@scope/jsii-calc-base-of-base", "version": "0.6.4", + "description": "An example transitive dependency for jsii-calc.", "main": "lib/index.js", "types": "lib/index.d.ts", "private": true, @@ -15,7 +16,8 @@ } }, "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "sphinx": {} } diff --git a/packages/jsii-calc-base-of-base/test/assembly.jsii b/packages/jsii-calc-base-of-base/test/assembly.jsii index b641c4084e..078bac6c5b 100644 --- a/packages/jsii-calc-base-of-base/test/assembly.jsii +++ b/packages/jsii-calc-base-of-base/test/assembly.jsii @@ -7,7 +7,7 @@ ], "url": "https://aws.amazon.com" }, - "description": "@scope/jsii-calc-base-of-base", + "description": "An example transitive dependency for jsii-calc.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "@scope/jsii-calc-base-of-base", @@ -18,7 +18,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -68,5 +69,5 @@ } }, "version": "0.6.4", - "fingerprint": "I/HF4zJK5eV4ZLmNLDEzShkHVsxngX3K/y2SEYjXsxU=" + "fingerprint": "2YF/qObQgbuJSs52vT9/Z7sgEO0mc2zP0jCuFWGUM4w=" } diff --git a/packages/jsii-calc-base/package.json b/packages/jsii-calc-base/package.json index 8927c5b33e..fed8d3ffcd 100644 --- a/packages/jsii-calc-base/package.json +++ b/packages/jsii-calc-base/package.json @@ -1,6 +1,7 @@ { "name": "@scope/jsii-calc-base", "version": "0.6.4", + "description": "An example direct dependency for jsii-calc.", "main": "lib/index.js", "types": "lib/index.d.ts", "private": true, @@ -15,7 +16,8 @@ } }, "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "sphinx": {} } diff --git a/packages/jsii-calc-base/test/assembly.jsii b/packages/jsii-calc-base/test/assembly.jsii index 10fc400e79..3209725ad2 100644 --- a/packages/jsii-calc-base/test/assembly.jsii +++ b/packages/jsii-calc-base/test/assembly.jsii @@ -11,7 +11,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -27,7 +28,7 @@ "version": "0.6.4" } }, - "description": "@scope/jsii-calc-base", + "description": "An example direct dependency for jsii-calc.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "@scope/jsii-calc-base", @@ -38,7 +39,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -100,5 +102,5 @@ } }, "version": "0.6.4", - "fingerprint": "b+UZfT/No0vxqTQ1n3lIsyw7olqARDbeGj853lNFoE8=" + "fingerprint": "3lcys0/Cd5ZbPR/CXccsL3Fdb66mNsVBs8jb+ySL0oU=" } diff --git a/packages/jsii-calc-lib/package.json b/packages/jsii-calc-lib/package.json index f229bf2296..d76f389a16 100644 --- a/packages/jsii-calc-lib/package.json +++ b/packages/jsii-calc-lib/package.json @@ -1,6 +1,7 @@ { "name": "@scope/jsii-calc-lib", "version": "0.6.4", + "description": "A simple calcuator library built on JSII.", "main": "lib/index.js", "types": "lib/index.d.ts", "private": true, @@ -15,7 +16,8 @@ } }, "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Lib" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId" }, "sphinx": {} } diff --git a/packages/jsii-calc-lib/test/assembly.jsii b/packages/jsii-calc-lib/test/assembly.jsii index 1a5b1f9174..94d0c8912e 100644 --- a/packages/jsii-calc-lib/test/assembly.jsii +++ b/packages/jsii-calc-lib/test/assembly.jsii @@ -13,7 +13,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -31,7 +32,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -47,7 +49,7 @@ "version": "0.6.4" } }, - "description": "@scope/jsii-calc-lib", + "description": "A simple calcuator library built on JSII.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "@scope/jsii-calc-lib", @@ -58,7 +60,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Lib" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId" }, "java": { "maven": { @@ -315,5 +318,5 @@ } }, "version": "0.6.4", - "fingerprint": "MHdlbqyf1RV6moIHslfpKnl7yjQoYVvvZLfxFXWihrU=" + "fingerprint": "jA30G5c81DZXD/7DMYLvdlY8XwEevVQAMAwkUBmPE64=" } diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index 6edd6bf33c..9911aaffdd 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -1,6 +1,7 @@ { "name": "jsii-calc", "version": "0.6.4", + "description": "A simple calcuator built on JSII.", "main": "lib/index.js", "types": "lib/index.d.ts", "private": true, @@ -15,7 +16,8 @@ } }, "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, "sphinx": {} } diff --git a/packages/jsii-calc/test/assembly.jsii b/packages/jsii-calc/test/assembly.jsii index 6702d14432..f57bded816 100644 --- a/packages/jsii-calc/test/assembly.jsii +++ b/packages/jsii-calc/test/assembly.jsii @@ -39,7 +39,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -57,7 +58,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -79,7 +81,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -97,7 +100,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -115,7 +119,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Lib" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId" }, "java": { "maven": { @@ -131,7 +136,7 @@ "version": "0.6.4" } }, - "description": "jsii-calc", + "description": "A simple calcuator built on JSII.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "jsii-calc", @@ -145,7 +150,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, "java": { "maven": { @@ -2820,5 +2826,5 @@ } }, "version": "0.6.4", - "fingerprint": "V1fwQARJzmO/FTBQutFnq1v95it317kCGVv350RLqYo=" + "fingerprint": "gKUNI8uBG+ge5Ccbk0ay+JZ+j4C/4hPATR3jvtVm0Po=" } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.CLI/Program.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.CLI/Program.cs index 2b16609f81..ee697a72ad 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.CLI/Program.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.CLI/Program.cs @@ -20,7 +20,7 @@ static void HandleParseError(IEnumerable errors) static void Generate(Options options) { - AssemblyGenerator generator = new AssemblyGenerator(options.OutputDirectory, "", ""); + AssemblyGenerator generator = new AssemblyGenerator(options.OutputDirectory); generator.Generate(options.JsiiFile, options.Tarball); } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyExtensionsTests.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyExtensionsTests.cs index 368dca4ef0..a19af00cc9 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyExtensionsTests.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyExtensionsTests.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Text; +using System.Xml.Linq; using Xunit; namespace Amazon.JSII.Generator.UnitTests @@ -17,8 +18,8 @@ public class GetNativeName [Fact(DisplayName = _Prefix + nameof(ThrowsOnNullAssembly))] public void ThrowsOnNullAssembly() { - ArgumentNullException exception = Assert.Throws(() => ((Assembly)null).GetNativeName()); - Assert.Equal("root", exception.ParamName); + ArgumentNullException exception = Assert.Throws(() => ((Assembly)null).GetNativeNamespace()); + Assert.Equal("assembly", exception.ParamName); } [Fact(DisplayName = _Prefix + nameof(ThrowsOnMissingDotNetKey))] @@ -26,27 +27,42 @@ public void ThrowsOnMissingDotNetKey() { Assembly assembly = new Assembly( name: "myName", + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", targets: null, version: "myVersion", types: new Dictionary() ); - ArgumentException exception = Assert.Throws(() => assembly.GetNativeName()); - Assert.Equal("root", exception.ParamName); + ArgumentException exception = Assert.Throws(() => assembly.GetNativeNamespace()); + Assert.Equal("assembly", exception.ParamName); } - [Fact(DisplayName = _Prefix + nameof(ThrowsOnEmptyDotNetKey))] - public void ThrowsOnEmptyDotNetKey() + [Fact(DisplayName = _Prefix + nameof(ThrowsOnEmptyDotNetNamespace))] + public void ThrowsOnEmptyDotNetNamespace() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget(" ")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: " ", + packageId: "") + ), version: "myVersion", types: new Dictionary() ); - ArgumentException exception = Assert.Throws(() => assembly.GetNativeName()); - Assert.Equal("root", exception.ParamName); + ArgumentException exception = Assert.Throws(() => assembly.GetNativeNamespace()); + Assert.Equal("assembly", exception.ParamName); } [Fact(DisplayName = _Prefix + nameof(RetrievesDotNetName))] @@ -54,12 +70,21 @@ public void RetrievesDotNetName() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId" + )), version: "myVersion", types: new Dictionary() ); - string actual = assembly.GetNativeName(); + string actual = assembly.GetNativeNamespace(); Assert.Equal("myNativeName", actual); } } @@ -71,47 +96,36 @@ public class GetNativeName_WithPackage [Fact(DisplayName = _Prefix + nameof(ThrowsOnNullAssembly))] public void ThrowsOnNullAssembly() { - ArgumentNullException exception = Assert.Throws(() => ((Assembly)null).GetNativeName("myPackage")); + ArgumentNullException exception = Assert.Throws(() => ((Assembly)null).GetNativeNamespace("myPackage")); Assert.Equal("assembly", exception.ParamName); } - [Fact(DisplayName = _Prefix + nameof(ThrowsOnNullPackage))] - public void ThrowsOnNullPackage() - { - Assembly assembly = new Assembly( - name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), - dependencies: new Dictionary - { - { - "myPackage", - new PackageVersion( - "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) - ) - } - }, - version: "myVersion", - types: new Dictionary() - ); - - ArgumentNullException exception = Assert.Throws(() => assembly.GetNativeName(null)); - Assert.Equal("packageName", exception.ParamName); - } - [Fact(DisplayName = _Prefix + nameof(ThrowsOnMissingPackage))] public void ThrowsOnMissingPackage() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myPackage", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myPackageNativeName", + packageId: "myPackageId2" + + )) ) } }, @@ -119,7 +133,7 @@ public void ThrowsOnMissingPackage() types: new Dictionary() ); - ArgumentException exception = Assert.Throws(() => assembly.GetNativeName("notMyPackage")); + ArgumentException exception = Assert.Throws(() => assembly.GetNativeNamespace("notMyPackage")); Assert.Equal("assembly", exception.ParamName); } @@ -128,7 +142,16 @@ public void ThrowsOnMissingDotNetKey() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId" + )), dependencies: new Dictionary { { @@ -140,8 +163,8 @@ public void ThrowsOnMissingDotNetKey() types: new Dictionary() ); - ArgumentException exception = Assert.Throws(() => assembly.GetNativeName("myPackage")); - Assert.Equal("root", exception.ParamName); + ArgumentException exception = Assert.Throws(() => assembly.GetNativeNamespace("myPackage")); + Assert.Equal("assembly", exception.ParamName); } [Fact(DisplayName = _Prefix + nameof(ThrowsOnEmptyDotNetKey))] @@ -149,14 +172,26 @@ public void ThrowsOnEmptyDotNetKey() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myPackage", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget(" ")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: " ", + packageId: "myPackageId2" + )) ) } }, @@ -164,8 +199,8 @@ public void ThrowsOnEmptyDotNetKey() types: new Dictionary() ); - ArgumentException exception = Assert.Throws(() => assembly.GetNativeName("myPackage")); - Assert.Equal("root", exception.ParamName); + ArgumentException exception = Assert.Throws(() => assembly.GetNativeNamespace("myPackage")); + Assert.Equal("assembly", exception.ParamName); } [Fact(DisplayName = _Prefix + nameof(RetrievesDotNetName))] @@ -173,14 +208,26 @@ public void RetrievesDotNetName() { Assembly assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myPackage", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myPackageNativeName", + packageId: "myPackageId2" + )) ) } }, @@ -188,9 +235,94 @@ public void RetrievesDotNetName() types: new Dictionary() ); - string actual = assembly.GetNativeName("myPackage"); + string actual = assembly.GetNativeNamespace("myPackage"); Assert.Equal("myPackageNativeName", actual); } } + + public class GetMsBuildProperties + { + const string _Prefix = Prefix + nameof(GetMsBuildProperties) + "."; + + public void IncludesAllPresentProperties() + { + Assembly assembly = new Assembly( + name: "my-assembly", + description: "my description", + homepage: "https://www.example.com/", + repository: new Assembly.AssemblyRepository + ( + type: "git", + url: "https://github.com/" + ), + author: new Person + ( + name: "Jane Doe", + roles: new string[] { "Administrator" } + ), + fingerprint: "myFingerprint", + version: "1.2.3", + license: "Apache-2.0", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace", + packageId: "My.PackageId", + title: "My Human Readable Title", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "https://www.example.com/icon.svg" + )) + ); + + IEnumerable actual = assembly.GetMsBuildProperties(); + Assert.Collection(actual, + element => Assert.Equal("netstandard2.0", element.ToString()), + element => Assert.Equal("true", element.ToString()), + element => Assert.Equal("1.2.3", element.ToString()), + element => Assert.Equal("My.PackageId", element.ToString()), + element => Assert.Equal("my description", element.ToString()), + element => Assert.Equal("https://www.example.com/", element.ToString()), + element => Assert.Equal("https://spdx.org/licenses/Apache-2.0.html", element.ToString()), + element => Assert.Equal("Jane Doe", element.ToString()), + element => Assert.Equal("My Human Readable Title", element.ToString()), + element => Assert.Equal("true", element.ToString()), + element => Assert.Equal("key.snk", element.ToString()), + element => Assert.Equal("http://www.example.com/icon.svg", element.ToString()) + ); + } + + public void SkipsNullProperties() + { + Assembly assembly = new Assembly( + description: "my description", + homepage: "https://www.example.com/", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person + ( + name: "Jane Doe", + roles: new string[] { } + ), + fingerprint: "", + license: "Apache-2.0", + name: "my-assembly", + version: "1.2.3", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace", + packageId: "My.PackageId" + )) + ); + + IEnumerable actual = assembly.GetMsBuildProperties(); + Assert.Collection(actual, + element => Assert.Equal("netstandard2.0", element.ToString()), + element => Assert.Equal("true", element.ToString()), + element => Assert.Equal("1.2.3", element.ToString()), + element => Assert.Equal("My.PackageId", element.ToString()), + element => Assert.Equal("my description", element.ToString()), + element => Assert.Equal("https://www.example.com/", element.ToString()), + element => Assert.Equal("https://spdx.org/licenses/Apache-2.0.html", element.ToString()), + element => Assert.Equal("Jane Doe", element.ToString()) + ); + } + } } } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyGeneratorTests.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyGeneratorTests.cs index a7f96acd24..6dae151662 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyGeneratorTests.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/AssemblyGeneratorTests.cs @@ -29,9 +29,10 @@ static string GetProjectFilePath(string dotnetPackage, string dotnetAssembly) return $"{Path.Combine(GetPackageOutputRoot(dotnetPackage), dotnetAssembly)}.csproj"; } - static string GetTypeFilePath(string dotnetPackage, string dotnetType) + static string GetTypeFilePath(string dotnetPackage, string dotnetNamespace, string dotnetType) { - return $"{Path.Combine(GetPackageOutputRoot(dotnetPackage), dotnetType)}.cs"; + string directory = Path.Combine(GetPackageOutputRoot(dotnetPackage), Path.Combine(dotnetNamespace.Split('.'))); + return $"{Path.Combine(directory, dotnetType)}.cs"; } [Fact(DisplayName = Prefix + nameof(AccessesFileSystemThroughShim))] @@ -40,10 +41,22 @@ public void AccessesFileSystemThroughShim() const string json = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", - ""package"": ""aws-cdk-cx-api"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""version"": """", @@ -62,9 +75,9 @@ public void AccessesFileSystemThroughShim() }"; string jsonPath = GetJsonPath("aws-cdk-cx-api"); - string packageOutputRoot = GetPackageOutputRoot("Aws.Cdk.CxApi"); - string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApi", "Aws.Cdk.CxApi"); - string typeFilePath = GetTypeFilePath("Aws.Cdk.CxApi", "MissingContext"); + string packageOutputRoot = GetPackageOutputRoot("Aws.Cdk.CxApiPackageId"); + string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApiPackageId", "Aws.Cdk.CxApiPackageId"); + string typeFilePath = GetTypeFilePath("Aws.Cdk.CxApiPackageId", "Aws.Cdk.CxApiNamespace", "MissingContext"); IDirectory directory = Substitute.For(); directory.Exists(packageOutputRoot).Returns(true, false); @@ -76,15 +89,13 @@ public void AccessesFileSystemThroughShim() fileSystem.Directory.Returns(directory); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); - Symbols.MapNamespace("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApi"); - Symbols.MapTypeName("jsii$aws_cdk_cx_api$.MissingContext", "MissingContext", JsonModel.Spec.TypeKind.Class); + //Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); + Symbols.MapNamespace("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApiNamespace"); + Symbols.MapTypeName("jsii$aws_cdk_cx_api$.MissingContext", "MissingContext", TypeKind.Class); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "", - "", fileSystem ); generator.Generate @@ -107,9 +118,22 @@ public void CopiesJsiiToOutput() const string json = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""version"": """", @@ -126,13 +150,11 @@ public void CopiesJsiiToOutput() fileSystem.Directory.Returns(Substitute.For()); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); + Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApiPackageId"); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "myAuthors", - "myCompany", fileSystem ); generator.Generate @@ -142,7 +164,7 @@ public void CopiesJsiiToOutput() Symbols ); - file.Received().Copy(jsonPath, Path.Combine(OutputRoot, "Aws.Cdk.CxApi", ".jsii")); + file.Received().Copy(jsonPath, Path.Combine(OutputRoot, "Aws.Cdk.CxApiPackageId", ".jsii")); } [Fact(DisplayName = Prefix + nameof(CreatesBasicProjectFile))] @@ -151,10 +173,22 @@ public void CreatesBasicProjectFile() const string json = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", - ""package"": ""aws-cdk-cx-api"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""version"": ""1.2.3"", @@ -162,7 +196,7 @@ public void CreatesBasicProjectFile() }"; string jsonPath = GetJsonPath("aws-cdk-cx-api"); - string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApi", "Aws.Cdk.CxApi"); + string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApiPackageId", "Aws.Cdk.CxApiPackageId"); IFile file = Substitute.For(); file.ReadAllText(jsonPath).Returns(json); @@ -171,13 +205,11 @@ public void CreatesBasicProjectFile() fileSystem.Directory.Returns(Substitute.For()); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); + Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApiPackageId"); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "myAuthors", - "myCompany", fileSystem ); generator.Generate @@ -212,10 +244,22 @@ public void CreatesProjectFileWithDependencies() string json = @"{ ""name"": ""jsii$aws_cdk$"", - ""package"": ""aws-cdk"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk"" + ""namespace"": ""Aws.CdkNamespace"", + ""packageId"": ""Aws.CdkPackageId"" } }, ""version"": ""1.2.3"", @@ -226,7 +270,8 @@ public void CreatesProjectFileWithDependencies() ""version"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApi"", + ""packageId"": ""Aws.Cdk.CxApi"" } } } @@ -235,10 +280,23 @@ public void CreatesProjectFileWithDependencies() string cxJson = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""version"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""types"": {} @@ -246,7 +304,7 @@ public void CreatesProjectFileWithDependencies() string jsonPath = GetJsonPath("aws-cdk"); string cxJsonPath = Path.Combine(Path.GetDirectoryName(jsonPath), "node_modules", "jsii$aws_cdk_cx_api$"); - string projectFilePath = GetProjectFilePath("Aws.Cdk", "Aws.Cdk"); + string projectFilePath = GetProjectFilePath("Aws.CdkPackageId", "Aws.CdkPackageId"); IFile file = Substitute.For(); file.ReadAllText(jsonPath).Returns(json); @@ -259,15 +317,13 @@ public void CreatesProjectFileWithDependencies() fileSystem.Directory.Returns(directory); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk", "Aws.Cdk"); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); - Symbols.MapAssemblyName("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApi"); + Symbols.MapTypeToPackage("aws-cdk", "Aws.CdkPackageId"); + Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApiNamespace"); + Symbols.MapAssemblyName("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApiPackageId"); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "myAuthors", - "myCompany", fileSystem ); generator.Generate @@ -303,9 +359,22 @@ public void CreatesAssemblyInfo() const string json = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""version"": """", @@ -313,7 +382,7 @@ public void CreatesAssemblyInfo() }"; string jsonPath = GetJsonPath("aws-cdk-cx-api"); - string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApi", "Aws.Cdk.CxApi"); + string projectFilePath = GetProjectFilePath("Aws.Cdk.CxApiPackageId", "Aws.Cdk.CxApiPackageId"); IFile file = Substitute.For(); file.ReadAllText(jsonPath).Returns(json); @@ -322,13 +391,11 @@ public void CreatesAssemblyInfo() fileSystem.Directory.Returns(Substitute.For()); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); + Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApiPackageId"); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "myAuthors", - "myCompany", fileSystem ); generator.Generate @@ -338,7 +405,7 @@ public void CreatesAssemblyInfo() Symbols ); - file.Received().WriteAllText(Path.Combine(OutputRoot, "Aws.Cdk.CxApi", "AssemblyInfo.cs"), + file.Received().WriteAllText(Path.Combine(OutputRoot, "Aws.Cdk.CxApiPackageId", "AssemblyInfo.cs"), Arg.Do( code => Assert.Equal( @"using Amazon.JSII.Runtime.Deputy; @@ -357,10 +424,22 @@ public void CreatesBasicTypeFile() const string json = @"{ ""name"": ""jsii$aws_cdk_cx_api$"", - ""package"": ""aws-cdk-cx-api"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""targets"": { ""dotnet"": { - ""namespace"": ""Aws.Cdk.CxApi"" + ""namespace"": ""Aws.Cdk.CxApiNamespace"", + ""packageId"": ""Aws.Cdk.CxApiPackageId"" } }, ""version"": """", @@ -379,7 +458,7 @@ public void CreatesBasicTypeFile() }"; string jsonPath = GetJsonPath("aws-cdk-cx-api"); - string typeFilePath = GetTypeFilePath("Aws.Cdk.CxApi", "MissingContext"); + string typeFilePath = GetTypeFilePath("Aws.Cdk.CxApiPackageId", "Aws.Cdk.CxApiNamespace", "MissingContext"); IFile file = Substitute.For(); file.ReadAllText(jsonPath).Returns(json); @@ -388,15 +467,13 @@ public void CreatesBasicTypeFile() fileSystem.Directory.Returns(Substitute.For()); fileSystem.File.Returns(file); - Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApi"); - Symbols.MapNamespace("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApi"); - Symbols.MapTypeName("jsii$aws_cdk_cx_api$.MissingContext", "MissingContext", JsonModel.Spec.TypeKind.Class); + Symbols.MapTypeToPackage("aws-cdk-cx-api", "Aws.Cdk.CxApiPackageId"); + Symbols.MapNamespace("jsii$aws_cdk_cx_api$", "Aws.Cdk.CxApiNamespace"); + Symbols.MapTypeName("jsii$aws_cdk_cx_api$.MissingContext", "MissingContext", TypeKind.Class); AssemblyGenerator generator = new AssemblyGenerator ( OutputRoot, - "", - "", fileSystem ); generator.Generate @@ -410,7 +487,7 @@ public void CreatesBasicTypeFile() string expected = @"using Amazon.JSII.Runtime.Deputy; -namespace Aws.Cdk.CxApi +namespace Aws.Cdk.CxApiNamespace { [JsiiClass(typeof(MissingContext), ""jsii$aws_cdk_cx_api$.MissingContext"", ""[]"")] public class MissingContext : DeputyBase diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/SymbolMapTests.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/SymbolMapTests.cs index 6b10817e0c..c47707c405 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/SymbolMapTests.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/SymbolMapTests.cs @@ -19,7 +19,16 @@ static ISymbolMap GetSymbolMap(out Assembly assembly, params Type[] types) assembly = new Assembly ( name: "my-package", - targets: new Targets(dotnet: "My.Assembly"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace", + packageId: "My.PackageId" + )), version: "myVersion", types: types.ToDictionary(t => t.FullyQualifiedName) ); @@ -40,7 +49,7 @@ public void LoadsEmptyAssembly() ISymbolMap symbolMap = GetSymbolMap(out Assembly assembly); string actual = symbolMap.GetName(assembly); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.PackageId", actual, ignoreLineEndingDifferences: true); } [Fact(DisplayName = Prefix + nameof(RenamesTypeOnNamespaceConflict))] @@ -66,7 +75,16 @@ public void RenamesTypeOnNamespaceConflict() Assembly assembly = new Assembly ( name: "my-package", - targets: new Targets(dotnet: "MyNamespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace", + packageId: "My.PackageId" + )), version: "myVersion", types: new Dictionary { @@ -101,7 +119,16 @@ public void RenamesTypeOnMemberConflict() Assembly assembly = new Assembly ( name: "my-package", - targets: new Targets(dotnet: "MyNamespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace", + packageId: "My.PackageId" + )), version: "myVersion", types: new Dictionary { @@ -165,18 +192,45 @@ public void DisambiguatesTypeNameOnConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -188,14 +242,14 @@ public void DisambiguatesTypeNameOnConflict() // GetName(Type type) string actual1 = symbolMap.GetName(type1, true); string actual2 = symbolMap.GetName(type2, true); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); // GetName(string fullyQualifiedName) actual1 = symbolMap.GetName("myFqn1", true); actual2 = symbolMap.GetName("myFqn2", true); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); } [Fact(DisplayName = Prefix + nameof(DoesNotDisambiguateTypeNameIfNoConflict))] @@ -221,18 +275,45 @@ public void DoesNotDisambiguateTypeNameIfNoConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -277,18 +358,45 @@ public void DoesNotDisambiguateTypeNameIfFlagNotSet() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -459,18 +567,45 @@ public void DisambiguatesTypeNameOnConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -482,14 +617,14 @@ public void DisambiguatesTypeNameOnConflict() // GetNameSyntaxToken(Type type) string actual1 = symbolMap.GetNameSyntaxToken(type1, true).ToString(); string actual2 = symbolMap.GetNameSyntaxToken(type2, true).ToString(); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); // GetNameSyntaxToken(string fullyQualifiedName) actual1 = symbolMap.GetNameSyntaxToken("myFqn1", true).ToString(); actual2 = symbolMap.GetNameSyntaxToken("myFqn2", true).ToString(); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); } [Fact(DisplayName = Prefix + nameof(DoesNotDisambiguateTypeNameIfNoConflict))] @@ -515,18 +650,45 @@ public void DoesNotDisambiguateTypeNameIfNoConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -571,21 +733,48 @@ public void DoesNotDisambiguateTypeNameIfFlagNotSet() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( - name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), - version: "myVersion", - types: new Dictionary { { type2.FullyQualifiedName, type2 } } - ); + name: "my-package-2", + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), + version: "myVersion", + types: new Dictionary { { type2.FullyQualifiedName, type2 } } + ); ISymbolMap symbolMap = new SymbolMap(); symbolMap.Add(assembly1); @@ -753,18 +942,45 @@ public void DisambiguatesTypeNameOnConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -776,14 +992,14 @@ public void DisambiguatesTypeNameOnConflict() // GetNameSyntax(Type type) string actual1 = symbolMap.GetNameSyntax(type1, true).ToString(); string actual2 = symbolMap.GetNameSyntax(type2, true).ToString(); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); // GetNameSyntax(string fullyQualifiedName) actual1 = symbolMap.GetNameSyntax("myFqn1", true).ToString(); actual2 = symbolMap.GetNameSyntax("myFqn2", true).ToString(); - Assert.Equal("MyNamespace1.MyType", actual1, ignoreLineEndingDifferences: true); - Assert.Equal("MyNamespace2.MyType", actual2, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace1.MyType", actual1, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace2.MyType", actual2, ignoreLineEndingDifferences: true); } [Fact(DisplayName = Prefix + nameof(DoesNotDisambiguateTypeNameIfNoConflict))] @@ -809,18 +1025,45 @@ public void DoesNotDisambiguateTypeNameIfNoConflict() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + version: "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -865,18 +1108,45 @@ public void DoesNotDisambiguateTypeNameIfFlagNotSet() Assembly assembly1 = new Assembly ( name: "my-package-1", - targets: new Targets(dotnet: "MyNamespace1"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace1", + packageId: "My.PackageId1" + )), version: "myVersion", types: new Dictionary { { type1.FullyQualifiedName, type1 } }, dependencies: new Dictionary { - { "my-package-2", new PackageVersion("myVersion", new Targets(dotnet: "MyNamespace2")) } + { + "my-package-2", + new PackageVersion( + "myVersion", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )) + ) + } } ); Assembly assembly2 = new Assembly ( name: "my-package-2", - targets: new Targets(dotnet: "MyNamespace2"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(dotnet: new AssemblyTargets.DotNetTarget( + @namespace: "My.Namespace2", + packageId: "My.PackageId2" + )), version: "myVersion", types: new Dictionary { { type2.FullyQualifiedName, type2 } } ); @@ -1018,7 +1288,7 @@ public void GetsFrameworkNamespaceFromType() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespace(type); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } [Fact(DisplayName = _Prefix + nameof(GetsFrameworkNamespaceFromFqn))] @@ -1036,7 +1306,7 @@ public void GetsFrameworkNamespaceFromFqn() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespace("myFqn"); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } } @@ -1059,7 +1329,7 @@ public void GetsFrameworkNamespaceFromType() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespaceSyntaxToken(type).ToString(); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } [Fact(DisplayName = _Prefix + nameof(GetsFrameworkNamespaceFromFqn))] @@ -1077,7 +1347,7 @@ public void GetsFrameworkNamespaceFromFqn() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespaceSyntaxToken("myFqn").ToString(); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } } @@ -1100,7 +1370,7 @@ public void GetsFrameworkNamespaceFromType() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespaceSyntax(type).ToString(); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } [Fact(DisplayName = _Prefix + nameof(GetsFrameworkNamespaceFromFqn))] @@ -1118,7 +1388,7 @@ public void GetsFrameworkNamespaceFromFqn() ISymbolMap symbolMap = GetSymbolMap(type); string actual = symbolMap.GetNamespaceSyntax("myFqn").ToString(); - Assert.Equal("My.Assembly", actual, ignoreLineEndingDifferences: true); + Assert.Equal("My.Namespace", actual, ignoreLineEndingDifferences: true); } } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/TypeMetadataTests.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/TypeMetadataTests.cs index 1d6809155e..05dc4959d5 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/TypeMetadataTests.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator.UnitTests/TypeMetadataTests.cs @@ -16,14 +16,26 @@ public class Class readonly Assembly _assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myModule", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myPackageNativeName", + packageId: "myPackageId2" + )) ) } }, @@ -152,14 +164,26 @@ public class Enum readonly Assembly _assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myModule", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myPackageNativeName", + packageId: "myPackageId2" + )) ) } }, @@ -258,14 +282,26 @@ public class Interface readonly Assembly _assembly = new Assembly( name: "myName", - targets: new Targets(new Targets.DotNetTarget("myNativeName")), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myNativeName", + packageId: "myPackageId1" + )), dependencies: new Dictionary { { "myModule", new PackageVersion( "0.0.1", - new Targets(new Targets.DotNetTarget("myPackageNativeName")) + new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "myPackageNativeName", + packageId: "myPackageId2" + )) ) } }, diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyExtensions.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyExtensions.cs index af282cc69b..a0e6d82482 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyExtensions.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyExtensions.cs @@ -1,33 +1,91 @@ using Amazon.JSII.JsonModel.Spec; using System; using System.Collections.Generic; +using System.Xml.Linq; namespace Amazon.JSII.Generator { public static class AssemblyExtensions { - public static string GetNativeName(this Assembly assembly, string packageName) + public static string GetNativePackageId(this Assembly assembly, string targetPackageName = null) { assembly = assembly ?? throw new ArgumentNullException(nameof(assembly)); - packageName = packageName ?? throw new ArgumentNullException(nameof(packageName)); - if (packageName == assembly.Name) + string packageId = assembly.GetNativeProperty + ( + assembly.Name, + targetPackageName ?? assembly.Name, + d => d.Targets?.DotNet?.PackageId + ); + + if (string.IsNullOrWhiteSpace(packageId)) + { + throw new ArgumentException + ( + $"Assembly {assembly.Name} does not include a package id mapping for {targetPackageName ?? assembly.Name}", + nameof(assembly) + ); + } + + return packageId; + } + + public static string GetNativeNamespace(this Assembly assembly, string targetPackageName = null) + { + assembly = assembly ?? throw new ArgumentNullException(nameof(assembly)); + + string @namespace = assembly.GetNativeProperty + ( + assembly.Name, + targetPackageName ?? assembly.Name, + d => d.Targets?.DotNet?.Namespace + ); + + if (string.IsNullOrWhiteSpace(@namespace)) { - return assembly.GetNativeName(); + throw new ArgumentException + ( + $"Assembly {assembly.Name} does not include a namespace mapping for {targetPackageName ?? assembly.Name}", + nameof(assembly) + ); } - if (assembly.Dependencies == null) + return @namespace; + } + + public static IEnumerable GetMsBuildProperties(this Assembly assembly) + { + yield return new XElement("TargetFramework", "netstandard2.0"); + yield return new XElement("GeneratePackageOnBuild", true); + yield return new XElement("PackageVersion", assembly.Version); + yield return new XElement("PackageId", assembly.Targets.DotNet.PackageId); + yield return new XElement("Description", assembly.Description); + yield return new XElement("ProjectUrl", assembly.Homepage); + yield return new XElement("LicenseUrl", $"https://spdx.org/licenses/{assembly.License}.html"); + yield return new XElement("Authors", $"{assembly.Author.Name}"); + + // TODO: Update once we have a localization story. + yield return new XElement("Language", "en-US"); + + if (assembly.Targets.DotNet.Title != null) { - throw new ArgumentException($"Assembly '{assembly.Name}' does not define namespace mappings for '{packageName}'", nameof(assembly)); + yield return new XElement("Title", assembly.Targets.DotNet.Title); } - var name = assembly.TryGetNativeName(packageName); - if (string.IsNullOrWhiteSpace(name)) + if (assembly.Targets.DotNet.SignAssembly != null) { - throw new ArgumentException($"Assembly '{assembly.Name}' does not define namespace mappings for '{packageName}'", nameof(assembly)); + yield return new XElement("SignAssembly", assembly.Targets.DotNet.SignAssembly); } - return name; + if (assembly.Targets.DotNet.AssemblyOriginatorKey != null) + { + yield return new XElement("AssemblyOriginatorKey", assembly.Targets.DotNet.AssemblyOriginatorKey); + } + + if (assembly.Targets.DotNet.IconUrl != null) + { + yield return new XElement("IconUrl", assembly.Targets.DotNet.IconUrl); + } } } } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyGenerator.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyGenerator.cs index 46de4f45f2..d6d70abfbe 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyGenerator.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/AssemblyGenerator.cs @@ -23,21 +23,15 @@ namespace Amazon.JSII.Generator public class AssemblyGenerator { readonly string _outputRoot; - readonly string _authors; - readonly string _company; readonly IFileSystem _fileSystem; public AssemblyGenerator ( string outputRoot, - string authors, - string company, IFileSystem fileSystem = null ) { _outputRoot = outputRoot ?? throw new ArgumentNullException(nameof(outputRoot)); - _authors = authors ?? throw new ArgumentNullException(nameof(authors)); - _company = company ?? throw new ArgumentNullException(nameof(company)); _fileSystem = fileSystem ?? new FileSystem(); } @@ -52,7 +46,7 @@ public void Generate(string jsiiFile, string tarballPath, ISymbolMap symbols = n LoadDependencies(assembly, Path.GetDirectoryName(jsiiFile)); - string packageOutputRoot = Path.Combine(_outputRoot, assembly.GetNativeName()); + string packageOutputRoot = Path.Combine(_outputRoot, assembly.GetNativePackageId()); if (_fileSystem.Directory.Exists(packageOutputRoot)) { _fileSystem.Directory.Delete(packageOutputRoot, true); @@ -103,7 +97,7 @@ void Save(string packageOutputRoot, ISymbolMap symbols, Assembly assembly, strin if (assembly.Docs != null) { // TODO: Use Microsoft.Extensions.Logging instead of Console.Error. - Console.Error.WriteLine("Warning: Ignoring documentation comment on assembly ${assembly.Name}. Assembly-level documentation comments are not supported for .NET"); + Console.Error.WriteLine($"Warning: Ignoring documentation comment on assembly {assembly.Name}. Assembly-level documentation comments are not supported for .NET"); } SaveProjectFile(); @@ -119,13 +113,7 @@ void SaveProjectFile() XElement project = new XElement("Project", new XAttribute("Sdk", "Microsoft.NET.Sdk"), - new XElement("PropertyGroup", - new XElement("TargetFramework", "netstandard2.0"), - new XElement("GeneratePackageOnBuild", true), - new XElement("Authors", _authors), - new XElement("Company", _company), - new XElement("PackageVersion", assembly.Version) - ), + new XElement("PropertyGroup", assembly.GetMsBuildProperties()), new XElement("ItemGroup", new XElement("EmbeddedResource", new XAttribute("Include", tarballFileName) @@ -138,7 +126,7 @@ void SaveProjectFile() ), GetDependencies() .Distinct() - .Select(d => new { Package = symbols.GetAssemblyName(d.Key), Version = d.Value.Version}) + .Select(d => new { Package = symbols.GetAssemblyName(d.Key), d.Value.Version}) .Select(d => new XElement("PackageReference", new XAttribute("Include", d.Package), @@ -169,7 +157,7 @@ void SaveProjectFile() project.Save(writer); } - string csProjPath = Path.Combine(packageOutputRoot, $"{assembly.GetNativeName()}.csproj"); + string csProjPath = Path.Combine(packageOutputRoot, $"{assembly.GetNativePackageId()}.csproj"); _fileSystem.File.WriteAllText(csProjPath, builder.ToString()); IEnumerable> GetDependencies() diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/DependencyRootExtensions.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/DependencyRootExtensions.cs index 8063707dc6..19149c549c 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/DependencyRootExtensions.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/DependencyRootExtensions.cs @@ -1,44 +1,32 @@ using Amazon.JSII.JsonModel.Spec; using System; using System.Collections.Generic; +using System.Linq; namespace Amazon.JSII.Generator { public static class DependencyRootExtensions { - public static string GetNativeName(this DependencyRoot root) + internal static string GetNativeProperty( + this DependencyRoot root, + string currentPackageName, + string targetPackageName, + Func selector + ) { root = root ?? throw new ArgumentNullException(nameof(root)); + selector = selector ?? throw new ArgumentNullException(nameof(selector)); + currentPackageName = currentPackageName ?? throw new ArgumentNullException(nameof(currentPackageName)); + targetPackageName = targetPackageName ?? throw new ArgumentNullException(nameof(targetPackageName)); - if (string.IsNullOrWhiteSpace(root.Targets?.DotNet?.Namespace)) + if (currentPackageName == targetPackageName) { - throw new ArgumentException($"Assembly does not contain a .NET namespace mapping", nameof(root)); + return selector(root); } - return root.Targets.DotNet.Namespace; - } - - internal static string TryGetNativeName(this DependencyRoot root, string packageName) - { - if (root.Dependencies == null) - { - return null; - } - if (root.Dependencies.ContainsKey(packageName)) - { - return root.Dependencies[packageName].GetNativeName(); - } - - foreach (PackageVersion dependency in root.Dependencies.Values) - { - string name = dependency.TryGetNativeName(packageName); - if (name != null) - { - return name; - } - } - - return null; + return (root.Dependencies ?? Enumerable.Empty>()) + .Select(kvp => GetNativeProperty(kvp.Value, kvp.Key, targetPackageName, selector)) + .FirstOrDefault(p => p != null); } } } diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/SymbolMap.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/SymbolMap.cs index b328a98ed6..d6820f48e4 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/SymbolMap.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/SymbolMap.cs @@ -27,7 +27,7 @@ public void Add(Assembly assembly) return; } - _assemblyNames[assembly.Name] = assembly.GetNativeName(); + _assemblyNames[assembly.Name] = assembly.GetNativePackageId(); var types = assembly.Types?.Values ?? Enumerable.Empty(); diff --git a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/TypeMetadata.cs b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/TypeMetadata.cs index 91402c1059..3d3d91f359 100644 --- a/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/TypeMetadata.cs +++ b/packages/jsii-dotnet-generator/src/Amazon.JSII.Generator/TypeMetadata.cs @@ -16,7 +16,7 @@ public TypeMetadata(Type type, Assembly assembly) Package = type.Assembly; - Namespace = $"{assembly.GetNativeName(Package)}{type.Namespace.Substring(Package.Length)}"; + Namespace = $"{assembly.GetNativeNamespace(Package)}{type.Namespace.Substring(Package.Length)}"; } public virtual void ResolveTypeNameConflicts(ISet namespaceNames) diff --git a/packages/jsii-dotnet-generator/src/NuGet.config b/packages/jsii-dotnet-generator/src/NuGet.config index 5038d0a46d..c84bdd28da 100644 --- a/packages/jsii-dotnet-generator/src/NuGet.config +++ b/packages/jsii-dotnet-generator/src/NuGet.config @@ -3,11 +3,5 @@ - - diff --git a/packages/jsii-dotnet-generator/src/NuGet.config.vs b/packages/jsii-dotnet-generator/src/NuGet.config.vs new file mode 100644 index 0000000000..f0b88f301d --- /dev/null +++ b/packages/jsii-dotnet-generator/src/NuGet.config.vs @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs index 35af0c6bed..9486f7a018 100644 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs @@ -21,27 +21,80 @@ public void ShouldSerializeAllMembers() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), + description: "My description", + homepage: "http://www.example.com/", + repository: new Assembly.AssemblyRepository( + type: "git", + url: "http://github.com/" + ), + author: new Person( + name: "Jane Doe", + roles: new[] { "Administrator" } + ), + fingerprint: "myFingerprint", version: "myVersion", - types: new Dictionary(), - dependencies : new Dictionary(), + license: "Apache-2.0", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), + dependencies: new Dictionary(), + contributors: new Person[] { + new Person( + name: "John Doe", + roles: new[] { "Contributor" } + ) + }, bundled: new Dictionary(), - docs: new Docs() - + types: new Dictionary(), + docs: new Docs(), + readme: new Readme("myReadme") ); string actual = JsonConvert.SerializeObject(assembly, Formatting.Indented); const string expected = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", + ""description"": ""My description"", + ""homepage"": ""http://www.example.com/"", + ""repository"": { + ""type"": ""git"", + ""url"": ""http://github.com/"" + }, + ""author"": { + ""name"": ""Jane Doe"", + ""roles"": [ + ""Administrator"" + ] + }, + ""fingerprint"": ""myFingerprint"", ""version"": ""myVersion"", - ""types"": {}, + ""license"": ""Apache-2.0"", + ""contributors"": [ + { + ""name"": ""John Doe"", + ""roles"": [ + ""Contributor"" + ] + } + ], ""bundled"": {}, + ""types"": {}, ""docs"": {}, + ""readme"": { + ""markdown"": ""myReadme"" + }, ""dependencies"": {}, ""targets"": { ""dotnet"": { - ""namespace"": ""Dot.Net.Namespace"" + ""namespace"": ""Dot.Net.Namespace"", + ""packageId"": ""Dot.Net.PackageId"", + ""signAssembly"": true, + ""assemblyOriginatorKey"": ""key.snk"", + ""iconUrl"": ""http://www.example.com/icon.png"" } } }"; @@ -55,11 +108,23 @@ public void ShouldThrowOnMissingName() Assert.Throws(() => new Assembly ( name: null, - targets: new Targets("Dot.Net.Namespace"), - version: "myVersion", - types: new Dictionary(), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + version: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), dependencies: new Dictionary(), bundled: new Dictionary(), + types: new Dictionary(), docs: new Docs() )); } @@ -70,8 +135,20 @@ public void ShouldThrowOnMissingVersion() Assert.Throws(() => new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", version: null, + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), types: new Dictionary(), dependencies: new Dictionary(), bundled: new Dictionary(), @@ -85,8 +162,20 @@ public void ShouldNotSerializeMissingDependencies() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), - version: "myVersion", + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + version: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), types: new Dictionary(), dependencies: null, bundled: new Dictionary(), @@ -97,13 +186,29 @@ public void ShouldNotSerializeMissingDependencies() const string expected = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""version"": ""myVersion"", - ""types"": {}, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""bundled"": {}, + ""types"": {}, ""docs"": {}, ""targets"": { ""dotnet"": { - ""namespace"": ""Dot.Net.Namespace"" + ""namespace"": ""Dot.Net.Namespace"", + ""packageId"": ""Dot.Net.PackageId"", + ""signAssembly"": true, + ""assemblyOriginatorKey"": ""key.snk"", + ""iconUrl"": ""http://www.example.com/icon.png"" } } }"; @@ -117,8 +222,20 @@ public void ShouldNotSerializeMissingBundled() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), - version: "myVersion", + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + version: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), types: new Dictionary(), dependencies: new Dictionary(), bundled: null, @@ -129,13 +246,29 @@ public void ShouldNotSerializeMissingBundled() const string expected = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""version"": ""myVersion"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""types"": {}, ""docs"": {}, ""dependencies"": {}, ""targets"": { ""dotnet"": { - ""namespace"": ""Dot.Net.Namespace"" + ""namespace"": ""Dot.Net.Namespace"", + ""packageId"": ""Dot.Net.PackageId"", + ""signAssembly"": true, + ""assemblyOriginatorKey"": ""key.snk"", + ""iconUrl"": ""http://www.example.com/icon.png"" } } }"; @@ -149,8 +282,20 @@ public void ShouldNotSerializeMissingDocs() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), - version: "myVersion", + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + version: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId", + signAssembly: true, + assemblyOriginatorKey: "key.snk", + iconUrl: "http://www.example.com/icon.png" + )), types: new Dictionary(), dependencies: new Dictionary(), bundled: new Dictionary(), @@ -161,13 +306,29 @@ public void ShouldNotSerializeMissingDocs() const string expected = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""version"": ""myVersion"", - ""types"": {}, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""bundled"": {}, + ""types"": {}, ""dependencies"": {}, ""targets"": { ""dotnet"": { - ""namespace"": ""Dot.Net.Namespace"" + ""namespace"": ""Dot.Net.Namespace"", + ""packageId"": ""Dot.Net.PackageId"", + ""signAssembly"": true, + ""assemblyOriginatorKey"": ""key.snk"", + ""iconUrl"": ""http://www.example.com/icon.png"" } } }"; @@ -186,7 +347,19 @@ public void ShouldDeserializeAllMembers() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", ""version"": ""myVersion"", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""bundled"": {}, @@ -211,7 +384,19 @@ public void ShouldDeserializeAllMembersWithNoTypes() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", ""version"": ""myVersion"", + ""license"": """", ""dependencies"": {}, ""bundled"": {}, ""docs"": {} @@ -237,10 +422,28 @@ public void ShouldDeserializeAllMembersWithDotNetTarget() ""schema"": ""jsii/1.0"", ""name"": ""myName"", ""targets"": { - ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" }, + ""dotnet"": { + ""namespace"": ""Dot.Net.Namespace"", + ""packageId"": ""Dot.Net.PackageId"", + ""signAssembly"": true, + ""assemblyOriginatorKey"": ""key.snk"", + ""iconUrl"": ""http://www.example.com/icon.png"" + }, ""java"": { ""package"": ""com.amazonaws.cdk.Test"" } }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", ""version"": ""myVersion"", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""bundled"": {}, @@ -251,7 +454,15 @@ public void ShouldDeserializeAllMembersWithDotNetTarget() Assert.Equal("jsii/1.0", actual.Schema, ignoreLineEndingDifferences: true); Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true); - Assert.Equal("AWS.Cdk.Test", actual.Targets.DotNet?.Namespace); + + AssemblyTargets.DotNetTarget dotNetTarget = actual.Targets.DotNet; + Assert.NotNull(dotNetTarget); + Assert.Equal("Dot.Net.Namespace", dotNetTarget.Namespace); + Assert.Equal("Dot.Net.PackageId", dotNetTarget.PackageId); + Assert.True(dotNetTarget.SignAssembly); + Assert.Equal("key.snk", dotNetTarget.AssemblyOriginatorKey); + Assert.Equal("http://www.example.com/icon.png", dotNetTarget.IconUrl); + Assert.Equal("myVersion", actual.Version, ignoreLineEndingDifferences: true); Assert.Empty(actual.Types); Assert.Empty(actual.Dependencies); @@ -264,8 +475,25 @@ public void ShouldThrowOnMissingName() { const string json = @"{ ""schema"": ""jsii/1.0"", - ""targets"": { ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" } }, - ""version"": ""myVersion"", + ""targets"": { + ""dotnet"": { + ""namespace"": ""AWS.Cdk.Test"", + ""packageId"": ""AWS.Cdk.Test"" + } + }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""bundled"": {}, @@ -281,7 +509,19 @@ public void ShouldThrowOnMissingDotNetTarget() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""version"": ""myVersion"", + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""targets"": {}, ""types"": {}, ""dependencies"": {}, @@ -298,7 +538,24 @@ public void ShouldThrowOnMissingVersion() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""targets"": { ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" } }, + ""targets"": { + ""dotnet"": { + ""namespace"": ""AWS.Cdk.Test"", + ""packageId"": ""AWS.Cdk.Test"" + } + }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""bundled"": {}, @@ -314,8 +571,25 @@ public void ShouldNotDeserializeMissingDependencies() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""targets"": { ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" } }, - ""version"": ""myVersion"", + ""targets"": { + ""dotnet"": { + ""namespace"": ""AWS.Cdk.Test"", + ""packageId"": ""AWS.Cdk.Test"" + } + }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""types"": {}, ""bundled"": {}, ""docs"": {} @@ -331,8 +605,25 @@ public void ShouldNotDeserializeMissingBundled() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""targets"": { ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" } }, - ""version"": ""myVersion"", + ""targets"": { + ""dotnet"": { + ""namespace"": ""AWS.Cdk.Test"", + ""packageId"": ""AWS.Cdk.Test"" + } + }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""docs"": {} @@ -348,8 +639,25 @@ public void ShouldNotDeserializeMissingDocs() const string json = @"{ ""schema"": ""jsii/1.0"", ""name"": ""myName"", - ""targets"": { ""dotnet"": { ""namespace"": ""AWS.Cdk.Test"" } }, - ""version"": ""myVersion"", + ""targets"": { + ""dotnet"": { + ""namespace"": ""AWS.Cdk.Test"", + ""packageId"": ""AWS.Cdk.Test"" + } + }, + ""description"": """", + ""homepage"": """", + ""repository"": { + ""type"": """", + ""url"": """" + }, + ""author"": { + ""name"": """", + ""roles"": [] + }, + ""fingerprint"": """", + ""version"": """", + ""license"": """", ""types"": {}, ""dependencies"": {}, ""bundled"": {} diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs index db540c5313..a58f1521c2 100644 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs @@ -29,21 +29,21 @@ public override void WriteJson(JsonWriter writer, object value, JsonSerializer s { case TypeKind.Enum: { - EnumType derivedType = value as EnumType ?? throw new ArgumentException($"Value has type kind '${type.Kind}', but is not an instance of {nameof(EnumType)}", nameof(value)); + EnumType derivedType = value as EnumType ?? throw new ArgumentException($"Value has type kind '{type.Kind}', but is not an instance of {nameof(EnumType)}", nameof(value)); string json = JsonConvert.SerializeObject(derivedType); writer.WriteRawValue(json); break; } case TypeKind.Class: { - ClassType derivedType = value as ClassType ?? throw new ArgumentException($"Value has type kind '${type.Kind}', but is not an instance of {nameof(ClassType)}", nameof(value)); + ClassType derivedType = value as ClassType ?? throw new ArgumentException($"Value has type kind '{type.Kind}', but is not an instance of {nameof(ClassType)}", nameof(value)); string json = JsonConvert.SerializeObject(derivedType); writer.WriteRawValue(json); break; } case TypeKind.Interface: { - InterfaceType derivedType = value as InterfaceType ?? throw new ArgumentException($"Value has type kind '${type.Kind}', but is not an instance of {nameof(InterfaceType)}", nameof(value)); + InterfaceType derivedType = value as InterfaceType ?? throw new ArgumentException($"Value has type kind '{type.Kind}', but is not an instance of {nameof(InterfaceType)}", nameof(value)); string json = JsonConvert.SerializeObject(derivedType); writer.WriteRawValue(json); break; diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs index 85627d0dd8..bcb6bc7fa8 100644 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs @@ -8,22 +8,52 @@ namespace Amazon.JSII.JsonModel.Spec [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class Assembly : DependencyRoot, IDocumentable { + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public class AssemblyRepository + { + public AssemblyRepository(string type, string url) + { + Type = type ?? throw new ArgumentNullException(nameof(type)); + Url = url ?? throw new ArgumentNullException(nameof(url)); + } + + [JsonProperty("type")] + public string Type { get; } + + [JsonProperty("url")] + public string Url { get; } + } + public Assembly ( string name, + string description, + string homepage, + AssemblyRepository repository, + Person author, + string fingerprint, string version, - IDictionary types = null, - Targets targets = null, + string license, + AssemblyTargets targets = null, IDictionary dependencies = null, + Person[] contributors = null, IDictionary bundled = null, + IDictionary types = null, Docs docs = null, Readme readme = null ): base(targets, dependencies) { Name = name ?? throw new ArgumentNullException(nameof(name)); + Description = description ?? throw new ArgumentNullException(nameof(description)); + Homepage = homepage ?? throw new ArgumentNullException(nameof(homepage)); + Repository = repository ?? throw new ArgumentNullException(nameof(repository)); + Author = author ?? throw new ArgumentNullException(nameof(author)); + Fingerprint = fingerprint ?? throw new ArgumentNullException(nameof(fingerprint)); Version = version ?? throw new ArgumentNullException(nameof(version)); - Types = types; + License = license ?? throw new ArgumentNullException(nameof(license)); + Contributors = contributors; Bundled = bundled; + Types = types; Docs = docs; Readme = readme; } @@ -34,16 +64,37 @@ public Assembly [JsonProperty("name")] public string Name { get; } + [JsonProperty("description")] + public string Description { get; } + + [JsonProperty("homepage")] + public string Homepage { get; } + + [JsonProperty("repository")] + public AssemblyRepository Repository { get; } + + [JsonProperty("author")] + public Person Author { get; } + + [JsonProperty("fingerprint")] + public string Fingerprint { get; } + [JsonProperty("version")] public string Version { get; } - [JsonProperty("types", ItemConverterType = typeof(TypeConverter))] - [JsonConverter(typeof(TypeDictionaryConverter))] - public IDictionary Types { get; } + [JsonProperty("license")] + public string License { get; } + + [JsonProperty("contributors", NullValueHandling = NullValueHandling.Ignore)] + public Person[] Contributors { get; } [JsonProperty("bundled", NullValueHandling = NullValueHandling.Ignore)] public IDictionary Bundled { get; } + [JsonProperty("types", ItemConverterType = typeof(TypeConverter))] + [JsonConverter(typeof(TypeDictionaryConverter))] + public IDictionary Types { get; } + [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] public Docs Docs { get; } diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs new file mode 100644 index 0000000000..a7c27f3753 --- /dev/null +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs @@ -0,0 +1,59 @@ +using Newtonsoft.Json; +using System; +using System.Collections.Generic; + +namespace Amazon.JSII.JsonModel.Spec +{ + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public class AssemblyTargets + { + public AssemblyTargets(DotNetTarget dotnet, IDictionary others = null) + { + DotNet = dotnet ?? throw new ArgumentNullException(nameof(dotnet)); + } + + [JsonProperty("dotnet", NullValueHandling = NullValueHandling.Ignore)] + public DotNetTarget DotNet { get; } + + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public class DotNetTarget + { + public DotNetTarget + ( + string @namespace, + string packageId, + string title = null, + bool? signAssembly = null, + string assemblyOriginatorKey = null, + string iconUrl = null + ) + { + Namespace = @namespace ?? throw new ArgumentNullException(nameof(@namespace)); + PackageId = packageId ?? throw new ArgumentNullException(nameof(packageId)); + + Title = title; + SignAssembly = signAssembly; + AssemblyOriginatorKey = assemblyOriginatorKey; + IconUrl = iconUrl; + } + + [JsonProperty("namespace")] + public string Namespace { get; } + + [JsonProperty("packageId")] + public string PackageId { get; } + + [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] + public string Title { get; } + + [JsonProperty("signAssembly", NullValueHandling = NullValueHandling.Ignore)] + public bool? SignAssembly { get; } + + [JsonProperty("assemblyOriginatorKey", NullValueHandling = NullValueHandling.Ignore)] + public string AssemblyOriginatorKey { get; } + + [JsonProperty("iconUrl", NullValueHandling = NullValueHandling.Ignore)] + public string IconUrl { get; } + } + } +} diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs index ff7af5c841..30edd79aa0 100644 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs @@ -8,7 +8,7 @@ public abstract class DependencyRoot { public DependencyRoot ( - Targets targets = null, + AssemblyTargets targets = null, IDictionary dependencies = null ) { @@ -20,6 +20,6 @@ public DependencyRoot public IDictionary Dependencies { get; } [JsonProperty("targets")] - public Targets Targets { get; } + public AssemblyTargets Targets { get; } } } diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs index 55b38a4854..7ffec179ef 100644 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs @@ -10,7 +10,7 @@ public class PackageVersion: DependencyRoot public PackageVersion ( string version, - Targets targets = null, + AssemblyTargets targets = null, IDictionary dependencies = null ): base(targets, dependencies) { diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs new file mode 100644 index 0000000000..cba11d02c1 --- /dev/null +++ b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs @@ -0,0 +1,40 @@ +using Newtonsoft.Json; +using System; + +namespace Amazon.JSII.JsonModel.Spec +{ + [JsonObject(MemberSerialization = MemberSerialization.OptIn)] + public class Person + { + public Person + ( + string name, + string[] roles, + string email = null, + string url = null, + bool? organization = null + ) + { + Name = name ?? throw new ArgumentNullException(nameof(name)); + Roles = roles ?? throw new ArgumentNullException(nameof(roles)); + Email = email; + Url = url; + Organization = organization; + } + + [JsonProperty("name")] + public string Name { get; } + + [JsonProperty("roles")] + public string[] Roles { get; } + + [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] + public string Email { get; } + + [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] + public string Url { get; } + + [JsonProperty("organization", NullValueHandling = NullValueHandling.Ignore)] + public bool? Organization { get; } + } +} diff --git a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Targets.cs b/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Targets.cs deleted file mode 100644 index d69de250aa..0000000000 --- a/packages/jsii-dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Targets.cs +++ /dev/null @@ -1,40 +0,0 @@ -using Newtonsoft.Json; -using System; -using System.Collections.Generic; - -namespace Amazon.JSII.JsonModel.Spec -{ - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public class Targets - { - public Targets(DotNetTarget dotnet, IDictionary others = null) - { - DotNet = dotnet ?? throw new ArgumentNullException(nameof(dotnet)); - } - - [JsonProperty("dotnet", NullValueHandling = NullValueHandling.Ignore)] - public DotNetTarget DotNet { get; } - - [JsonObject(MemberSerialization = MemberSerialization.OptIn)] - public class DotNetTarget - { - public DotNetTarget(string @namespace) - { - Namespace = @namespace ?? throw new ArgumentNullException(nameof(@namespace)); - } - - public static implicit operator DotNetTarget(string @namespace) - { - return new DotNetTarget(@namespace); - } - - public static implicit operator string(DotNetTarget target) - { - return target.Namespace; - } - - [JsonProperty("namespace")] - public string Namespace { get; } - } - } -} diff --git a/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj b/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj index 65b3ec2c10..00b3f51d7f 100644 --- a/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj +++ b/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj @@ -7,7 +7,7 @@ - + diff --git a/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs b/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs index 1ee3dcacfe..0b09b30c51 100644 --- a/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs +++ b/packages/jsii-dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs @@ -1,9 +1,9 @@ using Amazon.JSII.Runtime.Deputy; using Amazon.JSII.Runtime.Services; -using Amazon.JSII.Tests.Calculator; -using Amazon.JSII.Tests.Calculator.composition; -using Amazon.JSII.Tests.Calculator.composition.CompositeOperation; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace; +using Amazon.JSII.Tests.CalculatorNamespace.composition; +using Amazon.JSII.Tests.CalculatorNamespace.composition.CompositeOperation; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -190,9 +190,9 @@ public void UnionTypes() public void CreateObjectAndCtorOverloads() { // TODO: Generator should create a parameterless constructor. - new Calculator_(new CalculatorProps()); + new Calculator(new CalculatorProps()); - new Calculator_(new CalculatorProps + new Calculator(new CalculatorProps { MaximumValue = 10 }); @@ -215,7 +215,7 @@ public void GetSetPrimitiveProperties() public void CallMethods() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Add(10); Assert.Equal((double)10, calc.Value); @@ -234,7 +234,7 @@ public void CallMethods() public void UnmarkshallIntoAbstractType() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Add(120); Value_ value = calc.Curr; @@ -245,7 +245,7 @@ public void UnmarkshallIntoAbstractType() public void GetAndSetNotPrimitiveProperties() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Add(3200000); calc.Neg(); @@ -257,7 +257,7 @@ public void GetAndSetNotPrimitiveProperties() public void GetAndSetEnumValues() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Add(9); calc.Pow(3); @@ -282,7 +282,7 @@ public void UseEnumFromScopedModule() public void UndefinedAndNull() { // TODO: Generator should create a parameterless constructor. - Calculator_ calculator = new Calculator_(new CalculatorProps()); + Calculator calculator = new Calculator(new CalculatorProps()); Assert.Null(calculator.MaxValue); calculator.MaxValue = null; @@ -303,7 +303,7 @@ public void Arrays() public void Maps() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Add(10); calc.Add(20); @@ -322,7 +322,7 @@ public void Maps() [Fact(DisplayName = Prefix + nameof(FluentApi))] public void FluentApi() { - Calculator_ calc = new Calculator_(new CalculatorProps + Calculator calc = new Calculator(new CalculatorProps { InitialValue = 20, MaximumValue = 30, @@ -334,7 +334,7 @@ public void FluentApi() [Fact(DisplayName = Prefix + nameof(Exceptions))] public void Exceptions() { - Calculator_ calc = new Calculator_(new CalculatorProps + Calculator calc = new Calculator(new CalculatorProps { InitialValue = 20, MaximumValue = 30, @@ -354,7 +354,7 @@ public void Exceptions() public void UnionProperties() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.UnionProperty = new Multiply(new Number(9), new Number(3)); Assert.IsType(calc.UnionProperty); @@ -368,7 +368,7 @@ public void UnionProperties() public void SubClassing() { // TODO: Generator should create a parameterless constructor. - Calculator_ calc = new Calculator_(new CalculatorProps()); + Calculator calc = new Calculator(new CalculatorProps()); calc.Curr = new AddTen(33); calc.Neg(); diff --git a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/ClientTests.cs b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/ClientTests.cs index d5e7cbda4e..d75f82bc29 100644 --- a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/ClientTests.cs +++ b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Client/ClientTests.cs @@ -99,7 +99,16 @@ public void LoadsBasicPackage() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[]{ }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId" + )), version: "myVersion", types: new Dictionary() ); @@ -123,7 +132,16 @@ public void DoesNotLoadPackageMultipleTimes() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId" + )), version: "myVersion", types: new Dictionary() ); @@ -167,7 +185,16 @@ public void SendsAndReceives() Assembly assembly = new Assembly ( name: "myName", - targets: new Targets("Dot.Net.Namespace"), + description: "", + homepage: "", + repository: new Assembly.AssemblyRepository(type: "", url: ""), + author: new Person(name: "", roles: new string[] { }), + fingerprint: "", + license: "", + targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( + @namespace: "Dot.Net.Namespace", + packageId: "Dot.Net.PackageId" + )), version: "myVersion", types: new Dictionary() ); diff --git a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj index 726c8a2cc0..dbc76c4b9b 100644 --- a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj +++ b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj @@ -13,7 +13,6 @@ - diff --git a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs index 8a9fddca4a..0a073cd659 100644 --- a/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs +++ b/packages/jsii-dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs @@ -168,7 +168,7 @@ public void LoadPackage(string package, string version, string tarballPath) return; } - _logger.LogDebug($"Loading package {package}@${version}..."); + _logger.LogDebug($"Loading package {package}@{version}..."); _loadedPackages.Add(package); LoadResponse response = Load(package, version, tarballPath); diff --git a/packages/jsii-dotnet-runtime/src/NuGet.config b/packages/jsii-dotnet-runtime/src/NuGet.config index 1d4bf7e6ba..7958051028 100644 --- a/packages/jsii-dotnet-runtime/src/NuGet.config +++ b/packages/jsii-dotnet-runtime/src/NuGet.config @@ -3,12 +3,6 @@ - - diff --git a/packages/jsii-dotnet-runtime/src/NuGet.config.vs b/packages/jsii-dotnet-runtime/src/NuGet.config.vs new file mode 100644 index 0000000000..f0b88f301d --- /dev/null +++ b/packages/jsii-dotnet-runtime/src/NuGet.config.vs @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/jsii-kernel/test/test.kernel.ts b/packages/jsii-kernel/test/test.kernel.ts index 9905b8ebd7..92a963e86f 100644 --- a/packages/jsii-kernel/test/test.kernel.ts +++ b/packages/jsii-kernel/test/test.kernel.ts @@ -225,7 +225,10 @@ defineTest('naming allows returns the module name for different languages', asyn package: 'software.amazon.jsii.tests.calculator', maven: { groupId: 'software.amazon.jsii.tests', artifactId: 'calculator' } }, - dotnet: { namespace: 'Amazon.JSII.Tests.Calculator' }, + dotnet: { + namespace: 'Amazon.JSII.Tests.CalculatorNamespace', + packageId: 'Amazon.JSII.Tests.CalculatorPackageId', + }, js: { npm: 'jsii-calc' } }); test.deepEqual(sandbox.naming({ assembly: '@scope/jsii-calc-lib' }).naming, { @@ -233,7 +236,10 @@ defineTest('naming allows returns the module name for different languages', asyn package: 'software.amazon.jsii.tests.calculator.lib', maven: { groupId: 'software.amazon.jsii.tests', artifactId: 'calculator-lib' } }, - dotnet: { namespace: 'Amazon.JSII.Tests.Calculator.Lib' }, + dotnet: { + namespace: 'Amazon.JSII.Tests.CalculatorNamespace.LibNamespace', + packageId: 'Amazon.JSII.Tests.CalculatorPackageId.LibPackageId' + }, js: { npm: '@scope/jsii-calc-lib' } }); }); diff --git a/packages/jsii-pacmak/lib/targets/dotnet.ts b/packages/jsii-pacmak/lib/targets/dotnet.ts index 53b2550885..7789b94e56 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet.ts @@ -19,8 +19,8 @@ export default class Dotnet extends Target { await this.generateNuGetConfigForLocalDeps(sourceDir, outDir); const pkg = await fs.readJson(path.join(this.packageDir, 'package.json')); - const namespace: string = pkg.jsii.targets.dotnet.namespace; - const project: string = path.join(namespace, `${namespace}.csproj`); + const packageId: string = pkg.jsii.targets.dotnet.packageId; + const project: string = path.join(packageId, `${packageId}.csproj`); await shell( 'dotnet', @@ -28,7 +28,7 @@ export default class Dotnet extends Target { { cwd: sourceDir } ); - await this.copyFiles(path.join(sourceDir, namespace, 'bin', 'Release'), outDir); + await this.copyFiles(path.join(sourceDir, packageId, 'bin', 'Release'), outDir); await fs.remove(path.join(outDir, 'netstandard2.0')); } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Amazon.JSII.Tests.Calculator.Base.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Amazon.JSII.Tests.Calculator.Base.csproj deleted file mode 100644 index 35458d19f4..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Amazon.JSII.Tests.Calculator.Base.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - netstandard2.0 - true - - - 0.6.4 - - - - - - - - - \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/.jsii b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii similarity index 84% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/.jsii rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii index 10fc400e79..3209725ad2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/.jsii +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/.jsii @@ -11,7 +11,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -27,7 +28,7 @@ "version": "0.6.4" } }, - "description": "@scope/jsii-calc-base", + "description": "An example direct dependency for jsii-calc.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "@scope/jsii-calc-base", @@ -38,7 +39,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -100,5 +102,5 @@ } }, "version": "0.6.4", - "fingerprint": "b+UZfT/No0vxqTQ1n3lIsyw7olqARDbeGj853lNFoE8=" + "fingerprint": "3lcys0/Cd5ZbPR/CXccsL3Fdb66mNsVBs8jb+ySL0oU=" } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj new file mode 100644 index 0000000000..7fbcf0b4d3 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj @@ -0,0 +1,20 @@ + + + netstandard2.0 + true + 0.6.4 + Amazon.JSII.Tests.CalculatorPackageId.BasePackageId + An example direct dependency for jsii-calc. + https://github.com/awslabs/jsii.git + https://spdx.org/licenses/Apache-2.0.html + Amazon Web Services + en-US + + + + + + + + + \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Base_.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs similarity index 56% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Base_.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs index 16fed2e836..c38472e6b3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/Base_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs @@ -1,20 +1,20 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Base +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { /// A base class. - [JsiiClass(typeof(Base_), "@scope/jsii-calc-base.Base", "[]")] - public abstract class Base_ : DeputyBase + [JsiiClass(typeof(Base), "@scope/jsii-calc-base.Base", "[]")] + public abstract class Base : DeputyBase { - protected Base_(): base(new DeputyProps(new object[]{})) + protected Base(): base(new DeputyProps(new object[]{})) { } - protected Base_(ByRefValue reference): base(reference) + protected Base(ByRefValue reference): base(reference) { } - protected Base_(DeputyProps props): base(props) + protected Base(DeputyProps props): base(props) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs similarity index 76% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BaseProps.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs index a12f87e754..ca632c90f6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.BaseOfBase; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; -namespace Amazon.JSII.Tests.Calculator.Base +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { public class BaseProps : DeputyBase, IBaseProps { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BasePropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs similarity index 85% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BasePropsProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs index c33d4cfa75..5a291279e5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/BasePropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.BaseOfBase; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; -namespace Amazon.JSII.Tests.Calculator.Base +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiInterfaceProxy(typeof(IBaseProps), "@scope/jsii-calc-base.BaseProps")] internal class BasePropsProxy : DeputyBase, IBaseProps diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/IBaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs similarity index 70% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/IBaseProps.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs index 2c4f062285..d368d084c4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/IBaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.BaseOfBase; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; -namespace Amazon.JSII.Tests.Calculator.Base +namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiInterface(typeof(IBaseProps), "@scope/jsii-calc-base.BaseProps")] public interface IBaseProps : IVeryBaseProps diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/AssemblyInfo.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/AssemblyInfo.cs similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/AssemblyInfo.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/AssemblyInfo.cs diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/scope-jsii-calc-base-0.6.4.tgz b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.6.4.tgz similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.Calculator.Base/scope-jsii-calc-base-0.6.4.tgz rename to packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.6.4.tgz diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/java/pom.xml b/packages/jsii-pacmak/test/expected.jsii-calc-base/java/pom.xml index 991615030c..1ef6a95bd7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/java/pom.xml +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/java/pom.xml @@ -2,7 +2,7 @@ 4.0.0 ${project.groupId}:${project.artifactId} - @scope/jsii-calc-base + An example direct dependency for jsii-calc. https://github.com/awslabs/jsii.git diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Amazon.JSII.Tests.Calculator.Lib.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Amazon.JSII.Tests.Calculator.Lib.csproj deleted file mode 100644 index 05e9e9a7ce..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Amazon.JSII.Tests.Calculator.Lib.csproj +++ /dev/null @@ -1,17 +0,0 @@ - - - netstandard2.0 - true - - - 0.6.4 - - - - - - - - - - \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/.jsii b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/.jsii similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/.jsii rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/.jsii index 1a5b1f9174..94d0c8912e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/.jsii +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/.jsii @@ -13,7 +13,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -31,7 +32,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -47,7 +49,7 @@ "version": "0.6.4" } }, - "description": "@scope/jsii-calc-lib", + "description": "A simple calcuator library built on JSII.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "@scope/jsii-calc-lib", @@ -58,7 +60,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Lib" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId" }, "java": { "maven": { @@ -315,5 +318,5 @@ } }, "version": "0.6.4", - "fingerprint": "MHdlbqyf1RV6moIHslfpKnl7yjQoYVvvZLfxFXWihrU=" + "fingerprint": "jA30G5c81DZXD/7DMYLvdlY8XwEevVQAMAwkUBmPE64=" } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj new file mode 100644 index 0000000000..dbc7b2681e --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj @@ -0,0 +1,21 @@ + + + netstandard2.0 + true + 0.6.4 + Amazon.JSII.Tests.CalculatorPackageId.LibPackageId + A simple calcuator library built on JSII. + https://github.com/awslabs/jsii.git + https://spdx.org/licenses/Apache-2.0.html + Amazon Web Services + en-US + + + + + + + + + + \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/EnumFromScopedModule.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs similarity index 87% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/EnumFromScopedModule.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs index 0b5699377b..2d3681175f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/EnumFromScopedModule.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Check that enums from @scoped packages can be references. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IFriendlyProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IFriendlyProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs index bd58c33405..95ac50beeb 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IFriendlyProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Applies to classes that are considered friendly. These classes can be greeted with diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IIFriendly.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IIFriendly.cs similarity index 89% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IIFriendly.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IIFriendly.cs index 9d9be8fbc3..98b3e77d6e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IIFriendly.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IIFriendly.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Applies to classes that are considered friendly. These classes can be greeted with diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IMyFirstStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IMyFirstStruct.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs index e63e79c604..bce17c0c8e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IMyFirstStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is the first struct we have created in jsii [JsiiInterface(typeof(IMyFirstStruct), "@scope/jsii-calc-lib.MyFirstStruct")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IStructWithOnlyOptionals.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IStructWithOnlyOptionals.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs index 9a8847b67d..a9f6753b6d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/IStructWithOnlyOptionals.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. [JsiiInterface(typeof(IStructWithOnlyOptionals), "@scope/jsii-calc-lib.StructWithOnlyOptionals")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStruct.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs index 1e9ed2f82c..4c0220666b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is the first struct we have created in jsii public class MyFirstStruct : DeputyBase, IMyFirstStruct diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStructProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs index 6f7647a9b1..10ed352430 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/MyFirstStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is the first struct we have created in jsii [JsiiInterfaceProxy(typeof(IMyFirstStruct), "@scope/jsii-calc-lib.MyFirstStruct")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Number.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Number.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs index 9da338c951..f86323d0cc 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Number.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Represents a concrete number. [JsiiClass(typeof(Number), "@scope/jsii-calc-lib.Number", "[{\"name\":\"value\",\"type\":{\"primitive\":\"number\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Operation.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs similarity index 91% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Operation.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs index b1a6d17fd2..f1127303fe 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Operation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Represents an operation on values. [JsiiClass(typeof(Operation), "@scope/jsii-calc-lib.Operation", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionals.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionals.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs index ea58ecce4c..9dc1bdca83 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionals.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. public class StructWithOnlyOptionals : DeputyBase, IStructWithOnlyOptionals diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionalsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionalsProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs index 31df3854fa..da65e4918b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/StructWithOnlyOptionalsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. [JsiiInterfaceProxy(typeof(IStructWithOnlyOptionals), "@scope/jsii-calc-lib.StructWithOnlyOptionals")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Value_.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs similarity index 85% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Value_.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs index f6937cabdc..b6d5a90866 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/Value_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs @@ -1,11 +1,11 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Base; +using Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace; -namespace Amazon.JSII.Tests.Calculator.Lib +namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Abstract class which represents a numeric value. [JsiiClass(typeof(Value_), "@scope/jsii-calc-lib.Value", "[]")] - public abstract class Value_ : Base_ + public abstract class Value_ : Base { protected Value_(): base(new DeputyProps(new object[]{})) { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/AssemblyInfo.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/AssemblyInfo.cs similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/AssemblyInfo.cs rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/AssemblyInfo.cs diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/scope-jsii-calc-lib-0.6.4.tgz b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.6.4.tgz similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.Calculator.Lib/scope-jsii-calc-lib-0.6.4.tgz rename to packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.6.4.tgz diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/java/pom.xml b/packages/jsii-pacmak/test/expected.jsii-calc-lib/java/pom.xml index 84e9c92e2d..cb381a781b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/java/pom.xml +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/java/pom.xml @@ -2,7 +2,7 @@ 4.0.0 ${project.groupId}:${project.artifactId} - @scope/jsii-calc-lib + A simple calcuator library built on JSII. https://github.com/awslabs/jsii.git diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Amazon.JSII.Tests.Calculator.csproj b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Amazon.JSII.Tests.Calculator.csproj deleted file mode 100644 index 4945db4766..0000000000 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Amazon.JSII.Tests.Calculator.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - netstandard2.0 - true - - - 0.6.4 - - - - - - - - - - - - - \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/.jsii b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii similarity index 98% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/.jsii rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii index 6702d14432..f57bded816 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/.jsii +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/.jsii @@ -39,7 +39,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -57,7 +58,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -79,7 +81,8 @@ "@scope/jsii-calc-base-of-base": { "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.BaseOfBase" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId" }, "java": { "maven": { @@ -97,7 +100,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Base" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.BasePackageId" }, "java": { "maven": { @@ -115,7 +119,8 @@ }, "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator.Lib" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace.LibNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId.LibPackageId" }, "java": { "maven": { @@ -131,7 +136,7 @@ "version": "0.6.4" } }, - "description": "jsii-calc", + "description": "A simple calcuator built on JSII.", "homepage": "https://github.com/awslabs/jsii.git", "license": "Apache-2.0", "name": "jsii-calc", @@ -145,7 +150,8 @@ "schema": "jsii/1.0", "targets": { "dotnet": { - "namespace": "Amazon.JSII.Tests.Calculator" + "namespace": "Amazon.JSII.Tests.CalculatorNamespace", + "packageId": "Amazon.JSII.Tests.CalculatorPackageId" }, "java": { "maven": { @@ -2820,5 +2826,5 @@ } }, "version": "0.6.4", - "fingerprint": "V1fwQARJzmO/FTBQutFnq1v95it317kCGVv350RLqYo=" + "fingerprint": "gKUNI8uBG+ge5Ccbk0ay+JZ+j4C/4hPATR3jvtVm0Po=" } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj new file mode 100644 index 0000000000..a0863d61c6 --- /dev/null +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj @@ -0,0 +1,24 @@ + + + netstandard2.0 + true + 0.6.4 + Amazon.JSII.Tests.CalculatorPackageId + A simple calcuator built on JSII. + https://github.com/awslabs/jsii.git + https://spdx.org/licenses/Apache-2.0.html + Amazon Web Services + en-US + + + + + + + + + + + + + \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Add.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs similarity index 91% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Add.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs index 15575901f5..d148a7781c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Add.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "+" binary operation. [JsiiClass(typeof(Add), "jsii-calc.Add", "[{\"name\":\"lhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}},{\"name\":\"rhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypes.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs similarity index 98% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypes.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs index 583753409e..46e7cbbac0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypes.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs @@ -1,10 +1,10 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.composition; +using Amazon.JSII.Tests.CalculatorNamespace.composition; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// This class includes property for all types supported by jsii. The setters will validate diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypesEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs similarity index 87% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypesEnum.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs index 9c1a6145bb..6fef8651d6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllTypesEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiEnum(typeof(AllTypesEnum), "jsii-calc.AllTypesEnum")] public enum AllTypesEnum diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllowedMethodNames.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs similarity index 97% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllowedMethodNames.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs index b2c1465f59..793eda8c44 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AllowedMethodNames.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(AllowedMethodNames), "jsii-calc.AllowedMethodNames", "[]")] public class AllowedMethodNames : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AsyncVirtualMethods.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs similarity index 97% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AsyncVirtualMethods.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs index 5e4c21d05e..61b80a7ea6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AsyncVirtualMethods.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(AsyncVirtualMethods), "jsii-calc.AsyncVirtualMethods", "[]")] public class AsyncVirtualMethods : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/BinaryOperation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/BinaryOperation.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs index 07c8f51e47..b869964689 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/BinaryOperation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Represents an operation with two operands. [JsiiClass(typeof(BinaryOperation), "jsii-calc.BinaryOperation", "[{\"name\":\"lhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}},{\"name\":\"rhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Calculator_.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs similarity index 86% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Calculator_.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs index f0fa577cca..1169383381 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Calculator_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs @@ -1,23 +1,23 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.composition; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.composition; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// A calculator which maintains a current value and allows adding operations. - [JsiiClass(typeof(Calculator_), "jsii-calc.Calculator", "[{\"name\":\"props\",\"type\":{\"fqn\":\"jsii-calc.CalculatorProps\",\"optional\":true}}]")] - public class Calculator_ : CompositeOperation_ + [JsiiClass(typeof(Calculator), "jsii-calc.Calculator", "[{\"name\":\"props\",\"type\":{\"fqn\":\"jsii-calc.CalculatorProps\",\"optional\":true}}]")] + public class Calculator : CompositeOperation_ { - public Calculator_(ICalculatorProps props): base(new DeputyProps(new object[]{props})) + public Calculator(ICalculatorProps props): base(new DeputyProps(new object[]{props})) { } - protected Calculator_(ByRefValue reference): base(reference) + protected Calculator(ByRefValue reference): base(reference) { } - protected Calculator_(DeputyProps props): base(props) + protected Calculator(DeputyProps props): base(props) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs similarity index 91% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorProps.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs index 368162a20f..73d47dfba9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. public class CalculatorProps : DeputyBase, ICalculatorProps diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorPropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorPropsProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs index b9dc4da81c..3d8ba2c089 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/CalculatorPropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. [JsiiInterfaceProxy(typeof(ICalculatorProps), "jsii-calc.CalculatorProps")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Base.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs similarity index 89% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Base.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs index 24e6b451e5..5036342fc2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Base.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.DerivedClassHasNoProperties +namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { [JsiiClass(typeof(Base), "jsii-calc.DerivedClassHasNoProperties.Base", "[]")] public class Base : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs similarity index 68% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Derived.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs index dab7f53240..fa68e32efa 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedClassHasNoProperties/Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs @@ -1,9 +1,9 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.DerivedClassHasNoProperties +namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { [JsiiClass(typeof(Derived), "jsii-calc.DerivedClassHasNoProperties.Derived", "[]")] - public class Derived : Base + public class Derived : Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties.Base { public Derived(): base(new DeputyProps(new object[]{})) { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStruct.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs index bc2b0ce71c..5a999f1a32 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs @@ -1,9 +1,9 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using System; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. public class DerivedStruct : DeputyBase, IDerivedStruct diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs similarity index 96% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStructProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs index e83156e2d4..372ea6267f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DerivedStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs @@ -1,9 +1,9 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using System; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. [JsiiInterfaceProxy(typeof(IDerivedStruct), "jsii-calc.DerivedStruct")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DoubleTrouble.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DoubleTrouble.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs index 907eb98c56..b1215d2026 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/DoubleTrouble.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(DoubleTrouble), "jsii-calc.DoubleTrouble", "[]")] public class DoubleTrouble : DeputyBase, IIFriendlyRandomGenerator diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/GiveMeStructs.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/GiveMeStructs.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs index 95fb4ec0f6..0a5c95cf5a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/GiveMeStructs.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(GiveMeStructs), "jsii-calc.GiveMeStructs", "[]")] public class GiveMeStructs : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ICalculatorProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ICalculatorProps.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs index 87c07be874..04a2a6b005 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ICalculatorProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. [JsiiInterface(typeof(ICalculatorProps), "jsii-calc.CalculatorProps")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IDerivedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IDerivedStruct.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs index aafefb83e2..58a290f26b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IDerivedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs @@ -1,9 +1,9 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using System; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. [JsiiInterface(typeof(IDerivedStruct), "jsii-calc.DerivedStruct")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlierProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlierProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs index f2db322fd3..6ad94be5e6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlierProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even friendlier classes can implement this interface. [JsiiInterfaceProxy(typeof(IIFriendlier), "jsii-calc.IFriendlier")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlyRandomGeneratorProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlyRandomGeneratorProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs index 0b11d1a76e..bbeda0eae5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IFriendlyRandomGeneratorProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IIFriendlyRandomGenerator), "jsii-calc.IFriendlyRandomGenerator")] internal class IFriendlyRandomGeneratorProxy : DeputyBase, IIFriendlyRandomGenerator diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlier.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlier.cs similarity index 84% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlier.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlier.cs index 1cc30ca176..c44fe3d253 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlier.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlier.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even friendlier classes can implement this interface. [JsiiInterface(typeof(IIFriendlier), "jsii-calc.IFriendlier")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlyRandomGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlyRandomGenerator.cs similarity index 68% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlyRandomGenerator.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlyRandomGenerator.cs index 6ec21b366c..389968b74d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIFriendlyRandomGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIFriendlyRandomGenerator.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IIFriendlyRandomGenerator), "jsii-calc.IFriendlyRandomGenerator")] public interface IIFriendlyRandomGenerator : IIRandomNumberGenerator, IIFriendly diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithProperties.cs similarity index 91% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithProperties.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithProperties.cs index 0fa317f43c..cfdc3b488f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithProperties.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IIInterfaceWithProperties), "jsii-calc.IInterfaceWithProperties")] public interface IIInterfaceWithProperties diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithPropertiesExtension.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithPropertiesExtension.cs similarity index 88% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithPropertiesExtension.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithPropertiesExtension.cs index a2214ef9f9..26840a4247 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIInterfaceWithPropertiesExtension.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIInterfaceWithPropertiesExtension.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IIInterfaceWithPropertiesExtension), "jsii-calc.IInterfaceWithPropertiesExtension")] public interface IIInterfaceWithPropertiesExtension : IIInterfaceWithProperties diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIRandomNumberGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIRandomNumberGenerator.cs similarity index 90% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIRandomNumberGenerator.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIRandomNumberGenerator.cs index c3712f16bf..3a0553c4f3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IIRandomNumberGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIRandomNumberGenerator.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Generates random numbers. [JsiiInterface(typeof(IIRandomNumberGenerator), "jsii-calc.IRandomNumberGenerator")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IImplictBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs similarity index 75% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IImplictBaseOfBase.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs index 7093358827..23d330079e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IImplictBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Base; +using Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace; using System; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IImplictBaseOfBase), "jsii-calc.ImplictBaseOfBase")] public interface IImplictBaseOfBase : IBaseProps diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs similarity index 90% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithProperties.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs index 43bf6b6714..68ba03b8f6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { public class IInterfaceWithProperties : DeputyBase, IIInterfaceWithProperties { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtension.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtension.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs index f9b1bfe5f0..3a176e747b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtension.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { public class IInterfaceWithPropertiesExtension : DeputyBase, IIInterfaceWithPropertiesExtension { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtensionProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtensionProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs index e62f1f47ac..3be85b6c5f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesExtensionProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IIInterfaceWithPropertiesExtension), "jsii-calc.IInterfaceWithPropertiesExtension")] internal class IInterfaceWithPropertiesExtensionProxy : DeputyBase, IIInterfaceWithPropertiesExtension diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs index ea579678e9..010dc62dcf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IInterfaceWithPropertiesProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IIInterfaceWithProperties), "jsii-calc.IInterfaceWithProperties")] internal class IInterfaceWithPropertiesProxy : DeputyBase, IIInterfaceWithProperties diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IRandomNumberGeneratorProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IRandomNumberGeneratorProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs index 4ea60881e2..8bccac1c90 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IRandomNumberGeneratorProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Generates random numbers. [JsiiInterfaceProxy(typeof(IIRandomNumberGenerator), "jsii-calc.IRandomNumberGenerator")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IReturnsNumber.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs similarity index 89% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IReturnsNumber.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs index 34d3b39f20..bedb9be1cb 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IReturnsNumber.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IReturnsNumber), "jsii-calc.ReturnsNumber")] public interface IReturnsNumber diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IUnionProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IUnionProperties.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs index 2431727a42..6b06b10a95 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/IUnionProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(typeof(IUnionProperties), "jsii-calc.UnionProperties")] public interface IUnionProperties diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs similarity index 83% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBase.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs index 9f6b0b55c4..1b286f79a9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.BaseOfBase; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; using System; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { public class ImplictBaseOfBase : DeputyBase, IImplictBaseOfBase { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs similarity index 89% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBaseProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs index 9ea844328a..28bcc86414 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ImplictBaseOfBaseProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.BaseOfBase; +using Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace; using System; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IImplictBaseOfBase), "jsii-calc.ImplictBaseOfBase")] internal class ImplictBaseOfBaseProxy : DeputyBase, IImplictBaseOfBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralForInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs similarity index 90% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralForInterface.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs index c873776231..19fa50e867 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralForInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(JSObjectLiteralForInterface), "jsii-calc.JSObjectLiteralForInterface", "[]")] public class JSObjectLiteralForInterface : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNative.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNative.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs index cb3921546e..0177e98a97 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNative.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(JSObjectLiteralToNative), "jsii-calc.JSObjectLiteralToNative", "[]")] public class JSObjectLiteralToNative : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNativeClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNativeClass.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs index c32ab3c7e9..c13d989370 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JSObjectLiteralToNativeClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(JSObjectLiteralToNativeClass), "jsii-calc.JSObjectLiteralToNativeClass", "[]")] public class JSObjectLiteralToNativeClass : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JavaReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs similarity index 99% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JavaReservedWords.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs index f56bb61c7a..329b1be7e9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/JavaReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(JavaReservedWords), "jsii-calc.JavaReservedWords", "[]")] public class JavaReservedWords : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Multiply.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Multiply.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs index d41e361e3c..316dfe4586 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Multiply.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "*" binary operation. [JsiiClass(typeof(Multiply), "jsii-calc.Multiply", "[{\"name\":\"lhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}},{\"name\":\"rhs\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Negate.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Negate.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs index 5faae88ec8..a85ecfa9fd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Negate.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// The negation operation ("-value") [JsiiClass(typeof(Negate), "jsii-calc.Negate", "[{\"name\":\"operand\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NodeStandardLibrary.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs similarity index 97% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NodeStandardLibrary.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs index 496c572bf2..bcbc57d591 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NodeStandardLibrary.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Test fixture to verify that jsii modules can use the node standard library. [JsiiClass(typeof(NodeStandardLibrary), "jsii-calc.NodeStandardLibrary", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NumberGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs similarity index 96% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NumberGenerator.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs index f470a7c714..9889b5fdaa 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/NumberGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// This allows us to test that a reference can be stored for objects that diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ObjectRefsInCollections.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ObjectRefsInCollections.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs index b7a19ac532..13915c1450 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ObjectRefsInCollections.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verify that object references can be passed inside collections. [JsiiClass(typeof(ObjectRefsInCollections), "jsii-calc.ObjectRefsInCollections", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/OverrideReturnsObject.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/OverrideReturnsObject.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs index aacfe784a0..152f329b6d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/OverrideReturnsObject.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(OverrideReturnsObject), "jsii-calc.OverrideReturnsObject", "[]")] public class OverrideReturnsObject : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Polymorphism.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs similarity index 87% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Polymorphism.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs index 4ce25ce1bc..565b785432 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Polymorphism.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(Polymorphism), "jsii-calc.Polymorphism", "[]")] public class Polymorphism : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Power.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs similarity index 89% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Power.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs index cd6273d3f7..422b614bdd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Power.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.composition; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.composition; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// The power operation. [JsiiClass(typeof(Power), "jsii-calc.Power", "[{\"name\":\"base\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}},{\"name\":\"pow\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReferenceEnumFromScopedPackage.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReferenceEnumFromScopedPackage.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs index 3cf2adbc4b..febe8c3ec9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReferenceEnumFromScopedPackage.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// See awslabs/jsii#138 [JsiiClass(typeof(ReferenceEnumFromScopedPackage), "jsii-calc.ReferenceEnumFromScopedPackage", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReturnsNumberProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsNumberProxy.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReturnsNumberProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsNumberProxy.cs index 9efcdd6965..1abd7f0a89 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/ReturnsNumberProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsNumberProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IReturnsNumber), "jsii-calc.ReturnsNumber")] internal class ReturnsNumberProxy : DeputyBase, IReturnsNumber diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/RuntimeTypeChecking.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/RuntimeTypeChecking.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs index 24f65215e7..c3da746ef9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/RuntimeTypeChecking.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; using System; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(RuntimeTypeChecking), "jsii-calc.RuntimeTypeChecking", "[]")] public class RuntimeTypeChecking : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Statics.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs similarity index 98% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Statics.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs index 27fd24e90d..b6231d91c8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Statics.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; using System.Collections.Generic; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(Statics), "jsii-calc.Statics", "[{\"name\":\"value\",\"type\":{\"primitive\":\"string\"}}]")] public class Statics : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/StringEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs similarity index 84% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/StringEnum.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs index 076820f21a..00184f5025 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/StringEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiEnum(typeof(StringEnum), "jsii-calc.StringEnum")] public enum StringEnum diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Sum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs similarity index 87% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Sum.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs index d160d15623..b694819829 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Sum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.composition; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.composition; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation that sums multiple values. [JsiiClass(typeof(Sum), "jsii-calc.Sum", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/SyncVirtualMethods.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs similarity index 98% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/SyncVirtualMethods.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs index 111aa5c491..fb39b30885 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/SyncVirtualMethods.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(SyncVirtualMethods), "jsii-calc.SyncVirtualMethods", "[]")] public class SyncVirtualMethods : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Thrower.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Thrower.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs index 75dfd2e725..7f5961d7ac 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/Thrower.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(Thrower), "jsii-calc.Thrower", "[]")] public class Thrower : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnaryOperation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs similarity index 88% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnaryOperation.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs index 9825fc649b..61200c8938 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnaryOperation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation on a single operand. [JsiiClass(typeof(UnaryOperation), "jsii-calc.UnaryOperation", "[{\"name\":\"operand\",\"type\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"}}]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs similarity index 91% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionProperties.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs index 8c7edb5fe2..6c830255af 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { public class UnionProperties : DeputyBase, IUnionProperties { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionPropertiesProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs similarity index 94% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionPropertiesProxy.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs index de1f593533..1266146265 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UnionPropertiesProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterfaceProxy(typeof(IUnionProperties), "jsii-calc.UnionProperties")] internal class UnionPropertiesProxy : DeputyBase, IUnionProperties diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseBundledDependency.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs similarity index 93% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseBundledDependency.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs index b16f053dc9..7470df65fe 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseBundledDependency.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(UseBundledDependency), "jsii-calc.UseBundledDependency", "[]")] public class UseBundledDependency : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseCalcBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs similarity index 74% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseCalcBase.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs index d15020528e..a93601c43d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UseCalcBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs @@ -1,7 +1,7 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.Base; +using Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { /// Depend on a type from jsii-calc-base as a test for awslabs/jsii#128 [JsiiClass(typeof(UseCalcBase), "jsii-calc.UseCalcBase", "[]")] @@ -20,9 +20,9 @@ protected UseCalcBase(DeputyProps props): base(props) } [JsiiMethod("hello", "{\"fqn\":\"@scope/jsii-calc-base.Base\"}", "[]")] - public virtual Base_ Hello() + public virtual Base Hello() { - return InvokeInstanceMethod(new object[]{}); + return InvokeInstanceMethod(new object[]{}); } } } \ No newline at end of file diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UsesInterfaceWithProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs similarity index 97% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UsesInterfaceWithProperties.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs index 6da3cb2dc7..36b537a76c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/UsesInterfaceWithProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(UsesInterfaceWithProperties), "jsii-calc.UsesInterfaceWithProperties", "[{\"name\":\"obj\",\"type\":{\"fqn\":\"jsii-calc.IInterfaceWithProperties\"}}]")] public class UsesInterfaceWithProperties : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VariadicMethod.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs similarity index 95% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VariadicMethod.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs index cfab17985c..c2491df697 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VariadicMethod.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(VariadicMethod), "jsii-calc.VariadicMethod", "[{\"name\":\"prefix\",\"type\":{\"primitive\":\"number\"}}]")] public class VariadicMethod : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VirtualMethodPlayground.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs similarity index 97% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VirtualMethodPlayground.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs index 1c5d62f404..82a3001c27 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/VirtualMethodPlayground.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator +namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(typeof(VirtualMethodPlayground), "jsii-calc.VirtualMethodPlayground", "[]")] public class VirtualMethodPlayground : DeputyBase diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation/CompositionStringStyle.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation/CompositionStringStyle.cs similarity index 83% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation/CompositionStringStyle.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation/CompositionStringStyle.cs index 02f7e68da7..b20e6ab251 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation/CompositionStringStyle.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation/CompositionStringStyle.cs @@ -1,6 +1,6 @@ using Amazon.JSII.Runtime.Deputy; -namespace Amazon.JSII.Tests.Calculator.composition.CompositeOperation +namespace Amazon.JSII.Tests.CalculatorNamespace.composition.CompositeOperation { /// Style of .toString() output for CompositeOperation. [JsiiEnum(typeof(CompositionStringStyle), "jsii-calc.composition.CompositeOperation.CompositionStringStyle")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation_.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation_.cs similarity index 92% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation_.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation_.cs index bf0f101730..6bc3281d6a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/composition/CompositeOperation_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation_.cs @@ -1,8 +1,8 @@ using Amazon.JSII.Runtime.Deputy; -using Amazon.JSII.Tests.Calculator.composition.CompositeOperation; -using Amazon.JSII.Tests.Calculator.Lib; +using Amazon.JSII.Tests.CalculatorNamespace.composition.CompositeOperation; +using Amazon.JSII.Tests.CalculatorNamespace.LibNamespace; -namespace Amazon.JSII.Tests.Calculator.composition +namespace Amazon.JSII.Tests.CalculatorNamespace.composition { /// Abstract operation composed from an expression of other operations. [JsiiClass(typeof(CompositeOperation_), "jsii-calc.composition.CompositeOperation", "[]")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AssemblyInfo.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/AssemblyInfo.cs similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/AssemblyInfo.cs rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/AssemblyInfo.cs diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/jsii-calc-0.6.4.tgz b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-0.6.4.tgz similarity index 100% rename from packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.Calculator/jsii-calc-0.6.4.tgz rename to packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-0.6.4.tgz diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/java/pom.xml b/packages/jsii-pacmak/test/expected.jsii-calc/java/pom.xml index 063180f484..bc59c11912 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/java/pom.xml +++ b/packages/jsii-pacmak/test/expected.jsii-calc/java/pom.xml @@ -2,7 +2,7 @@ 4.0.0 ${project.groupId}:${project.artifactId} - jsii-calc + A simple calcuator built on JSII. https://github.com/awslabs/jsii.git diff --git a/packages/jsii-ruby-runtime/project/.rubocop.yml b/packages/jsii-ruby-runtime/project/.rubocop.yml index 6a14fb239c..7ea2e00e40 100644 --- a/packages/jsii-ruby-runtime/project/.rubocop.yml +++ b/packages/jsii-ruby-runtime/project/.rubocop.yml @@ -18,4 +18,3 @@ Metrics/AbcSize: AllCops: TargetRubyVersion: 2.2 - diff --git a/packages/jsii-runtime/package-lock.json b/packages/jsii-runtime/package-lock.json index e2c829d2d4..72bc4420ae 100644 --- a/packages/jsii-runtime/package-lock.json +++ b/packages/jsii-runtime/package-lock.json @@ -1976,11 +1976,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -1993,15 +1995,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -2104,7 +2109,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -2114,6 +2120,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -2126,17 +2133,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.2.4", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -2153,6 +2163,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -2225,7 +2236,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -2235,6 +2247,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -2340,6 +2353,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0",