// Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` ┗━ 📁 dotnet ┗━ 📁 Amazon.JSII.Tests.CalculatorPackageId.BasePackageId ┣━ 📁 Amazon ┃ ┗━ 📁 JSII ┃ ┗━ 📁 Tests ┃ ┗━ 📁 CalculatorNamespace ┃ ┗━ 📁 BaseNamespace ┃ ┣━ 📄 Base.cs ┃ ┣━ 📄 BaseProps.cs ┃ ┣━ 📄 IBaseInterface.cs ┃ ┣━ 📄 IBaseProps.cs ┃ ┣━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┗━ 📄 StaticConsumer.cs ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj ┣━ 📄 AssemblyInfo.cs ┣━ 📄 LICENSE ┣━ 📄 NOTICE ┣━ 📁 resources ┃ ┗━ 📄 default-256-dark.png ┗━ 📄 scope-jsii-calc-base-0.0.0.tgz `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj 1`] = ` An example direct dependency for jsii-calc. resources\\default-256-dark.png https://raw.githubusercontent.com/aws/aws-cdk/main/logo/default-256-dark.png Amazon.JSII.Tests.CalculatorPackageId.BasePackageId Apache-2.0 0.0.0 Amazon Web Services Amazon Web Services en-US https://github.com/aws/jsii https://github.com/aws/jsii.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { /// A base class. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base), fullyQualifiedName: "@scope/jsii-calc-base.Base")] public abstract class Base : DeputyBase { protected Base(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(DeputyProps props): base(props) { } /// the name of the class (to verify native type names are created for derived classes). [JsiiMethod(name: "typeName", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public virtual object TypeName() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// A base class. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base), fullyQualifiedName: "@scope/jsii-calc-base.Base")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "@scope/jsii-calc-base.BaseProps")] public class BaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseProps { [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar { get; set; } [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiInterface(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] public interface IBaseInterface : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface { [JsiiMethod(name: "bar")] void Bar(); [JsiiTypeProxy(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "bar")] public void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiInterface(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] public interface IBaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps { [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] string Bar { get; } [JsiiTypeProxy(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar { get => GetInstanceProperty()!; } [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { new Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution.Anchor(); } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/StaticConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { /// Hides the transitive dependency of base-of-base. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.StaticConsumer), fullyQualifiedName: "@scope/jsii-calc-base.StaticConsumer")] public class StaticConsumer : DeputyBase { public StaticConsumer(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticConsumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticConsumer(DeputyProps props): base(props) { } [JsiiMethod(name: "consume", parametersJson: "[{\\"name\\":\\"args\\",\\"type\\":{\\"primitive\\":\\"any\\"},\\"variadic\\":true}]")] public static void Consume(params object[] args) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.StaticConsumer), new System.Type[]{typeof(object[])}, new object[]{args}); } } } `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("@scope/jsii-calc-base", "0.0.0", "scope-jsii-calc-base-0.0.0.tgz")] `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/LICENSE 1`] = ` Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/NOTICE 1`] = ` jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/resources/default-256-dark.png 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/resources/default-256-dark.png is a binary file`; exports[`Generated code for "@scope/jsii-calc-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/scope-jsii-calc-base-0.0.0.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-base": / 1`] = ` ┗━ 🕳 There is nothing here `; exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┗━ 📁 dotnet ┗━ 📁 Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId ┣━ 📁 Amazon ┃ ┗━ 📁 JSII ┃ ┗━ 📁 Tests ┃ ┗━ 📁 CalculatorNamespace ┃ ┗━ 📁 BaseOfBaseNamespace ┃ ┣━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 IVeryBaseInterface.cs ┃ ┣━ 📄 IVeryBaseProps.cs ┃ ┣━ 📄 StaticConsumer.cs ┃ ┣━ 📄 Very.cs ┃ ┗━ 📄 VeryBaseProps.cs ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj ┣━ 📄 AssemblyInfo.cs ┣━ 📄 LICENSE ┣━ 📄 NOTICE ┗━ 📄 scope-jsii-calc-base-of-base-2.1.1.tgz `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj 1`] = ` An example transitive dependency for jsii-calc. Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId Apache-2.0 2.1.1 Amazon Web Services Amazon Web Services en-US https://github.com/aws/jsii https://github.com/aws/jsii.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiInterface(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] public interface IVeryBaseInterface { [JsiiMethod(name: "foo")] void Foo(); [JsiiTypeProxy(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiInterface(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] public interface IVeryBaseProps { [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get; } [JsiiTypeProxy(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/StaticConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.StaticConsumer), fullyQualifiedName: "@scope/jsii-calc-base-of-base.StaticConsumer")] public class StaticConsumer : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticConsumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticConsumer(DeputyProps props): base(props) { } [JsiiMethod(name: "consume", parametersJson: "[{\\"name\\":\\"_args\\",\\"type\\":{\\"primitive\\":\\"any\\"},\\"variadic\\":true}]")] public static void Consume(params object[] args) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.StaticConsumer), new System.Type[]{typeof(object[])}, new object[]{args}); } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { /// (experimental) Something here. /// /// Stability: Experimental /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very), fullyQualifiedName: "@scope/jsii-calc-base-of-base.Very")] public class Very : DeputyBase { public Very(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Very(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Very(DeputyProps props): base(props) { } /// /// Stability: Experimental /// [JsiiMethod(name: "hey", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double Hey() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "@scope/jsii-calc-base-of-base.VeryBaseProps")] public class VeryBaseProps : Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.IVeryBaseProps { [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("@scope/jsii-calc-base-of-base", "2.1.1", "scope-jsii-calc-base-of-base-2.1.1.tgz")] `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/LICENSE 1`] = ` Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/NOTICE 1`] = ` jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; exports[`Generated code for "@scope/jsii-calc-base-of-base": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-2.1.1.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/scope-jsii-calc-base-of-base-2.1.1.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-base-of-base": / 1`] = ` ┗━ 🕳 There is nothing here `; exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┗━ 📁 dotnet ┗━ 📁 Amazon.JSII.Tests.CalculatorPackageId.LibPackageId ┣━ 📁 Amazon ┃ ┗━ 📁 JSII ┃ ┗━ 📁 Tests ┃ ┣━ 📁 CalculatorNamespace ┃ ┃ ┗━ 📁 LibNamespace ┃ ┃ ┣━ 📄 BaseFor2647.cs ┃ ┃ ┣━ 📁 DeprecationRemoval ┃ ┃ ┃ ┣━ 📄 IInterface.cs ┃ ┃ ┃ ┣━ 📄 InterfaceFactory.cs ┃ ┃ ┃ ┗━ 📄 VisibleBaseClass.cs ┃ ┃ ┣━ 📄 DiamondLeft.cs ┃ ┃ ┣━ 📄 DiamondRight.cs ┃ ┃ ┣━ 📄 EnumFromScopedModule.cs ┃ ┃ ┣━ 📄 FunctionWithUnderscoreArgument.cs ┃ ┃ ┣━ 📄 IDiamondLeft.cs ┃ ┃ ┣━ 📄 IDiamondRight.cs ┃ ┃ ┣━ 📄 IDoublable.cs ┃ ┃ ┣━ 📄 IFriendly.cs ┃ ┃ ┣━ 📄 IMyFirstStruct.cs ┃ ┃ ┣━ 📁 Internal ┃ ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┃ ┣━ 📄 IStructWithOnlyOptionals.cs ┃ ┃ ┣━ 📄 IThreeLevelsInterface.cs ┃ ┃ ┣━ 📄 MyFirstStruct.cs ┃ ┃ ┣━ 📄 Number.cs ┃ ┃ ┣━ 📄 NumericValue.cs ┃ ┃ ┣━ 📄 Operation.cs ┃ ┃ ┗━ 📄 StructWithOnlyOptionals.cs ┃ ┗━ 📁 CustomSubmoduleName ┃ ┣━ 📄 IReflectable.cs ┃ ┣━ 📄 IReflectableEntry.cs ┃ ┣━ 📄 NamespaceDoc.cs ┃ ┣━ 📄 NestingClass.cs ┃ ┣━ 📄 ReflectableEntry.cs ┃ ┗━ 📄 Reflector.cs ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj ┣━ 📄 AssemblyInfo.cs ┣━ 📄 LICENSE ┣━ 📄 NOTICE ┗━ 📄 scope-jsii-calc-lib-0.0.0.tgz `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj 1`] = ` A simple calcuator library built on JSII. (Stability: Deprecated) Amazon.JSII.Tests.CalculatorPackageId.LibPackageId Apache-2.0 0.0.0-devpreview Amazon Web Services Amazon Web Services en-US https://github.com/aws/jsii https://github.com/aws/jsii.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/BaseFor2647.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) A base class for testing #2647. /// /// The method foo has a parameter that uses a type /// from a dependent module. Since Go "reimplments" this method, it will also need /// to include an "import" statement for the calc-base module. /// /// Stability: Deprecated /// /// See: https://github.com/aws/jsii/issues/2647 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.BaseFor2647), fullyQualifiedName: "@scope/jsii-calc-lib.BaseFor2647", parametersJson: "[{\\"name\\":\\"very\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}}]")] [System.Obsolete()] public class BaseFor2647 : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete()] public BaseFor2647(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very very): base(_MakeDeputyProps(very)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very very) { return new DeputyProps(new object?[]{very}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseFor2647(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseFor2647(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "foo", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-base.IBaseInterface\\"}}]")] [System.Obsolete()] public virtual void Foo(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface obj) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface)}, new object[]{obj}); } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/DeprecationRemoval/IInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IInterface), fullyQualifiedName: "@scope/jsii-calc-lib.deprecationRemoval.IInterface")] [System.Obsolete()] public interface IInterface { /// /// Stability: Deprecated /// [JsiiMethod(name: "method")] [System.Obsolete()] void Method(); /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IInterface), fullyQualifiedName: "@scope/jsii-calc-lib.deprecationRemoval.IInterface")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval.IInterface { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "method")] [System.Obsolete()] public void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/DeprecationRemoval/InterfaceFactory.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval { /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval.InterfaceFactory), fullyQualifiedName: "@scope/jsii-calc-lib.deprecationRemoval.InterfaceFactory")] [System.Obsolete()] public class InterfaceFactory : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfaceFactory(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfaceFactory(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "create", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.deprecationRemoval.IInterface\\"}}")] [System.Obsolete()] public static Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval.IInterface Create() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval.InterfaceFactory), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/DeprecationRemoval/VisibleBaseClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval { /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.DeprecationRemoval.VisibleBaseClass), fullyQualifiedName: "@scope/jsii-calc-lib.deprecationRemoval.VisibleBaseClass")] [System.Obsolete()] public class VisibleBaseClass : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete()] public VisibleBaseClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VisibleBaseClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VisibleBaseClass(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "propertyPresent", typeJson: "{\\"primitive\\":\\"boolean\\"}")] [System.Obsolete()] public virtual bool PropertyPresent { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/DiamondLeft.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.DiamondLeft")] public class DiamondLeft : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondLeft { /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "left", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Left { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/DiamondRight.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.DiamondRight")] public class DiamondRight : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondRight { /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "right", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Right { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Check that enums from \\@scoped packages can be references. /// /// See awslabs/jsii#138 /// /// Stability: Deprecated /// [JsiiEnum(nativeType: typeof(EnumFromScopedModule), fullyQualifiedName: "@scope/jsii-calc-lib.EnumFromScopedModule")] [System.Obsolete()] public enum EnumFromScopedModule { /// /// Stability: Deprecated /// [JsiiEnumMember(name: "VALUE1")] [System.Obsolete()] VALUE1, /// /// Stability: Deprecated /// [JsiiEnumMember(name: "VALUE2")] [System.Obsolete()] VALUE2 } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/FunctionWithUnderscoreArgument.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) For Java, test that an identifier that is just a _ is handled. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.FunctionWithUnderscoreArgument), fullyQualifiedName: "@scope/jsii-calc-lib.FunctionWithUnderscoreArgument")] [System.Obsolete()] public class FunctionWithUnderscoreArgument : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete()] public FunctionWithUnderscoreArgument(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected FunctionWithUnderscoreArgument(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected FunctionWithUnderscoreArgument(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "foo", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"_\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] [System.Obsolete()] public virtual string Foo(string _) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{_})!; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDiamondLeft.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IDiamondLeft), fullyQualifiedName: "@scope/jsii-calc-lib.DiamondLeft")] [System.Obsolete()] public interface IDiamondLeft { /// /// Stability: Deprecated /// [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? HoistedTop { get { return null; } } /// /// Stability: Deprecated /// [JsiiProperty(name: "left", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? Left { get { return null; } } /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IDiamondLeft), fullyQualifiedName: "@scope/jsii-calc-lib.DiamondLeft")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondLeft { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "left", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Left { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDiamondRight.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IDiamondRight), fullyQualifiedName: "@scope/jsii-calc-lib.DiamondRight")] [System.Obsolete()] public interface IDiamondRight { /// /// Stability: Deprecated /// [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? HoistedTop { get { return null; } } /// /// Stability: Deprecated /// [JsiiProperty(name: "right", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? Right { get { return null; } } /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IDiamondRight), fullyQualifiedName: "@scope/jsii-calc-lib.DiamondRight")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondRight { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "right", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Right { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) The general contract for a concrete number. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IDoublable), fullyQualifiedName: "@scope/jsii-calc-lib.IDoublable")] [System.Obsolete()] public interface IDoublable { /// /// Stability: Deprecated /// [JsiiProperty(name: "doubleValue", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] double DoubleValue { get; } /// (deprecated) The general contract for a concrete number. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IDoublable), fullyQualifiedName: "@scope/jsii-calc-lib.IDoublable")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "doubleValue", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public double DoubleValue { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendly.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Applies to classes that are considered friendly. /// /// These classes can be greeted with /// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IFriendly), fullyQualifiedName: "@scope/jsii-calc-lib.IFriendly")] [System.Obsolete()] public interface IFriendly { /// (deprecated) Say hello! /// /// Stability: Deprecated /// [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] string Hello(); /// (deprecated) Applies to classes that are considered friendly. /// /// These classes can be greeted with /// a "hello" or "goodbye" blessing and they will respond back in a fun and friendly manner. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IFriendly), fullyQualifiedName: "@scope/jsii-calc-lib.IFriendly")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) Say hello! /// /// Stability: Deprecated /// [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) This is the first struct we have created in jsii. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IMyFirstStruct), fullyQualifiedName: "@scope/jsii-calc-lib.MyFirstStruct")] [System.Obsolete()] public interface IMyFirstStruct { /// (deprecated) An awesome number value. /// /// Stability: Deprecated /// [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] double Anumber { get; } /// (deprecated) A string value. /// /// Stability: Deprecated /// [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] string Astring { get; } /// /// Stability: Deprecated /// [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string[]? FirstOptional { get { return null; } } /// (deprecated) This is the first struct we have created in jsii. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IMyFirstStruct), fullyQualifiedName: "@scope/jsii-calc-lib.MyFirstStruct")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) An awesome number value. /// /// Stability: Deprecated /// [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public double Anumber { get => GetInstanceProperty()!; } /// (deprecated) A string value. /// /// Stability: Deprecated /// [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Astring { get => GetInstanceProperty()!; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [System.Obsolete()] public string[]? FirstOptional { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) This is a struct with only optional properties. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] [System.Obsolete()] public interface IStructWithOnlyOptionals { /// (deprecated) The first optional! /// /// Stability: Deprecated /// [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Optional1 { get { return null; } } /// /// Stability: Deprecated /// [JsiiProperty(name: "optional2", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? Optional2 { get { return null; } } /// /// Stability: Deprecated /// [JsiiProperty(name: "optional3", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? Optional3 { get { return null; } } /// (deprecated) This is a struct with only optional properties. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IStructWithOnlyOptionals), fullyQualifiedName: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) The first optional! /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? Optional1 { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional2", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Optional2 { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional3", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Optional3 { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Interface that inherits from packages 2 levels up the tree. /// /// Their presence validates that .NET/Java/jsii-reflect can track all fields /// far enough up the tree. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IThreeLevelsInterface), fullyQualifiedName: "@scope/jsii-calc-lib.IThreeLevelsInterface")] [System.Obsolete()] public interface IThreeLevelsInterface : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { /// /// Stability: Deprecated /// [JsiiMethod(name: "baz")] [System.Obsolete()] void Baz(); /// (deprecated) Interface that inherits from packages 2 levels up the tree. /// /// Their presence validates that .NET/Java/jsii-reflect can track all fields /// far enough up the tree. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IThreeLevelsInterface), fullyQualifiedName: "@scope/jsii-calc-lib.IThreeLevelsInterface")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IThreeLevelsInterface { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "baz")] [System.Obsolete()] public void Baz() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "bar")] public void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { new Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution.Anchor(); new Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution.Anchor(); } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { #pragma warning disable CS8618 /// (deprecated) This is the first struct we have created in jsii. /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.MyFirstStruct")] public class MyFirstStruct : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct { /// (deprecated) An awesome number value. /// /// Stability: Deprecated /// [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public double Anumber { get; set; } /// (deprecated) A string value. /// /// Stability: Deprecated /// [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Astring { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [System.Obsolete()] public string[]? FirstOptional { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Represents a concrete number. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number), fullyQualifiedName: "@scope/jsii-calc-lib.Number", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The number.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] [System.Obsolete()] public class Number : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable { /// (deprecated) Creates a Number object. /// The number. /// /// Stability: Deprecated /// [System.Obsolete()] public Number(double @value): base(_MakeDeputyProps(@value)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double @value) { return new DeputyProps(new object?[]{@value}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Number(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Number(DeputyProps props): base(props) { } /// (deprecated) The number multiplied by 2. /// /// Stability: Deprecated /// [JsiiProperty(name: "doubleValue", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public virtual double DoubleValue { get => GetInstanceProperty()!; } /// (deprecated) The number. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public override double Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/NumericValue.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Abstract class which represents a numeric value. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue), fullyQualifiedName: "@scope/jsii-calc-lib.NumericValue")] [System.Obsolete()] public abstract class NumericValue : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base { protected NumericValue(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NumericValue(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NumericValue(DeputyProps props): base(props) { } /// (deprecated) String representation of the value. /// /// Stability: Deprecated /// [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// (deprecated) The value. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public abstract double Value { get; } /// (deprecated) Abstract class which represents a numeric value. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue), fullyQualifiedName: "@scope/jsii-calc-lib.NumericValue")] [System.Obsolete()] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) The value. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public override double Value { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) Represents an operation on values. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation), fullyQualifiedName: "@scope/jsii-calc-lib.Operation")] [System.Obsolete()] public abstract class Operation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue { protected Operation(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Operation(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Operation(DeputyProps props): base(props) { } /// (deprecated) String representation of the value. /// /// Stability: Deprecated /// [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public override abstract string ToString(); /// (deprecated) Represents an operation on values. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation), fullyQualifiedName: "@scope/jsii-calc-lib.Operation")] [System.Obsolete()] new internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) The value. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public override double Value { get => GetInstanceProperty()!; } /// (deprecated) String representation of the value. /// /// Stability: Deprecated /// [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// (deprecated) This is a struct with only optional properties. /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.StructWithOnlyOptionals")] public class StructWithOnlyOptionals : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals { /// (deprecated) The first optional! /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? Optional1 { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional2", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Optional2 { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "optional3", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Optional3 { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/IReflectable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] [System.Obsolete()] public interface IReflectable { /// /// Stability: Deprecated /// [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] [System.Obsolete()] Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries { get; } /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IReflectable), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.IReflectable")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectable { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] [System.Obsolete()] public Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/IReflectableEntry.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IReflectableEntry), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.ReflectableEntry")] [System.Obsolete()] public interface IReflectableEntry { /// /// Stability: Deprecated /// [JsiiProperty(name: "key", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] string Key { get; } /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"any\\"}")] [System.Obsolete()] object Value { get; } /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IReflectableEntry), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.ReflectableEntry")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "key", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Key { get => GetInstanceProperty()!; } /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"any\\"}")] [System.Obsolete()] public object Value { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/NamespaceDoc.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { /// ///

Submodule Readme

/// /// This is a submodule readme. ///
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class NamespaceDoc { } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/NestingClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { /// (deprecated) This class is here to show we can use nested classes across module boundaries. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CustomSubmoduleName.NestingClass), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass")] [System.Obsolete()] public class NestingClass : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestingClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestingClass(DeputyProps props): base(props) { } /// (deprecated) This class is here to show we can use nested classes across module boundaries. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.NestedClass), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedClass")] [System.Obsolete()] public class NestedClass : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete()] public NestedClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestedClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestedClass(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public virtual string Property { get => GetInstanceProperty()!; } } /// (deprecated) This is a struct, nested within a class. /// /// Normal. /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(INestedStruct), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] [System.Obsolete()] public interface INestedStruct { /// /// Stability: Deprecated /// [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] string Name { get; } /// (deprecated) This is a struct, nested within a class. /// /// Normal. /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] [System.Obsolete()] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.INestedStruct { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Name { get => GetInstanceProperty()!; } } } #pragma warning disable CS8618 /// (deprecated) This is a struct, nested within a class. /// /// Normal. /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.submodule.NestingClass.NestedStruct")] public class NestedStruct : Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.INestedStruct { /// /// Stability: Deprecated /// [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Name { get; set; } } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/ReflectableEntry.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { #pragma warning disable CS8618 /// /// Stability: Deprecated /// [JsiiByValue(fqn: "@scope/jsii-calc-lib.submodule.ReflectableEntry")] public class ReflectableEntry : Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry { /// /// Stability: Deprecated /// [JsiiProperty(name: "key", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Key { get; set; } /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"any\\"}")] [System.Obsolete()] public object Value { get; set; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CustomSubmoduleName/Reflector.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CustomSubmoduleName { /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CustomSubmoduleName.Reflector), fullyQualifiedName: "@scope/jsii-calc-lib.submodule.Reflector")] [System.Obsolete()] public class Reflector : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete()] public Reflector(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Reflector(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Reflector(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "asMap", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}", parametersJson: "[{\\"name\\":\\"reflectable\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.IReflectable\\"}}]")] [System.Obsolete()] public virtual System.Collections.Generic.IDictionary AsMap(Amazon.JSII.Tests.CustomSubmoduleName.IReflectable reflectable) { return InvokeInstanceMethod>(new System.Type[]{typeof(Amazon.JSII.Tests.CustomSubmoduleName.IReflectable)}, new object[]{reflectable})!; } } } `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("@scope/jsii-calc-lib", "0.0.0", "scope-jsii-calc-lib-0.0.0.tgz")] `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/LICENSE 1`] = ` Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/NOTICE 1`] = ` jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; exports[`Generated code for "@scope/jsii-calc-lib": /dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.0.0.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/scope-jsii-calc-lib-0.0.0.tgz is a tarball`; exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┗━ 🕳 There is nothing here `; exports[`Generated code for "jsii-calc": / 1`] = ` ┗━ 📁 dotnet ┗━ 📁 Amazon.JSII.Tests.CalculatorPackageId ┣━ 📁 Amazon ┃ ┗━ 📁 JSII ┃ ┗━ 📁 Tests ┃ ┗━ 📁 CalculatorNamespace ┃ ┣━ 📄 AbstractClass.cs ┃ ┣━ 📄 AbstractClassBase.cs ┃ ┣━ 📄 AbstractClassReturner.cs ┃ ┣━ 📄 AbstractSuite.cs ┃ ┣━ 📄 Add.cs ┃ ┣━ 📄 AllowedMethodNames.cs ┃ ┣━ 📄 AllTypes.cs ┃ ┣━ 📄 AllTypesEnum.cs ┃ ┣━ 📄 AmbiguousParameters.cs ┃ ┣━ 📁 Anonymous ┃ ┃ ┣━ 📄 IOptionA.cs ┃ ┃ ┣━ 📄 IOptionB.cs ┃ ┃ ┗━ 📄 UseOptions.cs ┃ ┣━ 📄 AnonymousImplementationProvider.cs ┃ ┣━ 📄 AnyPropertyAccess.cs ┃ ┣━ 📄 AsyncVirtualMethods.cs ┃ ┣━ 📄 AugmentableClass.cs ┃ ┣━ 📄 BaseClass.cs ┃ ┣━ 📄 BaseJsii976.cs ┃ ┣━ 📄 Bell.cs ┃ ┣━ 📄 BinaryOperation.cs ┃ ┣━ 📄 BurriedAnonymousObject.cs ┃ ┣━ 📄 Calculator.cs ┃ ┣━ 📄 CalculatorProps.cs ┃ ┣━ 📁 Cdk16625 ┃ ┃ ┣━ 📄 Cdk16625.cs ┃ ┃ ┗━ 📁 Donotimport ┃ ┃ ┗━ 📄 UnimportedSubmoduleType.cs ┃ ┣━ 📁 Cdk22369 ┃ ┃ ┣━ 📄 AcceptsPath.cs ┃ ┃ ┣━ 📄 AcceptsPathProps.cs ┃ ┃ ┗━ 📄 IAcceptsPathProps.cs ┃ ┣━ 📄 ChildStruct982.cs ┃ ┣━ 📄 ClassThatImplementsTheInternalInterface.cs ┃ ┣━ 📄 ClassThatImplementsThePrivateInterface.cs ┃ ┣━ 📄 ClassWithCollectionOfUnions.cs ┃ ┣━ 📄 ClassWithCollections.cs ┃ ┣━ 📄 ClassWithContainerTypes.cs ┃ ┣━ 📄 ClassWithDocs.cs ┃ ┣━ 📄 ClassWithJavaReservedWords.cs ┃ ┣━ 📄 ClassWithMutableObjectLiteralProperty.cs ┃ ┣━ 📄 ClassWithNestedUnion.cs ┃ ┣━ 📄 ClassWithPrivateConstructorAndAutomaticProperties.cs ┃ ┣━ 📁 Composition ┃ ┃ ┗━ 📄 CompositeOperation.cs ┃ ┣━ 📄 ConfusingToJackson.cs ┃ ┣━ 📄 ConfusingToJacksonStruct.cs ┃ ┣━ 📄 ConstructorPassesThisOut.cs ┃ ┣━ 📄 Constructors.cs ┃ ┣━ 📄 ConsumePureInterface.cs ┃ ┣━ 📄 ConsumerCanRingBell.cs ┃ ┣━ 📄 ConsumersOfThisCrazyTypeSystem.cs ┃ ┣━ 📄 ContainerProps.cs ┃ ┣━ 📄 DataRenderer.cs ┃ ┣━ 📄 Default.cs ┃ ┣━ 📄 DefaultedConstructorArgument.cs ┃ ┣━ 📄 Demonstrate982.cs ┃ ┣━ 📄 DeprecatedClass.cs ┃ ┣━ 📄 DeprecatedEnum.cs ┃ ┣━ 📄 DeprecatedStruct.cs ┃ ┣━ 📁 DerivedClassHasNoProperties ┃ ┃ ┣━ 📄 Base.cs ┃ ┃ ┗━ 📄 Derived.cs ┃ ┣━ 📄 DerivedStruct.cs ┃ ┣━ 📄 DiamondBottom.cs ┃ ┣━ 📄 DiamondInheritanceBaseLevelStruct.cs ┃ ┣━ 📄 DiamondInheritanceFirstMidLevelStruct.cs ┃ ┣━ 📄 DiamondInheritanceSecondMidLevelStruct.cs ┃ ┣━ 📄 DiamondInheritanceTopLevelStruct.cs ┃ ┣━ 📄 DisappointingCollectionSource.cs ┃ ┣━ 📄 DocumentedClass.cs ┃ ┣━ 📄 DoNotOverridePrivates.cs ┃ ┣━ 📄 DoNotRecognizeAnyAsOptional.cs ┃ ┣━ 📄 DontComplainAboutVariadicAfterOptional.cs ┃ ┣━ 📄 DontUseMe.cs ┃ ┣━ 📄 DoubleTrouble.cs ┃ ┣━ 📄 DummyObj.cs ┃ ┣━ 📄 DynamicPropertyBearer.cs ┃ ┣━ 📄 DynamicPropertyBearerChild.cs ┃ ┣━ 📄 Entropy.cs ┃ ┣━ 📄 EnumDispenser.cs ┃ ┣━ 📄 EraseUndefinedHashValues.cs ┃ ┣━ 📄 EraseUndefinedHashValuesOptions.cs ┃ ┣━ 📄 ExperimentalClass.cs ┃ ┣━ 📄 ExperimentalEnum.cs ┃ ┣━ 📄 ExperimentalStruct.cs ┃ ┣━ 📄 ExportedBaseClass.cs ┃ ┣━ 📄 ExtendsInternalInterface.cs ┃ ┣━ 📄 ExternalClass.cs ┃ ┣━ 📄 ExternalEnum.cs ┃ ┣━ 📄 ExternalStruct.cs ┃ ┣━ 📄 FullCombo.cs ┃ ┣━ 📄 GiveMeStructs.cs ┃ ┣━ 📄 Greetee.cs ┃ ┣━ 📄 GreetingAugmenter.cs ┃ ┣━ 📁 HomonymousForwardReferences ┃ ┃ ┣━ 📁 Bar ┃ ┃ ┃ ┣━ 📄 Consumer.cs ┃ ┃ ┃ ┣━ 📄 ConsumerProps.cs ┃ ┃ ┃ ┣━ 📄 Homonymous.cs ┃ ┃ ┃ ┣━ 📄 IConsumerProps.cs ┃ ┃ ┃ ┗━ 📄 IHomonymous.cs ┃ ┃ ┣━ 📁 Foo ┃ ┃ ┃ ┣━ 📄 Consumer.cs ┃ ┃ ┃ ┣━ 📄 ConsumerProps.cs ┃ ┃ ┃ ┣━ 📄 Homonymous.cs ┃ ┃ ┃ ┣━ 📄 IConsumerProps.cs ┃ ┃ ┃ ┗━ 📄 IHomonymous.cs ┃ ┃ ┗━ 📄 NamespaceDoc.cs ┃ ┣━ 📄 IAnonymousImplementationProvider.cs ┃ ┣━ 📄 IAnonymouslyImplementMe.cs ┃ ┣━ 📄 IAnotherPublicInterface.cs ┃ ┣━ 📄 IBell.cs ┃ ┣━ 📄 IBellRinger.cs ┃ ┣━ 📄 ICalculatorProps.cs ┃ ┣━ 📄 IChildStruct982.cs ┃ ┣━ 📄 IConcreteBellRinger.cs ┃ ┣━ 📄 IConfusingToJacksonStruct.cs ┃ ┣━ 📄 IContainerProps.cs ┃ ┣━ 📄 IDeprecatedInterface.cs ┃ ┣━ 📄 IDeprecatedStruct.cs ┃ ┣━ 📄 IDerivedStruct.cs ┃ ┣━ 📄 IDiamondBottom.cs ┃ ┣━ 📄 IDiamondInheritanceBaseLevelStruct.cs ┃ ┣━ 📄 IDiamondInheritanceFirstMidLevelStruct.cs ┃ ┣━ 📄 IDiamondInheritanceSecondMidLevelStruct.cs ┃ ┣━ 📄 IDiamondInheritanceTopLevelStruct.cs ┃ ┣━ 📄 IDontUseMe.cs ┃ ┣━ 📄 IDummyObj.cs ┃ ┣━ 📄 IEraseUndefinedHashValuesOptions.cs ┃ ┣━ 📄 IExperimentalInterface.cs ┃ ┣━ 📄 IExperimentalStruct.cs ┃ ┣━ 📄 IExtendsInternalInterface.cs ┃ ┣━ 📄 IExtendsPrivateInterface.cs ┃ ┣━ 📄 IExternalInterface.cs ┃ ┣━ 📄 IExternalStruct.cs ┃ ┣━ 📄 IFriendlier.cs ┃ ┣━ 📄 IFriendlyRandomGenerator.cs ┃ ┣━ 📄 IGreetee.cs ┃ ┣━ 📄 IImplictBaseOfBase.cs ┃ ┣━ 📄 IIndirectlyImplemented.cs ┃ ┣━ 📄 IInterfaceImplementedByAbstractClass.cs ┃ ┣━ 📄 IInterfaceThatShouldNotBeADataType.cs ┃ ┣━ 📄 IInterfaceWithInternal.cs ┃ ┣━ 📄 IInterfaceWithMethods.cs ┃ ┣━ 📄 IInterfaceWithOptionalMethodArguments.cs ┃ ┣━ 📄 IInterfaceWithProperties.cs ┃ ┣━ 📄 IInterfaceWithPropertiesExtension.cs ┃ ┣━ 📄 IJavaReservedWordsInAnInterface.cs ┃ ┣━ 📄 IJSII417Derived.cs ┃ ┣━ 📄 IJSII417PublicBaseOfBase.cs ┃ ┣━ 📄 IJsii487External.cs ┃ ┣━ 📄 IJsii487External2.cs ┃ ┣━ 📄 IJsii496.cs ┃ ┣━ 📄 ILevelOneProps.cs ┃ ┣━ 📄 ILoadBalancedFargateServiceProps.cs ┃ ┣━ 📄 Implementation.cs ┃ ┣━ 📄 ImplementInternalInterface.cs ┃ ┣━ 📄 ImplementsInterfaceWithInternal.cs ┃ ┣━ 📄 ImplementsInterfaceWithInternalSubclass.cs ┃ ┣━ 📄 ImplementsPrivateInterface.cs ┃ ┣━ 📄 ImplictBaseOfBase.cs ┃ ┣━ 📄 IMutableObjectLiteral.cs ┃ ┣━ 📄 InbetweenClass.cs ┃ ┣━ 📄 INestedStruct.cs ┃ ┣━ 📄 INonInternalInterface.cs ┃ ┣━ 📄 InterfaceCollections.cs ┃ ┣━ 📁 InterfaceInNamespaceIncludesClasses ┃ ┃ ┣━ 📄 Foo.cs ┃ ┃ ┣━ 📄 Hello.cs ┃ ┃ ┗━ 📄 IHello.cs ┃ ┣━ 📁 InterfaceInNamespaceOnlyInterface ┃ ┃ ┣━ 📄 Hello.cs ┃ ┃ ┗━ 📄 IHello.cs ┃ ┣━ 📄 InterfacesMaker.cs ┃ ┣━ 📁 Internal ┃ ┃ ┗━ 📁 DependencyResolution ┃ ┃ ┗━ 📄 Anchor.cs ┃ ┣━ 📄 INullShouldBeTreatedAsUndefinedData.cs ┃ ┣━ 📄 IObjectWithProperty.cs ┃ ┣━ 📄 IOptionalMethod.cs ┃ ┣━ 📄 IOptionalStruct.cs ┃ ┣━ 📄 IParamShadowsBuiltinsProps.cs ┃ ┣━ 📄 IParentStruct982.cs ┃ ┣━ 📄 IPrivatelyImplemented.cs ┃ ┣━ 📄 IPublicInterface.cs ┃ ┣━ 📄 IPublicInterface2.cs ┃ ┣━ 📄 IRandomNumberGenerator.cs ┃ ┣━ 📄 IReturnJsii976.cs ┃ ┣━ 📄 IReturnsNumber.cs ┃ ┣━ 📄 IRootStruct.cs ┃ ┣━ 📄 ISecondLevelStruct.cs ┃ ┣━ 📄 ISmellyStruct.cs ┃ ┣━ 📄 Isomorphism.cs ┃ ┣━ 📄 Issue2638.cs ┃ ┣━ 📄 Issue2638B.cs ┃ ┣━ 📄 IStableInterface.cs ┃ ┣━ 📄 IStableStruct.cs ┃ ┣━ 📄 IStructA.cs ┃ ┣━ 📄 IStructB.cs ┃ ┣━ 📄 IStructParameterType.cs ┃ ┣━ 📄 IStructReturningDelegate.cs ┃ ┣━ 📄 IStructWithCollectionOfUnionts.cs ┃ ┣━ 📄 IStructWithEnum.cs ┃ ┣━ 📄 IStructWithJavaReservedWords.cs ┃ ┣━ 📄 ISupportsNiceJavaBuilderProps.cs ┃ ┣━ 📄 ITopLevelStruct.cs ┃ ┣━ 📄 IUnionProperties.cs ┃ ┣━ 📄 IWallClock.cs ┃ ┣━ 📄 JavaReservedWords.cs ┃ ┣━ 📁 Jsii3656 ┃ ┃ ┣━ 📄 IImplementMeOpts.cs ┃ ┃ ┣━ 📄 ImplementMeOpts.cs ┃ ┃ ┗━ 📄 OverrideMe.cs ┃ ┣━ 📄 JSII417Derived.cs ┃ ┣━ 📄 JSII417PublicBaseOfBase.cs ┃ ┣━ 📄 Jsii487Derived.cs ┃ ┣━ 📄 Jsii496Derived.cs ┃ ┣━ 📄 JsiiAgent.cs ┃ ┣━ 📄 JSObjectLiteralForInterface.cs ┃ ┣━ 📄 JSObjectLiteralToNative.cs ┃ ┣━ 📄 JSObjectLiteralToNativeClass.cs ┃ ┣━ 📄 JsonFormatter.cs ┃ ┣━ 📄 LevelOne.cs ┃ ┣━ 📄 LevelOneProps.cs ┃ ┣━ 📄 LoadBalancedFargateServiceProps.cs ┃ ┣━ 📄 MethodNamedProperty.cs ┃ ┣━ 📁 Module2530 ┃ ┃ ┗━ 📄 MyClass.cs ┃ ┣━ 📁 Module2617 ┃ ┃ ┗━ 📄 OnlyStatics.cs ┃ ┣━ 📁 Module2647 ┃ ┃ ┗━ 📄 ExtendAndImplement.cs ┃ ┣━ 📁 Module2689 ┃ ┃ ┣━ 📁 Methods ┃ ┃ ┃ ┗━ 📄 MyClass.cs ┃ ┃ ┣━ 📁 Props ┃ ┃ ┃ ┗━ 📄 MyClass.cs ┃ ┃ ┣━ 📁 Retval ┃ ┃ ┃ ┗━ 📄 MyClass.cs ┃ ┃ ┗━ 📁 Structs ┃ ┃ ┣━ 📄 IMyStruct.cs ┃ ┃ ┗━ 📄 MyStruct.cs ┃ ┣━ 📁 Module2692 ┃ ┃ ┣━ 📁 Submodule1 ┃ ┃ ┃ ┣━ 📄 Bar.cs ┃ ┃ ┃ ┗━ 📄 IBar.cs ┃ ┃ ┗━ 📁 Submodule2 ┃ ┃ ┣━ 📄 Bar.cs ┃ ┃ ┣━ 📄 Foo.cs ┃ ┃ ┣━ 📄 IBar.cs ┃ ┃ ┗━ 📄 IFoo.cs ┃ ┣━ 📁 Module2700 ┃ ┃ ┣━ 📄 Base.cs ┃ ┃ ┣━ 📄 Derived.cs ┃ ┃ ┗━ 📄 IFoo.cs ┃ ┣━ 📁 Module2702 ┃ ┃ ┣━ 📄 Baz.cs ┃ ┃ ┣━ 📄 Class1.cs ┃ ┃ ┣━ 📄 Class2.cs ┃ ┃ ┣━ 📄 Class3.cs ┃ ┃ ┣━ 📄 Construct.cs ┃ ┃ ┣━ 📄 IBaz.cs ┃ ┃ ┣━ 📄 IConstruct.cs ┃ ┃ ┣━ 📄 IFoo.cs ┃ ┃ ┣━ 📄 IResource.cs ┃ ┃ ┣━ 📄 IVpc.cs ┃ ┃ ┣━ 📄 Resource.cs ┃ ┃ ┗━ 📄 Vpc.cs ┃ ┣━ 📄 Multiply.cs ┃ ┣━ 📄 NamespaceDoc.cs ┃ ┣━ 📄 Negate.cs ┃ ┣━ 📄 NestedClassInstance.cs ┃ ┣━ 📄 NestedStruct.cs ┃ ┣━ 📄 NodeStandardLibrary.cs ┃ ┣━ 📁 Nodirect ┃ ┃ ┣━ 📁 Sub1 ┃ ┃ ┃ ┗━ 📄 TypeFromSub1.cs ┃ ┃ ┗━ 📁 Sub2 ┃ ┃ ┗━ 📄 TypeFromSub2.cs ┃ ┣━ 📄 NullShouldBeTreatedAsUndefined.cs ┃ ┣━ 📄 NullShouldBeTreatedAsUndefinedData.cs ┃ ┣━ 📄 NumberGenerator.cs ┃ ┣━ 📄 ObjectRefsInCollections.cs ┃ ┣━ 📄 ObjectWithPropertyProvider.cs ┃ ┣━ 📄 Old.cs ┃ ┣━ 📁 Onlystatic ┃ ┃ ┗━ 📄 OnlyStaticMethods.cs ┃ ┣━ 📄 OptionalArgumentInvoker.cs ┃ ┣━ 📄 OptionalConstructorArgument.cs ┃ ┣━ 📄 OptionalStruct.cs ┃ ┣━ 📄 OptionalStructConsumer.cs ┃ ┣━ 📄 OverridableProtectedMember.cs ┃ ┣━ 📄 OverrideReturnsObject.cs ┃ ┣━ 📄 ParamShadowsBuiltins.cs ┃ ┣━ 📄 ParamShadowsBuiltinsProps.cs ┃ ┣━ 📄 ParamShadowsScope.cs ┃ ┣━ 📄 ParentStruct982.cs ┃ ┣━ 📄 PartiallyInitializedThisConsumer.cs ┃ ┣━ 📄 Polymorphism.cs ┃ ┣━ 📄 Power.cs ┃ ┣━ 📄 PromiseNothing.cs ┃ ┣━ 📄 PropertyNamedProperty.cs ┃ ┣━ 📄 PublicClass.cs ┃ ┣━ 📄 PythonReservedWords.cs ┃ ┣━ 📁 PythonSelf ┃ ┃ ┣━ 📄 ClassWithSelf.cs ┃ ┃ ┣━ 📄 ClassWithSelfKwarg.cs ┃ ┃ ┣━ 📄 IInterfaceWithSelf.cs ┃ ┃ ┣━ 📄 IStructWithSelf.cs ┃ ┃ ┗━ 📄 StructWithSelf.cs ┃ ┣━ 📄 ReferenceEnumFromScopedPackage.cs ┃ ┣━ 📄 ReturnsPrivateImplementationOfInterface.cs ┃ ┣━ 📄 RootStruct.cs ┃ ┣━ 📄 RootStructValidator.cs ┃ ┣━ 📄 RuntimeTypeChecking.cs ┃ ┣━ 📄 SecondLevelStruct.cs ┃ ┣━ 📄 SingleInstanceTwoTypes.cs ┃ ┣━ 📄 SingletonInt.cs ┃ ┣━ 📄 SingletonIntEnum.cs ┃ ┣━ 📄 SingletonString.cs ┃ ┣━ 📄 SingletonStringEnum.cs ┃ ┣━ 📄 SmellyStruct.cs ┃ ┣━ 📄 SomeTypeJsii976.cs ┃ ┣━ 📄 StableClass.cs ┃ ┣━ 📄 StableEnum.cs ┃ ┣━ 📄 StableStruct.cs ┃ ┣━ 📄 StaticContext.cs ┃ ┣━ 📄 StaticHelloChild.cs ┃ ┣━ 📄 StaticHelloParent.cs ┃ ┣━ 📄 Statics.cs ┃ ┣━ 📄 StringEnum.cs ┃ ┣━ 📄 StripInternal.cs ┃ ┣━ 📄 StructA.cs ┃ ┣━ 📄 StructB.cs ┃ ┣━ 📄 StructParameterType.cs ┃ ┣━ 📄 StructPassing.cs ┃ ┣━ 📄 StructUnionConsumer.cs ┃ ┣━ 📄 StructWithCollectionOfUnionts.cs ┃ ┣━ 📄 StructWithEnum.cs ┃ ┣━ 📄 StructWithJavaReservedWords.cs ┃ ┣━ 📁 Submodule ┃ ┃ ┣━ 📁 BackReferences ┃ ┃ ┃ ┣━ 📄 IMyClassReference.cs ┃ ┃ ┃ ┗━ 📄 MyClassReference.cs ┃ ┃ ┣━ 📁 Child ┃ ┃ ┃ ┣━ 📄 Awesomeness.cs ┃ ┃ ┃ ┣━ 📄 Goodness.cs ┃ ┃ ┃ ┣━ 📄 IKwargsProps.cs ┃ ┃ ┃ ┣━ 📄 InnerClass.cs ┃ ┃ ┃ ┣━ 📄 ISomeStruct.cs ┃ ┃ ┃ ┣━ 📄 IStructure.cs ┃ ┃ ┃ ┣━ 📄 KwargsProps.cs ┃ ┃ ┃ ┣━ 📄 OuterClass.cs ┃ ┃ ┃ ┣━ 📄 SomeEnum.cs ┃ ┃ ┃ ┣━ 📄 SomeStruct.cs ┃ ┃ ┃ ┗━ 📄 Structure.cs ┃ ┃ ┣━ 📄 Default.cs ┃ ┃ ┣━ 📄 IDefault.cs ┃ ┃ ┣━ 📁 Isolated ┃ ┃ ┃ ┣━ 📄 Kwargs.cs ┃ ┃ ┃ ┗━ 📄 NamespaceDoc.cs ┃ ┃ ┣━ 📄 MyClass.cs ┃ ┃ ┣━ 📄 NamespaceDoc.cs ┃ ┃ ┣━ 📁 NestedSubmodule ┃ ┃ ┃ ┣━ 📁 DeeplyNested ┃ ┃ ┃ ┃ ┗━ 📄 INamespaced.cs ┃ ┃ ┃ ┗━ 📄 Namespaced.cs ┃ ┃ ┣━ 📁 Param ┃ ┃ ┃ ┣━ 📄 ISpecialParameter.cs ┃ ┃ ┃ ┗━ 📄 SpecialParameter.cs ┃ ┃ ┗━ 📁 Returnsparam ┃ ┃ ┗━ 📄 ReturnsSpecialParameter.cs ┃ ┣━ 📄 Sum.cs ┃ ┣━ 📄 SupportsNiceJavaBuilder.cs ┃ ┣━ 📄 SupportsNiceJavaBuilderProps.cs ┃ ┣━ 📄 SupportsNiceJavaBuilderWithRequiredProps.cs ┃ ┣━ 📄 SyncVirtualMethods.cs ┃ ┣━ 📄 TestStructWithEnum.cs ┃ ┣━ 📄 Thrower.cs ┃ ┣━ 📄 TopLevelStruct.cs ┃ ┣━ 📄 TwoMethodsWithSimilarCapitalization.cs ┃ ┣━ 📄 UmaskCheck.cs ┃ ┣━ 📄 UnaryOperation.cs ┃ ┣━ 📁 Union ┃ ┃ ┣━ 📄 ConsumesUnion.cs ┃ ┃ ┣━ 📄 IResolvable.cs ┃ ┃ ┗━ 📄 Resolvable.cs ┃ ┣━ 📄 UnionProperties.cs ┃ ┣━ 📄 UpcasingReflectable.cs ┃ ┣━ 📄 UseBundledDependency.cs ┃ ┣━ 📄 UseCalcBase.cs ┃ ┣━ 📄 UsesInterfaceWithProperties.cs ┃ ┣━ 📄 VariadicInvoker.cs ┃ ┣━ 📄 VariadicMethod.cs ┃ ┣━ 📄 VariadicTypeUnion.cs ┃ ┣━ 📄 VirtualMethodPlayground.cs ┃ ┣━ 📄 VoidCallback.cs ┃ ┣━ 📄 WeirdDocs.cs ┃ ┗━ 📄 WithPrivatePropertyInConstructor.cs ┣━ 📄 Amazon.JSII.Tests.CalculatorPackageId.csproj ┣━ 📄 AssemblyInfo.cs ┣━ 📄 jsii-calc-3.20.120.tgz ┣━ 📄 LICENSE ┣━ 📄 NOTICE ┗━ 📁 resources ┗━ 📄 AWSLogo128x128.png `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj 1`] = ` A simple calcuator built on JSII. (Stability: Stable) resources\\AWSLogo128x128.png https://sdk-for-net.amazonwebservices.com/images/AWSLogo128x128.png Amazon.JSII.Tests.CalculatorPackageId Apache-2.0 3.20.120 Amazon Web Services Amazon Web Services aws;jsii;test en-US https://github.com/aws/jsii https://github.com/aws/jsii.git git true true true true enable snupkg netcoreapp3.1 Major 0612,0618 0108,0109 `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass), fullyQualifiedName: "jsii-calc.AbstractClass")] public abstract class AbstractClass : Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceImplementedByAbstractClass { protected AbstractClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClass(DeputyProps props): base(props) { } [JsiiMethod(name: "abstractMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"name\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public abstract string AbstractMethod(string name); [JsiiMethod(name: "nonAbstractMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double NonAbstractMethod() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "propFromInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string PropFromInterface { get => GetInstanceProperty()!; } [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass), fullyQualifiedName: "jsii-calc.AbstractClass")] new internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClass { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public override string AbstractProperty { get => GetInstanceProperty()!; } [JsiiMethod(name: "abstractMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"name\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public override string AbstractMethod(string name) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{name})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase), fullyQualifiedName: "jsii-calc.AbstractClassBase")] public abstract class AbstractClassBase : DeputyBase { protected AbstractClassBase(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClassBase(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClassBase(DeputyProps props): base(props) { } [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public abstract string AbstractProperty { get; } [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase), fullyQualifiedName: "jsii-calc.AbstractClassBase")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "abstractProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public override string AbstractProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassReturner.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClassReturner), fullyQualifiedName: "jsii-calc.AbstractClassReturner")] public class AbstractClassReturner : DeputyBase { public AbstractClassReturner(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClassReturner(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractClassReturner(DeputyProps props): base(props) { } [JsiiMethod(name: "giveMeAbstract", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.AbstractClass GiveMeAbstract() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "giveMeInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IInterfaceImplementedByAbstractClass\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IInterfaceImplementedByAbstractClass GiveMeInterface() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "returnAbstractFromProperty", typeJson: "{\\"fqn\\":\\"jsii-calc.AbstractClassBase\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.AbstractClassBase ReturnAbstractFromProperty { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuite.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Ensures abstract members implementations correctly register overrides in various languages. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite), fullyQualifiedName: "jsii-calc.AbstractSuite")] public abstract class AbstractSuite : DeputyBase { protected AbstractSuite(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractSuite(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AbstractSuite(DeputyProps props): base(props) { } [JsiiMethod(name: "someMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"str\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] protected abstract string SomeMethod(string str); /// Sets \`seed\` to \`this.property\`, then calls \`someMethod\` with \`this.property\` and returns the result. /// a \`string\`. [JsiiMethod(name: "workItAll", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"a \`string\`.\\"},\\"name\\":\\"seed\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual string WorkItAll(string seed) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{seed})!; } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] protected abstract string Property { get; set; } /// Ensures abstract members implementations correctly register overrides in various languages. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite), fullyQualifiedName: "jsii-calc.AbstractSuite")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.AbstractSuite { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] protected override string Property { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiMethod(name: "someMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"str\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] protected override string SomeMethod(string str) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{str})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "+" binary operation. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Add), fullyQualifiedName: "jsii-calc.Add", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Add : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation { /// Creates a BinaryOperation. /// Left-hand side operand. /// Right-hand side operand. public Add(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(_MakeDeputyProps(lhs, rhs)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs) { return new DeputyProps(new object?[]{lhs, rhs}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Add(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Add(DeputyProps props): base(props) { } /// String representation of the value. [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// The value. [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public override double Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This class includes property for all types supported by jsii. /// /// The setters will validate /// that the value set is of the expected type and throw otherwise. /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypes), fullyQualifiedName: "jsii-calc.AllTypes")] public class AllTypes : DeputyBase { public AllTypes(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AllTypes(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AllTypes(DeputyProps props): base(props) { } [JsiiMethod(name: "anyIn", parametersJson: "[{\\"name\\":\\"inp\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public virtual void AnyIn(object inp) { InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object[]{inp}); } [JsiiMethod(name: "anyOut", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public virtual object AnyOut() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "enumMethod", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StringEnum\\"}}", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.StringEnum\\"}}]")] public virtual Amazon.JSII.Tests.CalculatorNamespace.StringEnum EnumMethod(Amazon.JSII.Tests.CalculatorNamespace.StringEnum @value) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.StringEnum)}, new object[]{@value})!; } [JsiiProperty(name: "enumPropertyValue", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double EnumPropertyValue { get => GetInstanceProperty()!; } [JsiiProperty(name: "anyArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] public virtual object[] AnyArrayProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "anyMapProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary AnyMapProperty { get => GetInstanceProperty>()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "anyProperty", typeJson: "{\\"primitive\\":\\"any\\"}")] public virtual object AnyProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "arrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public virtual string[] ArrayProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "booleanProperty", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool BooleanProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "dateProperty", typeJson: "{\\"primitive\\":\\"date\\"}")] public virtual System.DateTime DateProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "enumProperty", typeJson: "{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum EnumProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "jsonProperty", typeJson: "{\\"primitive\\":\\"json\\"}")] public virtual Newtonsoft.Json.Linq.JObject JsonProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "mapProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary MapProperty { get => GetInstanceProperty>()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "numberProperty", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double NumberProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string StringProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "unionArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}]}},\\"kind\\":\\"array\\"}}")] public virtual object[] UnionArrayProperty { get => GetInstanceProperty()!; set { SetInstanceProperty(value); } } [JsiiProperty(name: "unionMapProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}]}},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary UnionMapProperty { get => GetInstanceProperty>()!; set { SetInstanceProperty(value); } } [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},{\\"fqn\\":\\"jsii-calc.Multiply\\"}]}}")] public virtual object UnionProperty { get => GetInstanceProperty()!; set { SetInstanceProperty(value); } } [JsiiProperty(name: "unknownArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] public virtual object[] UnknownArrayProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "unknownMapProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary UnknownMapProperty { get => GetInstanceProperty>()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "unknownProperty", typeJson: "{\\"primitive\\":\\"any\\"}")] public virtual object UnknownProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiOptional] [JsiiProperty(name: "optionalEnumValue", typeJson: "{\\"fqn\\":\\"jsii-calc.StringEnum\\"}", isOptional: true)] public virtual Amazon.JSII.Tests.CalculatorNamespace.StringEnum? OptionalEnumValue { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiEnum(nativeType: typeof(AllTypesEnum), fullyQualifiedName: "jsii-calc.AllTypesEnum")] public enum AllTypesEnum { [JsiiEnumMember(name: "MY_ENUM_VALUE")] MY_ENUM_VALUE, [JsiiEnumMember(name: "YOUR_ENUM_VALUE")] YOUR_ENUM_VALUE, [JsiiEnumMember(name: "THIS_IS_GREAT")] THIS_IS_GREAT } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AllowedMethodNames), fullyQualifiedName: "jsii-calc.AllowedMethodNames")] public class AllowedMethodNames : DeputyBase { public AllowedMethodNames(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AllowedMethodNames(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AllowedMethodNames(DeputyProps props): base(props) { } [JsiiMethod(name: "getBar", parametersJson: "[{\\"name\\":\\"_p1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"_p2\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void GetBar(string p1, double p2) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object[]{p1, p2}); } /// getXxx() is not allowed (see negatives), but getXxx(a, ...) is okay. [JsiiMethod(name: "getFoo", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"withParam\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual string GetFoo(string withParam) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{withParam})!; } [JsiiMethod(name: "setBar", parametersJson: "[{\\"name\\":\\"_x\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"_y\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"_z\\",\\"type\\":{\\"primitive\\":\\"boolean\\"}}]")] public virtual void SetBar(string x, double y, bool z) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double), typeof(bool)}, new object[]{x, y, z}); } /// setFoo(x) is not allowed (see negatives), but setXxx(a, b, ...) is okay. [JsiiMethod(name: "setFoo", parametersJson: "[{\\"name\\":\\"_x\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"_y\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void SetFoo(string x, double y) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object[]{x, y}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AmbiguousParameters.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AmbiguousParameters), fullyQualifiedName: "jsii-calc.AmbiguousParameters", parametersJson: "[{\\"name\\":\\"scope\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}},{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.StructParameterType\\"}}]")] public class AmbiguousParameters : DeputyBase { public AmbiguousParameters(Amazon.JSII.Tests.CalculatorNamespace.Bell scope, Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType props): base(_MakeDeputyProps(scope, props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.Bell scope, Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType props) { return new DeputyProps(new object?[]{scope, props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AmbiguousParameters(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AmbiguousParameters(DeputyProps props): base(props) { } [JsiiProperty(name: "props", typeJson: "{\\"fqn\\":\\"jsii-calc.StructParameterType\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType Props { get => GetInstanceProperty()!; } [JsiiProperty(name: "scope", typeJson: "{\\"fqn\\":\\"jsii-calc.Bell\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Bell Scope { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/IOptionA.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Anonymous { [JsiiInterface(nativeType: typeof(IOptionA), fullyQualifiedName: "jsii-calc.anonymous.IOptionA")] public interface IOptionA { [JsiiMethod(name: "doSomething", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string DoSomething(); [JsiiTypeProxy(nativeType: typeof(IOptionA), fullyQualifiedName: "jsii-calc.anonymous.IOptionA")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionA { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "doSomething", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string DoSomething() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/IOptionB.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Anonymous { [JsiiInterface(nativeType: typeof(IOptionB), fullyQualifiedName: "jsii-calc.anonymous.IOptionB")] public interface IOptionB { [JsiiMethod(name: "doSomethingElse", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string DoSomethingElse(); [JsiiTypeProxy(nativeType: typeof(IOptionB), fullyQualifiedName: "jsii-calc.anonymous.IOptionB")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionB { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "doSomethingElse", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string DoSomethingElse() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/UseOptions.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Anonymous { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.UseOptions), fullyQualifiedName: "jsii-calc.anonymous.UseOptions")] public class UseOptions : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseOptions(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseOptions(DeputyProps props): base(props) { } [JsiiMethod(name: "consume", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"option\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.anonymous.IOptionA\\"},{\\"fqn\\":\\"jsii-calc.anonymous.IOptionB\\"}]}}}]")] public static string Consume(object option) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.UseOptions), new System.Type[]{typeof(object)}, new object[]{option})!; } [JsiiMethod(name: "privideAsAny", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"name\\":\\"which\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static object PrivideAsAny(string which) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.UseOptions), new System.Type[]{typeof(string)}, new object[]{which})!; } [JsiiMethod(name: "provide", returnsJson: "{\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.anonymous.IOptionA\\"},{\\"fqn\\":\\"jsii-calc.anonymous.IOptionB\\"}]}}}", parametersJson: "[{\\"name\\":\\"which\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static object Provide(string which) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.UseOptions), new System.Type[]{typeof(string)}, new object[]{which})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnonymousImplementationProvider.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AnonymousImplementationProvider), fullyQualifiedName: "jsii-calc.AnonymousImplementationProvider")] public class AnonymousImplementationProvider : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymousImplementationProvider { public AnonymousImplementationProvider(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AnonymousImplementationProvider(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AnonymousImplementationProvider(DeputyProps props): base(props) { } [JsiiMethod(name: "provideAsClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Implementation\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnyPropertyAccess.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AnyPropertyAccess), fullyQualifiedName: "jsii-calc.AnyPropertyAccess")] public class AnyPropertyAccess : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AnyPropertyAccess(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AnyPropertyAccess(DeputyProps props): base(props) { } /// Sets obj[resultProp] to \`\${obj[propA]}+\${obj[propB]}\`. /// the receiver object. /// the first property to read. /// the second property to read. /// the property to write into. [JsiiMethod(name: "mutateProperties", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the receiver object.\\"},\\"name\\":\\"obj\\",\\"type\\":{\\"primitive\\":\\"any\\"}},{\\"docs\\":{\\"summary\\":\\"the first property to read.\\"},\\"name\\":\\"propA\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"docs\\":{\\"summary\\":\\"the second property to read.\\"},\\"name\\":\\"propB\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"docs\\":{\\"summary\\":\\"the property to write into.\\"},\\"name\\":\\"resultProp\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static void MutateProperties(object obj, string propA, string propB, string resultProp) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.AnyPropertyAccess), new System.Type[]{typeof(object), typeof(string), typeof(string), typeof(string)}, new object[]{obj, propA, propB, resultProp}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AsyncVirtualMethods), fullyQualifiedName: "jsii-calc.AsyncVirtualMethods")] public class AsyncVirtualMethods : DeputyBase { public AsyncVirtualMethods(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AsyncVirtualMethods(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AsyncVirtualMethods(DeputyProps props): base(props) { } [JsiiMethod(name: "callMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", isAsync: true)] public virtual double CallMe() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Just calls "overrideMeToo". [JsiiMethod(name: "callMe2", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", isAsync: true)] public virtual double CallMe2() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// This method calls the "callMe" async method indirectly, which will then invoke a virtual method. /// /// This is a "double promise" situation, which /// means that callbacks are not going to be available immediate, but only /// after an "immediates" cycle. /// [JsiiMethod(name: "callMeDoublePromise", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", isAsync: true)] public virtual double CallMeDoublePromise() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "dontOverrideMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double DontOverrideMe() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "overrideMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"mult\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]", isAsync: true)] public virtual double OverrideMe(double mult) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{mult})!; } [JsiiMethod(name: "overrideMeToo", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", isAsync: true)] public virtual double OverrideMeToo() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.AugmentableClass), fullyQualifiedName: "jsii-calc.AugmentableClass")] public class AugmentableClass : DeputyBase { public AugmentableClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AugmentableClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AugmentableClass(DeputyProps props): base(props) { } [JsiiMethod(name: "methodOne")] public virtual void MethodOne() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "methodTwo")] public virtual void MethodTwo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseClass), fullyQualifiedName: "jsii-calc.BaseClass")] public abstract class BaseClass : DeputyBase { protected BaseClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseClass(DeputyProps props): base(props) { } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double Method() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Property { get => GetInstanceProperty()!; } [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseClass), fullyQualifiedName: "jsii-calc.BaseClass")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BaseClass { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseJsii976.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BaseJsii976), fullyQualifiedName: "jsii-calc.BaseJsii976")] public class BaseJsii976 : DeputyBase { public BaseJsii976(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseJsii976(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BaseJsii976(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Bell.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Bell), fullyQualifiedName: "jsii-calc.Bell")] public class Bell : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBell { public Bell(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Bell(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Bell(DeputyProps props): base(props) { } [JsiiMethod(name: "ring")] public virtual void Ring() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "rung", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool Rung { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Represents an operation with two operands. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public abstract class BinaryOperation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { /// Creates a BinaryOperation. /// Left-hand side operand. /// Right-hand side operand. protected BinaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(_MakeDeputyProps(lhs, rhs)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs) { return new DeputyProps(new object?[]{lhs, rhs}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BinaryOperation(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BinaryOperation(DeputyProps props): base(props) { } /// Say hello! [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Left-hand side operand. [JsiiProperty(name: "lhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Lhs { get => GetInstanceProperty()!; } /// Right-hand side operand. [JsiiProperty(name: "rhs", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Rhs { get => GetInstanceProperty()!; } /// Represents an operation with two operands. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation), fullyQualifiedName: "jsii-calc.BinaryOperation")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) The value. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public override double Value { get => GetInstanceProperty()!; } /// (deprecated) String representation of the value. /// /// Stability: Deprecated /// [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BurriedAnonymousObject.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// See https://github.com/aws/aws-cdk/issues/7977. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject), fullyQualifiedName: "jsii-calc.BurriedAnonymousObject")] public abstract class BurriedAnonymousObject : DeputyBase { protected BurriedAnonymousObject(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BurriedAnonymousObject(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected BurriedAnonymousObject(DeputyProps props): base(props) { } [JsiiMethod(name: "check", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] public virtual bool Check() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Implement this method and have it return it's parameter. /// the value that should be returned. /// \`value\` [JsiiMethod(name: "giveItBack", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value that should be returned.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public abstract object GiveItBack(object @value); /// See https://github.com/aws/aws-cdk/issues/7977. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject), fullyQualifiedName: "jsii-calc.BurriedAnonymousObject")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.BurriedAnonymousObject { private _Proxy(ByRefValue reference): base(reference) { } /// Implement this method and have it return it's parameter. /// the value that should be returned. /// \`value\` [JsiiMethod(name: "giveItBack", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value that should be returned.\\"},\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public override object GiveItBack(object @value) { return InvokeInstanceMethod(new System.Type[]{typeof(object)}, new object[]{@value})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// A calculator which maintains a current value and allows adding operations. /// /// Here's how you use it: /// /// /// /// I will repeat this example again, but in an @example tag. /// /// /// var calculator = new Calculator(); /// calculator.Add(5); /// calculator.Mul(3); /// Console.WriteLine(calculator.Expression.Value); /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Calculator), fullyQualifiedName: "jsii-calc.Calculator", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Initialization properties.\\"},\\"name\\":\\"props\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.CalculatorProps\\"}}]")] public class Calculator : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { /// Creates a Calculator object. /// Initialization properties. public Calculator(Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps? props = null): base(_MakeDeputyProps(props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps? props = null) { return new DeputyProps(new object?[]{props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Calculator(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Calculator(DeputyProps props): base(props) { } /// Adds a number to the current value. [JsiiMethod(name: "add", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void Add(double @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double)}, new object[]{@value}); } /// Multiplies the current value by a number. [JsiiMethod(name: "mul", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void Mul(double @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double)}, new object[]{@value}); } /// Negates the current value. [JsiiMethod(name: "neg")] public virtual void Neg() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// Raises the current value by a power. [JsiiMethod(name: "pow", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void Pow(double @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double)}, new object[]{@value}); } /// Returns teh value of the union property (if defined). [JsiiMethod(name: "readUnionValue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double ReadUnionValue() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Returns the expression. [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get => GetInstanceProperty()!; } /// A log of all operations. [JsiiProperty(name: "operationsLog", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] OperationsLog { get => GetInstanceProperty()!; } /// A map of per operation name of all operations performed. [JsiiProperty(name: "operationsMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary OperationsMap { get => GetInstanceProperty>()!; } /// The current value. [JsiiProperty(name: "curr", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Curr { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } /// The maximum value allows in this calculator. [JsiiOptional] [JsiiProperty(name: "maxValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public virtual double? MaxValue { get => GetInstanceProperty(); set => SetInstanceProperty(value); } /// Example of a property that accepts a union of types. [JsiiOptional] [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.Add\\"},{\\"fqn\\":\\"jsii-calc.Multiply\\"},{\\"fqn\\":\\"jsii-calc.Power\\"}]}}", isOptional: true)] public virtual object? UnionProperty { get => GetInstanceProperty(); set { SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. [JsiiByValue(fqn: "jsii-calc.CalculatorProps")] public class CalculatorProps : Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps { /// The initial value of the calculator. /// /// NOTE: Any number works here, it's fine. /// /// Default: 0 /// [JsiiOptional] [JsiiProperty(name: "initialValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? InitialValue { get; set; } /// The maximum value the calculator can store. /// /// Default: none /// [JsiiOptional] [JsiiProperty(name: "maximumValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? MaximumValue { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Cdk16625/Cdk16625.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Cdk16625 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Cdk16625.Cdk16625), fullyQualifiedName: "jsii-calc.cdk16625.Cdk16625")] public abstract class Cdk16625 : DeputyBase { protected Cdk16625(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Cdk16625(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Cdk16625(DeputyProps props): base(props) { } /// Run this function to verify that everything is working as it should. [JsiiMethod(name: "test")] public virtual void Test() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). /// a VERY pseudo random number generator. [JsiiMethod(name: "unwrap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"a VERY pseudo random number generator.\\"},\\"name\\":\\"gen\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IRandomNumberGenerator\\"}}]")] protected abstract double Unwrap(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator gen); [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Cdk16625.Cdk16625), fullyQualifiedName: "jsii-calc.cdk16625.Cdk16625")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Cdk16625.Cdk16625 { private _Proxy(ByRefValue reference): base(reference) { } /// Implement this functin to return \`gen.next()\`. It is extremely important that the \`donotimport\` submodule is NEVER explicitly loaded in the testing application (otherwise this test is void). /// a VERY pseudo random number generator. [JsiiMethod(name: "unwrap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"a VERY pseudo random number generator.\\"},\\"name\\":\\"gen\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IRandomNumberGenerator\\"}}]")] protected override double Unwrap(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator gen) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator)}, new object[]{gen})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Cdk16625/Donotimport/UnimportedSubmoduleType.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Cdk16625.Donotimport { /// This type demonstrates the ability to receive a callback argument that has a type from a submodule not explicitly imported in the user's code. /// /// This checks /// that all types available in the assembly can be resolved by the runtime /// library, regardless of whether they were explicitly referenced or not. /// /// See: https://github.com/aws/aws-cdk/issues/16625 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Cdk16625.Donotimport.UnimportedSubmoduleType), fullyQualifiedName: "jsii-calc.cdk16625.donotimport.UnimportedSubmoduleType", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public class UnimportedSubmoduleType : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator { public UnimportedSubmoduleType(double @value): base(_MakeDeputyProps(@value)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double @value) { return new DeputyProps(new object?[]{@value}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UnimportedSubmoduleType(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UnimportedSubmoduleType(DeputyProps props): base(props) { } /// Not quite random, but it'll do. /// 1337 [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double Next() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Cdk22369/AcceptsPath.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Cdk22369 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Cdk22369.AcceptsPath), fullyQualifiedName: "jsii-calc.cdk22369.AcceptsPath", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.cdk22369.AcceptsPathProps\\"}}]")] public class AcceptsPath : DeputyBase { public AcceptsPath(Amazon.JSII.Tests.CalculatorNamespace.Cdk22369.IAcceptsPathProps props): base(_MakeDeputyProps(props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.Cdk22369.IAcceptsPathProps props) { return new DeputyProps(new object?[]{props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AcceptsPath(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected AcceptsPath(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Cdk22369/AcceptsPathProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Cdk22369 { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.cdk22369.AcceptsPathProps")] public class AcceptsPathProps : Amazon.JSII.Tests.CalculatorNamespace.Cdk22369.IAcceptsPathProps { /// A path that doesn't exist. [JsiiProperty(name: "sourcePath", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SourcePath { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Cdk22369/IAcceptsPathProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Cdk22369 { [JsiiInterface(nativeType: typeof(IAcceptsPathProps), fullyQualifiedName: "jsii-calc.cdk22369.AcceptsPathProps")] public interface IAcceptsPathProps { /// A path that doesn't exist. [JsiiProperty(name: "sourcePath", typeJson: "{\\"primitive\\":\\"string\\"}")] string SourcePath { get; } [JsiiTypeProxy(nativeType: typeof(IAcceptsPathProps), fullyQualifiedName: "jsii-calc.cdk22369.AcceptsPathProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Cdk22369.IAcceptsPathProps { private _Proxy(ByRefValue reference): base(reference) { } /// A path that doesn't exist. [JsiiProperty(name: "sourcePath", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SourcePath { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.ChildStruct982")] public class ChildStruct982 : Amazon.JSII.Tests.CalculatorNamespace.IChildStruct982 { [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Bar { get; set; } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassThatImplementsTheInternalInterface), fullyQualifiedName: "jsii-calc.ClassThatImplementsTheInternalInterface")] public class ClassThatImplementsTheInternalInterface : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface { public ClassThatImplementsTheInternalInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassThatImplementsTheInternalInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassThatImplementsTheInternalInterface(DeputyProps props): base(props) { } [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string A { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string B { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string C { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "d", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string D { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsThePrivateInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassThatImplementsThePrivateInterface), fullyQualifiedName: "jsii-calc.ClassThatImplementsThePrivateInterface")] public class ClassThatImplementsThePrivateInterface : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface { public ClassThatImplementsThePrivateInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassThatImplementsThePrivateInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassThatImplementsThePrivateInterface(DeputyProps props): base(props) { } [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string A { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string B { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string C { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "e", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string E { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollectionOfUnions.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollectionOfUnions), fullyQualifiedName: "jsii-calc.ClassWithCollectionOfUnions", parametersJson: "[{\\"name\\":\\"unionProperty\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},\\"kind\\":\\"array\\"}}}]")] public class ClassWithCollectionOfUnions : DeputyBase { public ClassWithCollectionOfUnions(System.Collections.Generic.IDictionary[] unionProperty): base(_MakeDeputyProps(unionProperty)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(System.Collections.Generic.IDictionary[] unionProperty) { return new DeputyProps(new object?[]{unionProperty}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithCollectionOfUnions(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithCollectionOfUnions(DeputyProps props): base(props) { } [JsiiProperty(name: "unionProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},\\"kind\\":\\"array\\"}}")] public virtual System.Collections.Generic.IDictionary[] UnionProperty { get => GetInstanceProperty[]>()!; set { SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollections.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections), fullyQualifiedName: "jsii-calc.ClassWithCollections", parametersJson: "[{\\"name\\":\\"map\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"map\\"}}},{\\"name\\":\\"array\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}}]")] public class ClassWithCollections : DeputyBase { public ClassWithCollections(System.Collections.Generic.IDictionary map, string[] array): base(_MakeDeputyProps(map, array)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(System.Collections.Generic.IDictionary map, string[] array) { return new DeputyProps(new object?[]{map, array}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithCollections(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithCollections(DeputyProps props): base(props) { } [JsiiMethod(name: "createAList", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}}")] public static string[] CreateAList() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "createAMap", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"map\\"}}}")] public static System.Collections.Generic.IDictionary CreateAMap() { return InvokeStaticMethod>(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections), new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "staticArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public static string[] StaticArray { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections))!; set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections), value); } [JsiiProperty(name: "staticMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"map\\"}}")] public static System.Collections.Generic.IDictionary StaticMap { get => GetStaticProperty>(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections))!; set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithCollections), value); } [JsiiProperty(name: "array", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public virtual string[] Array { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "map", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary Map { get => GetInstanceProperty>()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithContainerTypes.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithContainerTypes), fullyQualifiedName: "jsii-calc.ClassWithContainerTypes", parametersJson: "[{\\"name\\":\\"array\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"array\\"}}},{\\"name\\":\\"record\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}},{\\"name\\":\\"obj\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}},{\\"name\\":\\"props\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.ContainerProps\\"}}]")] public class ClassWithContainerTypes : DeputyBase { public ClassWithContainerTypes(Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] array, System.Collections.Generic.IDictionary record, System.Collections.Generic.IDictionary obj, Amazon.JSII.Tests.CalculatorNamespace.IContainerProps? props = null): base(_MakeDeputyProps(array, record, obj, props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] array, System.Collections.Generic.IDictionary record, System.Collections.Generic.IDictionary obj, Amazon.JSII.Tests.CalculatorNamespace.IContainerProps? props = null) { return new DeputyProps(new object?[]{array, record, obj, props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithContainerTypes(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithContainerTypes(DeputyProps props): base(props) { } [JsiiProperty(name: "array", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"array\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] Array { get => GetInstanceProperty()!; } [JsiiProperty(name: "obj", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary Obj { get => GetInstanceProperty>()!; } [JsiiProperty(name: "record", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary Record { get => GetInstanceProperty>()!; } [JsiiOptional] [JsiiProperty(name: "props", typeJson: "{\\"fqn\\":\\"jsii-calc.ContainerProps\\"}", isOptional: true)] public virtual Amazon.JSII.Tests.CalculatorNamespace.IContainerProps? Props { get => GetInstanceProperty(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithDocs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This class has docs. /// /// The docs are great. They're a bunch of tags. /// /// See: https://aws.amazon.com/ /// /// CustomAttribute: hasAValue /// /// /// public void AnExample() /// { /// } /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithDocs), fullyQualifiedName: "jsii-calc.ClassWithDocs")] public class ClassWithDocs : DeputyBase { public ClassWithDocs(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithDocs(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithDocs(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithJavaReservedWords.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithJavaReservedWords), fullyQualifiedName: "jsii-calc.ClassWithJavaReservedWords", parametersJson: "[{\\"name\\":\\"int\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class ClassWithJavaReservedWords : DeputyBase { public ClassWithJavaReservedWords(string @int): base(_MakeDeputyProps(@int)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string @int) { return new DeputyProps(new object?[]{@int}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithJavaReservedWords(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithJavaReservedWords(DeputyProps props): base(props) { } [JsiiMethod(name: "import", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"assert\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual string Import(string assert) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{assert})!; } [JsiiProperty(name: "int", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Int { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithMutableObjectLiteralProperty.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithMutableObjectLiteralProperty), fullyQualifiedName: "jsii-calc.ClassWithMutableObjectLiteralProperty")] public class ClassWithMutableObjectLiteralProperty : DeputyBase { public ClassWithMutableObjectLiteralProperty(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithMutableObjectLiteralProperty(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithMutableObjectLiteralProperty(DeputyProps props): base(props) { } [JsiiProperty(name: "mutableObject", typeJson: "{\\"fqn\\":\\"jsii-calc.IMutableObjectLiteral\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IMutableObjectLiteral MutableObject { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithNestedUnion.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithNestedUnion), fullyQualifiedName: "jsii-calc.ClassWithNestedUnion", parametersJson: "[{\\"name\\":\\"unionProperty\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"array\\"}}]}},\\"kind\\":\\"array\\"}}}]")] public class ClassWithNestedUnion : DeputyBase { public ClassWithNestedUnion(object[] unionProperty): base(_MakeDeputyProps(unionProperty)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(object[] unionProperty) { return new DeputyProps(new object?[]{unionProperty}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithNestedUnion(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithNestedUnion(DeputyProps props): base(props) { } [JsiiProperty(name: "unionProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"array\\"}}]}},\\"kind\\":\\"array\\"}}")] public virtual object[] UnionProperty { get => GetInstanceProperty()!; set { SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithPrivateConstructorAndAutomaticProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Class that implements interface properties automatically, but using a private constructor. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithPrivateConstructorAndAutomaticProperties), fullyQualifiedName: "jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties")] public class ClassWithPrivateConstructorAndAutomaticProperties : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithPrivateConstructorAndAutomaticProperties(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithPrivateConstructorAndAutomaticProperties(DeputyProps props): base(props) { } [JsiiMethod(name: "create", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.ClassWithPrivateConstructorAndAutomaticProperties\\"}}", parametersJson: "[{\\"name\\":\\"readOnlyString\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"readWriteString\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static Amazon.JSII.Tests.CalculatorNamespace.ClassWithPrivateConstructorAndAutomaticProperties Create(string readOnlyString, string readWriteString) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ClassWithPrivateConstructorAndAutomaticProperties), new System.Type[]{typeof(string), typeof(string)}, new object[]{readOnlyString, readWriteString})!; } [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadOnlyString { get => GetInstanceProperty()!; } [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadWriteString { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Composition/CompositeOperation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Composition { /// Abstract operation composed from an expression of other operations. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation), fullyQualifiedName: "jsii-calc.composition.CompositeOperation")] public abstract class CompositeOperation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation { protected CompositeOperation(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected CompositeOperation(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected CompositeOperation(DeputyProps props): base(props) { } /// String representation of the value. [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// The expression that this operation consists of. /// /// Must be implemented by derived classes. /// [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public abstract Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get; } /// The value. [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public override double Value { get => GetInstanceProperty()!; } /// A set of postfixes to include in a decorated .toString(). [JsiiProperty(name: "decorationPostfixes", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public virtual string[] DecorationPostfixes { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } /// A set of prefixes to include in a decorated .toString(). [JsiiProperty(name: "decorationPrefixes", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public virtual string[] DecorationPrefixes { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } /// The .toString() style. [JsiiProperty(name: "stringStyle", typeJson: "{\\"fqn\\":\\"jsii-calc.composition.CompositeOperation.CompositionStringStyle\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation.CompositionStringStyle StringStyle { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } /// Style of .toString() output for CompositeOperation. [JsiiEnum(nativeType: typeof(CompositionStringStyle), fullyQualifiedName: "jsii-calc.composition.CompositeOperation.CompositionStringStyle")] public enum CompositionStringStyle { /// Normal string expression. [JsiiEnumMember(name: "NORMAL")] NORMAL, /// Decorated string expression. [JsiiEnumMember(name: "DECORATED")] DECORATED } /// Abstract operation composed from an expression of other operations. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation), fullyQualifiedName: "jsii-calc.composition.CompositeOperation")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { private _Proxy(ByRefValue reference): base(reference) { } /// The expression that this operation consists of. /// /// Must be implemented by derived classes. /// [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This tries to confuse Jackson by having overloaded property setters. /// /// See: https://github.com/aws/aws-cdk/issues/4080 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConfusingToJackson), fullyQualifiedName: "jsii-calc.ConfusingToJackson")] public class ConfusingToJackson : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConfusingToJackson(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConfusingToJackson(DeputyProps props): base(props) { } [JsiiMethod(name: "makeInstance", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.ConfusingToJackson\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.ConfusingToJackson MakeInstance() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConfusingToJackson), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "makeStructInstance", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.ConfusingToJacksonStruct\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct MakeStructInstance() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConfusingToJackson), new System.Type[]{}, new object[]{})!; } [JsiiOptional] [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] public virtual object? UnionProperty { get => GetInstanceProperty(); set { SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiByValue(fqn: "jsii-calc.ConfusingToJacksonStruct")] public class ConfusingToJacksonStruct : Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct { private object? _unionProperty; [JsiiOptional] [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] public object? UnionProperty { get => _unionProperty; set { _unionProperty = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), fullyQualifiedName: "jsii-calc.ConstructorPassesThisOut", parametersJson: "[{\\"name\\":\\"consumer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.PartiallyInitializedThisConsumer\\"}}]")] public class ConstructorPassesThisOut : DeputyBase { public ConstructorPassesThisOut(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer consumer): base(_MakeDeputyProps(consumer)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer consumer) { return new DeputyProps(new object?[]{consumer}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConstructorPassesThisOut(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConstructorPassesThisOut(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Constructors.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), fullyQualifiedName: "jsii-calc.Constructors")] public class Constructors : DeputyBase { public Constructors(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Constructors(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Constructors(DeputyProps props): base(props) { } [JsiiMethod(name: "hiddenInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface HiddenInterface() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "hiddenInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"},\\"kind\\":\\"array\\"}}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface[] HiddenInterfaces() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "hiddenSubInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"},\\"kind\\":\\"array\\"}}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface[] HiddenSubInterfaces() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "makeClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.PublicClass\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.PublicClass MakeClass() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "makeInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface MakeInterface() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "makeInterface2", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface2\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface2 MakeInterface2() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "makeInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"},\\"kind\\":\\"array\\"}}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface[] MakeInterfaces() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Constructors), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumePureInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumePureInterface), fullyQualifiedName: "jsii-calc.ConsumePureInterface", parametersJson: "[{\\"name\\":\\"delegate\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IStructReturningDelegate\\"}}]")] public class ConsumePureInterface : DeputyBase { public ConsumePureInterface(Amazon.JSII.Tests.CalculatorNamespace.IStructReturningDelegate @delegate): base(_MakeDeputyProps(@delegate)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IStructReturningDelegate @delegate) { return new DeputyProps(new object?[]{@delegate}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumePureInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumePureInterface(DeputyProps props): base(props) { } [JsiiMethod(name: "workItBaby", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IStructB WorkItBaby() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumerCanRingBell.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Test calling back to consumers that implement interfaces. /// /// Check that if a JSII consumer implements IConsumerWithInterfaceParam, they can call /// the method on the argument that they're passed... /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumerCanRingBell), fullyQualifiedName: "jsii-calc.ConsumerCanRingBell")] public class ConsumerCanRingBell : DeputyBase { public ConsumerCanRingBell(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumerCanRingBell(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumerCanRingBell(DeputyProps props): base(props) { } /// ...if the interface is implemented using an object literal. /// /// Returns whether the bell was rung. /// [JsiiMethod(name: "staticImplementedByObjectLiteral", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public static bool StaticImplementedByObjectLiteral(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumerCanRingBell), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// ...if the interface is implemented using a private class. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "staticImplementedByPrivateClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public static bool StaticImplementedByPrivateClass(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumerCanRingBell), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// ...if the interface is implemented using a public class. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "staticImplementedByPublicClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public static bool StaticImplementedByPublicClass(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumerCanRingBell), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// If the parameter is a concrete class instead of an interface. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "staticWhenTypedAsClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IConcreteBellRinger\\"}}]")] public static bool StaticWhenTypedAsClass(Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger ringer) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumerCanRingBell), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger)}, new object[]{ringer})!; } /// ...if the interface is implemented using an object literal. /// /// Returns whether the bell was rung. /// [JsiiMethod(name: "implementedByObjectLiteral", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public virtual bool ImplementedByObjectLiteral(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// ...if the interface is implemented using a private class. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "implementedByPrivateClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public virtual bool ImplementedByPrivateClass(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// ...if the interface is implemented using a public class. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "implementedByPublicClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBellRinger\\"}}]")] public virtual bool ImplementedByPublicClass(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger ringer) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBellRinger)}, new object[]{ringer})!; } /// If the parameter is a concrete class instead of an interface. /// /// Return whether the bell was rung. /// [JsiiMethod(name: "whenTypedAsClass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"ringer\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IConcreteBellRinger\\"}}]")] public virtual bool WhenTypedAsClass(Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger ringer) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger)}, new object[]{ringer})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumersOfThisCrazyTypeSystem.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ConsumersOfThisCrazyTypeSystem), fullyQualifiedName: "jsii-calc.ConsumersOfThisCrazyTypeSystem")] public class ConsumersOfThisCrazyTypeSystem : DeputyBase { public ConsumersOfThisCrazyTypeSystem(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumersOfThisCrazyTypeSystem(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumersOfThisCrazyTypeSystem(DeputyProps props): base(props) { } [JsiiMethod(name: "consumeAnotherPublicInterface", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnotherPublicInterface\\"}}]")] public virtual string ConsumeAnotherPublicInterface(Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface obj) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface)}, new object[]{obj})!; } [JsiiMethod(name: "consumeNonInternalInterface", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.INonInternalInterface\\"}}]")] public virtual object ConsumeNonInternalInterface(Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface obj) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface)}, new object[]{obj})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ContainerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.ContainerProps")] public class ContainerProps : Amazon.JSII.Tests.CalculatorNamespace.IContainerProps { [JsiiProperty(name: "arrayProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"array\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] ArrayProp { get; set; } [JsiiProperty(name: "objProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary ObjProp { get; set; } [JsiiProperty(name: "recordProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary RecordProp { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DataRenderer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies proper type handling through dynamic overrides. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DataRenderer), fullyQualifiedName: "jsii-calc.DataRenderer")] public class DataRenderer : DeputyBase { public DataRenderer(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DataRenderer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DataRenderer(DeputyProps props): base(props) { } [JsiiMethod(name: "render", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"data\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.MyFirstStruct\\"}}]")] public virtual string Render(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct? data = null) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct)}, new object?[]{data})!; } [JsiiMethod(name: "renderArbitrary", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"data\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}]")] public virtual string RenderArbitrary(System.Collections.Generic.IDictionary data) { return InvokeInstanceMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{data})!; } [JsiiMethod(name: "renderMap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"map\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}]")] public virtual string RenderMap(System.Collections.Generic.IDictionary map) { return InvokeInstanceMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{map})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Default.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// A class named "Default". /// /// See: https://github.com/aws/jsii/issues/2637 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Default), fullyQualifiedName: "jsii-calc.Default")] public class Default : DeputyBase { public Default(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Default(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Default(DeputyProps props): base(props) { } [JsiiMethod(name: "pleaseCompile")] public virtual void PleaseCompile() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DefaultedConstructorArgument.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DefaultedConstructorArgument), fullyQualifiedName: "jsii-calc.DefaultedConstructorArgument", parametersJson: "[{\\"name\\":\\"arg1\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg3\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"date\\"}}]")] public class DefaultedConstructorArgument : DeputyBase { public DefaultedConstructorArgument(double? arg1 = null, string? arg2 = null, System.DateTime? arg3 = null): base(_MakeDeputyProps(arg1, arg2, arg3)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double? arg1 = null, string? arg2 = null, System.DateTime? arg3 = null) { return new DeputyProps(new object?[]{arg1, arg2, arg3}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DefaultedConstructorArgument(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DefaultedConstructorArgument(DeputyProps props): base(props) { } [JsiiProperty(name: "arg1", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Arg1 { get => GetInstanceProperty()!; } [JsiiProperty(name: "arg3", typeJson: "{\\"primitive\\":\\"date\\"}")] public virtual System.DateTime Arg3 { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "arg2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? Arg2 { get => GetInstanceProperty(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Demonstrate982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// 1. /// /// call #takeThis() -> An ObjectRef will be provisioned for the value (it'll be re-used!) /// 2. call #takeThisToo() -> The ObjectRef from before will need to be down-cased to the ParentStruct982 type /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Demonstrate982), fullyQualifiedName: "jsii-calc.Demonstrate982")] public class Demonstrate982 : DeputyBase { public Demonstrate982(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Demonstrate982(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Demonstrate982(DeputyProps props): base(props) { } /// It's dangerous to go alone! [JsiiMethod(name: "takeThis", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.ChildStruct982\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IChildStruct982 TakeThis() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Demonstrate982), new System.Type[]{}, new object[]{})!; } /// It's dangerous to go alone! [JsiiMethod(name: "takeThisToo", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.ParentStruct982\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 TakeThisToo() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Demonstrate982), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DeprecatedClass), fullyQualifiedName: "jsii-calc.DeprecatedClass", parametersJson: "[{\\"name\\":\\"readonlyString\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"mutableNumber\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] [System.Obsolete("a pretty boring class")] public class DeprecatedClass : DeputyBase { /// /// Stability: Deprecated /// [System.Obsolete("this constructor is \\"just\\" okay")] public DeprecatedClass(string readonlyString, double? mutableNumber = null): base(_MakeDeputyProps(readonlyString, mutableNumber)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string readonlyString, double? mutableNumber = null) { return new DeputyProps(new object?[]{readonlyString, mutableNumber}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete("this constructor is \\"just\\" okay")] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DeprecatedClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete("this constructor is \\"just\\" okay")] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DeprecatedClass(DeputyProps props): base(props) { } /// /// Stability: Deprecated /// [JsiiMethod(name: "method")] [System.Obsolete("it was a bad idea")] public virtual void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// /// Stability: Deprecated /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete("this is not always \\"wazoo\\", be ready to be disappointed")] public virtual string ReadonlyProperty { get => GetInstanceProperty()!; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete("shouldn't have been mutable")] public virtual double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Deprecated /// [JsiiEnum(nativeType: typeof(DeprecatedEnum), fullyQualifiedName: "jsii-calc.DeprecatedEnum")] [System.Obsolete("your deprecated selection of bad options")] public enum DeprecatedEnum { /// /// Stability: Deprecated /// [JsiiEnumMember(name: "OPTION_A")] [System.Obsolete("option A is not great")] OPTION_A, /// /// Stability: Deprecated /// [JsiiEnumMember(name: "OPTION_B")] [System.Obsolete("option B is kinda bad, too")] OPTION_B } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// /// Stability: Deprecated /// [JsiiByValue(fqn: "jsii-calc.DeprecatedStruct")] public class DeprecatedStruct : Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedStruct { /// /// Stability: Deprecated /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete("well, yeah")] public string ReadonlyProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties.Base), fullyQualifiedName: "jsii-calc.DerivedClassHasNoProperties.Base")] public class Base : DeputyBase { public Base(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(DeputyProps props): base(props) { } [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Prop { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties.Derived), fullyQualifiedName: "jsii-calc.DerivedClassHasNoProperties.Derived")] public class Derived : Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties.Base { public Derived(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Derived(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Derived(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// A struct which derives from another struct. [JsiiByValue(fqn: "jsii-calc.DerivedStruct")] public class DerivedStruct : Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct { [JsiiProperty(name: "anotherRequired", typeJson: "{\\"primitive\\":\\"date\\"}")] public System.DateTime AnotherRequired { get; set; } [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Bool { get; set; } /// An example of a non primitive property. [JsiiProperty(name: "nonPrimitive", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive { get; set; } /// This is optional. [JsiiOptional] [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] public System.Collections.Generic.IDictionary? AnotherOptional { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalAny", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] public object? OptionalAny { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] public string[]? OptionalArray { get; set; } /// (deprecated) An awesome number value. /// /// Stability: Deprecated /// [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public double Anumber { get; set; } /// (deprecated) A string value. /// /// Stability: Deprecated /// [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Astring { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [System.Obsolete()] public string[]? FirstOptional { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondBottom.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiByValue(fqn: "jsii-calc.DiamondBottom")] public class DiamondBottom : Amazon.JSII.Tests.CalculatorNamespace.IDiamondBottom { [JsiiOptional] [JsiiProperty(name: "bottom", typeJson: "{\\"primitive\\":\\"date\\"}", isOptional: true)] public System.DateTime? Bottom { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "left", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Left { get; set; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "right", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Right { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.DiamondInheritanceBaseLevelStruct")] public class DiamondInheritanceBaseLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct { [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.DiamondInheritanceFirstMidLevelStruct")] public class DiamondInheritanceFirstMidLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceFirstMidLevelStruct { [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string FirstMidLevelProperty { get; set; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.DiamondInheritanceSecondMidLevelStruct")] public class DiamondInheritanceSecondMidLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceSecondMidLevelStruct { [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SecondMidLevelProperty { get; set; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.DiamondInheritanceTopLevelStruct")] public class DiamondInheritanceTopLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceTopLevelStruct { [JsiiProperty(name: "topLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string TopLevelProperty { get; set; } [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string FirstMidLevelProperty { get; set; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get; set; } [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SecondMidLevelProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that null/undefined can be returned for optional collections. /// /// This source of collections is disappointing - it'll always give you nothing :( /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DisappointingCollectionSource), fullyQualifiedName: "jsii-calc.DisappointingCollectionSource")] public class DisappointingCollectionSource : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DisappointingCollectionSource(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DisappointingCollectionSource(DeputyProps props): base(props) { } /// Some List of strings, maybe? /// /// (Nah, just a billion dollars mistake!) /// [JsiiProperty(name: "maybeList", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] public static string[]? MaybeList { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.DisappointingCollectionSource)); /// Some Map of strings to numbers, maybe? /// /// (Nah, just a billion dollars mistake!) /// [JsiiProperty(name: "maybeMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"number\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] public static System.Collections.Generic.IDictionary? MaybeMap { get; } = GetStaticProperty>(typeof(Amazon.JSII.Tests.CalculatorNamespace.DisappointingCollectionSource)); } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotOverridePrivates.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DoNotOverridePrivates), fullyQualifiedName: "jsii-calc.DoNotOverridePrivates")] public class DoNotOverridePrivates : DeputyBase { public DoNotOverridePrivates(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoNotOverridePrivates(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoNotOverridePrivates(DeputyProps props): base(props) { } [JsiiMethod(name: "changePrivatePropertyValue", parametersJson: "[{\\"name\\":\\"newValue\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual void ChangePrivatePropertyValue(string newValue) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string)}, new object[]{newValue}); } [JsiiMethod(name: "privateMethodValue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string PrivateMethodValue() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "privatePropertyValue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string PrivatePropertyValue() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotRecognizeAnyAsOptional.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// jsii#284: do not recognize "any" as an optional argument. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DoNotRecognizeAnyAsOptional), fullyQualifiedName: "jsii-calc.DoNotRecognizeAnyAsOptional")] public class DoNotRecognizeAnyAsOptional : DeputyBase { public DoNotRecognizeAnyAsOptional(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoNotRecognizeAnyAsOptional(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoNotRecognizeAnyAsOptional(DeputyProps props): base(props) { } [JsiiMethod(name: "method", parametersJson: "[{\\"name\\":\\"_requiredAny\\",\\"type\\":{\\"primitive\\":\\"any\\"}},{\\"name\\":\\"_optionalAny\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"any\\"}},{\\"name\\":\\"_optionalString\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual void Method(object requiredAny, object? optionalAny = null, string? optionalString = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(object), typeof(object), typeof(string)}, new object?[]{requiredAny, optionalAny, optionalString}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DocumentedClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Here's the first line of the TSDoc comment. /// /// This is the meat of the TSDoc comment. It may contain /// multiple lines and multiple paragraphs. /// /// Multiple paragraphs are separated by an empty line. /// /// /// var x = 12 + 44; /// var s1 = "string"; /// var s2 = @"string /// with new newlines"; // see https://github.com/aws/jsii/issues/2569 /// var s3 = @"string /// with /// new lines"; /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DocumentedClass), fullyQualifiedName: "jsii-calc.DocumentedClass")] public class DocumentedClass : DeputyBase { public DocumentedClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DocumentedClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DocumentedClass(DeputyProps props): base(props) { } /// Greet the indicated person. /// The person to be greeted. /// A number that everyone knows very well and represents the answer /// to the ultimate question /// /// This will print out a friendly greeting intended for the indicated person. /// [JsiiMethod(name: "greet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The person to be greeted.\\"},\\"name\\":\\"greetee\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.Greetee\\"}}]")] public virtual double Greet(Amazon.JSII.Tests.CalculatorNamespace.IGreetee? greetee = null) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IGreetee)}, new object?[]{greetee})!; } /// (experimental) Say ¡Hola! /// /// Stability: Experimental /// [JsiiMethod(name: "hola")] public virtual void Hola() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// Some comments have an escaped star backslash in them, ending the comment if left unescaped. /// /// For example: 'projects/*/global/networks/network-1'. /// [JsiiMethod(name: "moin")] public virtual void Moin() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontComplainAboutVariadicAfterOptional.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DontComplainAboutVariadicAfterOptional), fullyQualifiedName: "jsii-calc.DontComplainAboutVariadicAfterOptional")] public class DontComplainAboutVariadicAfterOptional : DeputyBase { public DontComplainAboutVariadicAfterOptional(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DontComplainAboutVariadicAfterOptional(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DontComplainAboutVariadicAfterOptional(DeputyProps props): base(props) { } [JsiiMethod(name: "optionalAndVariadic", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"optional\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"things\\",\\"type\\":{\\"primitive\\":\\"string\\"},\\"variadic\\":true}]")] public virtual string OptionalAndVariadic(string? optional = null, params string[] things) { return InvokeInstanceMethod(new System.Type[]{typeof(string), typeof(string[])}, new object?[]{optional, things})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontUseMe.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. [JsiiByValue(fqn: "jsii-calc.DontUseMe")] public class DontUseMe : Amazon.JSII.Tests.CalculatorNamespace.IDontUseMe { /// > Don't set this parameter. /// /// A parameter that shouldn't be set, with the annotation in a weird place. /// [JsiiOptional] [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? DontSetMe { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble), fullyQualifiedName: "jsii-calc.DoubleTrouble")] public class DoubleTrouble : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlyRandomGenerator { public DoubleTrouble(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoubleTrouble(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DoubleTrouble(DeputyProps props): base(props) { } /// Say hello! [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Returns another random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double Next() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DummyObj.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.DummyObj")] public class DummyObj : Amazon.JSII.Tests.CalculatorNamespace.IDummyObj { [JsiiProperty(name: "example", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Example { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DynamicPropertyBearer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Ensures we can override a dynamic property that was inherited. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearer), fullyQualifiedName: "jsii-calc.DynamicPropertyBearer", parametersJson: "[{\\"name\\":\\"valueStore\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class DynamicPropertyBearer : DeputyBase { public DynamicPropertyBearer(string valueStore): base(_MakeDeputyProps(valueStore)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string valueStore) { return new DeputyProps(new object?[]{valueStore}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DynamicPropertyBearer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DynamicPropertyBearer(DeputyProps props): base(props) { } [JsiiProperty(name: "dynamicProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string DynamicProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "valueStore", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ValueStore { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DynamicPropertyBearerChild.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearerChild), fullyQualifiedName: "jsii-calc.DynamicPropertyBearerChild", parametersJson: "[{\\"name\\":\\"originalValue\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class DynamicPropertyBearerChild : Amazon.JSII.Tests.CalculatorNamespace.DynamicPropertyBearer { public DynamicPropertyBearerChild(string originalValue): base(_MakeDeputyProps(originalValue)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string originalValue) { return new DeputyProps(new object?[]{originalValue}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DynamicPropertyBearerChild(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected DynamicPropertyBearerChild(DeputyProps props): base(props) { } /// Sets \`this.dynamicProperty\` to the new value, and returns the old value. /// the new value to be set. /// the old value that was set. [JsiiMethod(name: "overrideValue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the new value to be set.\\"},\\"name\\":\\"newValue\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual string OverrideValue(string newValue) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{newValue})!; } [JsiiProperty(name: "originalValue", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string OriginalValue { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Entropy.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Entropy), fullyQualifiedName: "jsii-calc.Entropy", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"your implementation of \`WallClock\`.\\"},\\"name\\":\\"clock\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IWallClock\\"}}]")] public abstract class Entropy : DeputyBase { /// Creates a new instance of Entropy. /// your implementation of \`WallClock\`. protected Entropy(Amazon.JSII.Tests.CalculatorNamespace.IWallClock clock): base(_MakeDeputyProps(clock)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IWallClock clock) { return new DeputyProps(new object?[]{clock}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Entropy(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Entropy(DeputyProps props): base(props) { } /// Increases entropy by consuming time from the clock (yes, this is a long shot, please don't judge). /// the time from the \`WallClock\`. [JsiiMethod(name: "increase", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Increase() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Implement this method such that it returns \`word\`. /// the value to return. /// \`word\`. [JsiiMethod(name: "repeat", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value to return.\\"},\\"name\\":\\"word\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public abstract string Repeat(string word); /// This class is used to validate that serialization and deserialization does not interpret ISO-8601-formatted timestampts to the native date/time object, as the jsii protocol has a $jsii$date wrapper for this purpose (node's JSON parsing does *NOT* detect dates automatically in this way, so host libraries should not either). [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Entropy), fullyQualifiedName: "jsii-calc.Entropy")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Entropy { private _Proxy(ByRefValue reference): base(reference) { } /// Implement this method such that it returns \`word\`. /// the value to return. /// \`word\`. [JsiiMethod(name: "repeat", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the value to return.\\"},\\"name\\":\\"word\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public override string Repeat(string word) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{word})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.EnumDispenser), fullyQualifiedName: "jsii-calc.EnumDispenser")] public class EnumDispenser : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected EnumDispenser(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected EnumDispenser(DeputyProps props): base(props) { } [JsiiMethod(name: "randomIntegerLikeEnum", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum RandomIntegerLikeEnum() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.EnumDispenser), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "randomStringLikeEnum", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StringEnum\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.StringEnum RandomStringLikeEnum() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.EnumDispenser), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValues.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.EraseUndefinedHashValues), fullyQualifiedName: "jsii-calc.EraseUndefinedHashValues")] public class EraseUndefinedHashValues : DeputyBase { public EraseUndefinedHashValues(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected EraseUndefinedHashValues(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected EraseUndefinedHashValues(DeputyProps props): base(props) { } /// Returns \`true\` if \`key\` is defined in \`opts\`. /// /// Used to check that undefined/null hash values /// are being erased when sending values from native code to JS. /// [JsiiMethod(name: "doesKeyExist", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"opts\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.EraseUndefinedHashValuesOptions\\"}},{\\"name\\":\\"key\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static bool DoesKeyExist(Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions opts, string key) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.EraseUndefinedHashValues), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions), typeof(string)}, new object[]{opts, key})!; } /// We expect "prop1" to be erased. [JsiiMethod(name: "prop1IsNull", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}")] public static System.Collections.Generic.IDictionary Prop1IsNull() { return InvokeStaticMethod>(typeof(Amazon.JSII.Tests.CalculatorNamespace.EraseUndefinedHashValues), new System.Type[]{}, new object[]{})!; } /// We expect "prop2" to be erased. [JsiiMethod(name: "prop2IsUndefined", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}")] public static System.Collections.Generic.IDictionary Prop2IsUndefined() { return InvokeStaticMethod>(typeof(Amazon.JSII.Tests.CalculatorNamespace.EraseUndefinedHashValues), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptions.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiByValue(fqn: "jsii-calc.EraseUndefinedHashValuesOptions")] public class EraseUndefinedHashValuesOptions : Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions { [JsiiOptional] [JsiiProperty(name: "option1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Option1 { get; set; } [JsiiOptional] [JsiiProperty(name: "option2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Option2 { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Experimental /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ExperimentalClass), fullyQualifiedName: "jsii-calc.ExperimentalClass", parametersJson: "[{\\"name\\":\\"readonlyString\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"mutableNumber\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public class ExperimentalClass : DeputyBase { /// /// Stability: Experimental /// public ExperimentalClass(string readonlyString, double? mutableNumber = null): base(_MakeDeputyProps(readonlyString, mutableNumber)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string readonlyString, double? mutableNumber = null) { return new DeputyProps(new object?[]{readonlyString, mutableNumber}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExperimentalClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExperimentalClass(DeputyProps props): base(props) { } /// /// Stability: Experimental /// [JsiiMethod(name: "method")] public virtual void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// /// Stability: Experimental /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadonlyProperty { get => GetInstanceProperty()!; } /// /// Stability: Experimental /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public virtual double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Experimental /// [JsiiEnum(nativeType: typeof(ExperimentalEnum), fullyQualifiedName: "jsii-calc.ExperimentalEnum")] public enum ExperimentalEnum { /// /// Stability: Experimental /// [JsiiEnumMember(name: "OPTION_A")] OPTION_A, /// /// Stability: Experimental /// [JsiiEnumMember(name: "OPTION_B")] OPTION_B } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// /// Stability: Experimental /// [JsiiByValue(fqn: "jsii-calc.ExperimentalStruct")] public class ExperimentalStruct : Amazon.JSII.Tests.CalculatorNamespace.IExperimentalStruct { /// /// Stability: Experimental /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ExportedBaseClass), fullyQualifiedName: "jsii-calc.ExportedBaseClass", parametersJson: "[{\\"name\\":\\"success\\",\\"type\\":{\\"primitive\\":\\"boolean\\"}}]")] public class ExportedBaseClass : DeputyBase { public ExportedBaseClass(bool success): base(_MakeDeputyProps(success)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(bool success) { return new DeputyProps(new object?[]{success}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExportedBaseClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExportedBaseClass(DeputyProps props): base(props) { } [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool Success { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.ExtendsInternalInterface")] public class ExtendsInternalInterface : Amazon.JSII.Tests.CalculatorNamespace.IExtendsInternalInterface { [JsiiProperty(name: "boom", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Boom { get; set; } [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Prop { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// External: true /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ExternalClass), fullyQualifiedName: "jsii-calc.ExternalClass", parametersJson: "[{\\"name\\":\\"readonlyString\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"mutableNumber\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public class ExternalClass : DeputyBase { /// /// External: true /// public ExternalClass(string readonlyString, double? mutableNumber = null): base(_MakeDeputyProps(readonlyString, mutableNumber)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string readonlyString, double? mutableNumber = null) { return new DeputyProps(new object?[]{readonlyString, mutableNumber}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExternalClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExternalClass(DeputyProps props): base(props) { } /// /// External: true /// [JsiiMethod(name: "method")] public virtual void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } /// /// External: true /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadonlyProperty { get => GetInstanceProperty()!; } /// /// External: true /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public virtual double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// External: true /// [JsiiEnum(nativeType: typeof(ExternalEnum), fullyQualifiedName: "jsii-calc.ExternalEnum")] public enum ExternalEnum { /// /// External: true /// [JsiiEnumMember(name: "OPTION_A")] OPTION_A, /// /// External: true /// [JsiiEnumMember(name: "OPTION_B")] OPTION_B } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExternalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// /// External: true /// [JsiiByValue(fqn: "jsii-calc.ExternalStruct")] public class ExternalStruct : Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct { /// /// External: true /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/FullCombo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.FullCombo), fullyQualifiedName: "jsii-calc.FullCombo")] public class FullCombo : Amazon.JSII.Tests.CalculatorNamespace.BaseClass, Amazon.JSII.Tests.CalculatorNamespace.IIndirectlyImplemented { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected FullCombo(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected FullCombo(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.GiveMeStructs), fullyQualifiedName: "jsii-calc.GiveMeStructs")] public class GiveMeStructs : DeputyBase { public GiveMeStructs(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected GiveMeStructs(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected GiveMeStructs(DeputyProps props): base(props) { } /// Accepts a struct of type DerivedStruct and returns a struct of type FirstStruct. [JsiiMethod(name: "derivedToFirst", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.MyFirstStruct\\"}}", parametersJson: "[{\\"name\\":\\"derived\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.DerivedStruct\\"}}]")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct DerivedToFirst(Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct derived) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct)}, new object[]{derived})!; } /// Returns the boolean from a DerivedStruct struct. [JsiiMethod(name: "readDerivedNonPrimitive", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}}", parametersJson: "[{\\"name\\":\\"derived\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.DerivedStruct\\"}}]")] public virtual Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble ReadDerivedNonPrimitive(Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct derived) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct)}, new object[]{derived})!; } /// Returns the "anumber" from a MyFirstStruct struct; [JsiiMethod(name: "readFirstNumber", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"first\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.MyFirstStruct\\"}}]")] public virtual double ReadFirstNumber(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct first) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct)}, new object[]{first})!; } [JsiiProperty(name: "structLiteral", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.StructWithOnlyOptionals\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IStructWithOnlyOptionals StructLiteral { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Greetee.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// These are some arguments you can pass to a method. [JsiiByValue(fqn: "jsii-calc.Greetee")] public class Greetee : Amazon.JSII.Tests.CalculatorNamespace.IGreetee { /// The name of the greetee. /// /// Default: world /// [JsiiOptional] [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Name { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.GreetingAugmenter), fullyQualifiedName: "jsii-calc.GreetingAugmenter")] public class GreetingAugmenter : DeputyBase { public GreetingAugmenter(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected GreetingAugmenter(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected GreetingAugmenter(DeputyProps props): base(props) { } [JsiiMethod(name: "betterGreeting", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"friendly\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}}]")] public virtual string BetterGreeting(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly friendly) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly)}, new object[]{friendly})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Bar/Consumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.Consumer), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.bar.Consumer")] public class Consumer : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Consumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Consumer(DeputyProps props): base(props) { } [JsiiMethod(name: "consume", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.bar.Homonymous\\"}}", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.bar.ConsumerProps\\"}}]")] public static Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous Consume(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IConsumerProps props) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.Consumer), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IConsumerProps)}, new object[]{props})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Bar/ConsumerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.homonymousForwardReferences.bar.ConsumerProps")] public class ConsumerProps : Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IConsumerProps { [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.bar.Homonymous\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous Homonymous { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Bar/Homonymous.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.homonymousForwardReferences.bar.Homonymous")] public class Homonymous : Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous { [JsiiProperty(name: "numericProperty", typeJson: "{\\"primitive\\":\\"number\\"}")] public double NumericProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Bar/IConsumerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar { [JsiiInterface(nativeType: typeof(IConsumerProps), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.bar.ConsumerProps")] public interface IConsumerProps { [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.bar.Homonymous\\"}")] Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous Homonymous { get; } [JsiiTypeProxy(nativeType: typeof(IConsumerProps), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.bar.ConsumerProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IConsumerProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.bar.Homonymous\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous Homonymous { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Bar/IHomonymous.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar { [JsiiInterface(nativeType: typeof(IHomonymous), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.bar.Homonymous")] public interface IHomonymous { [JsiiProperty(name: "numericProperty", typeJson: "{\\"primitive\\":\\"number\\"}")] double NumericProperty { get; } [JsiiTypeProxy(nativeType: typeof(IHomonymous), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.bar.Homonymous")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Bar.IHomonymous { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "numericProperty", typeJson: "{\\"primitive\\":\\"number\\"}")] public double NumericProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Foo/Consumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.Consumer), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.foo.Consumer")] public class Consumer : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Consumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Consumer(DeputyProps props): base(props) { } [JsiiMethod(name: "consume", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.foo.Homonymous\\"}}", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.foo.ConsumerProps\\"}}]")] public static Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous Consume(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IConsumerProps props) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.Consumer), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IConsumerProps)}, new object[]{props})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Foo/ConsumerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.homonymousForwardReferences.foo.ConsumerProps")] public class ConsumerProps : Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IConsumerProps { [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.foo.Homonymous\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous Homonymous { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Foo/Homonymous.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.homonymousForwardReferences.foo.Homonymous")] public class Homonymous : Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous { [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Foo/IConsumerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo { [JsiiInterface(nativeType: typeof(IConsumerProps), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.foo.ConsumerProps")] public interface IConsumerProps { [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.foo.Homonymous\\"}")] Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous Homonymous { get; } [JsiiTypeProxy(nativeType: typeof(IConsumerProps), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.foo.ConsumerProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IConsumerProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "homonymous", typeJson: "{\\"fqn\\":\\"jsii-calc.homonymousForwardReferences.foo.Homonymous\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous Homonymous { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/Foo/IHomonymous.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo { [JsiiInterface(nativeType: typeof(IHomonymous), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.foo.Homonymous")] public interface IHomonymous { [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string StringProperty { get; } [JsiiTypeProxy(nativeType: typeof(IHomonymous), fullyQualifiedName: "jsii-calc.homonymousForwardReferences.foo.Homonymous")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences.Foo.IHomonymous { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/HomonymousForwardReferences/NamespaceDoc.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.HomonymousForwardReferences { /// /// Verifies homonymous forward references don't trip the Python type checker /// /// This has been an issue when stub functions were introduced to create a reliable source for type checking /// information, which was reported in https://github.com/aws/jsii/issues/3818. /// [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class NamespaceDoc { } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// We can return an anonymous interface implementation from an override without losing the interface declarations. [JsiiInterface(nativeType: typeof(IAnonymousImplementationProvider), fullyQualifiedName: "jsii-calc.IAnonymousImplementationProvider")] public interface IAnonymousImplementationProvider { [JsiiMethod(name: "provideAsClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Implementation\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass(); [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface(); /// We can return an anonymous interface implementation from an override without losing the interface declarations. [JsiiTypeProxy(nativeType: typeof(IAnonymousImplementationProvider), fullyQualifiedName: "jsii-calc.IAnonymousImplementationProvider")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymousImplementationProvider { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "provideAsClass", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Implementation\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.Implementation ProvideAsClass() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "provideAsInterface", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IAnonymouslyImplementMe\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe ProvideAsInterface() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMe.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IAnonymouslyImplementMe), fullyQualifiedName: "jsii-calc.IAnonymouslyImplementMe")] public interface IAnonymouslyImplementMe { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] double Value { get; } [JsiiMethod(name: "verb", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Verb(); [JsiiTypeProxy(nativeType: typeof(IAnonymouslyImplementMe), fullyQualifiedName: "jsii-calc.IAnonymouslyImplementMe")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnonymouslyImplementMe { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Value { get => GetInstanceProperty()!; } [JsiiMethod(name: "verb", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Verb() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IAnotherPublicInterface), fullyQualifiedName: "jsii-calc.IAnotherPublicInterface")] public interface IAnotherPublicInterface { [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] string A { get; set; } [JsiiTypeProxy(nativeType: typeof(IAnotherPublicInterface), fullyQualifiedName: "jsii-calc.IAnotherPublicInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] public string A { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IBell), fullyQualifiedName: "jsii-calc.IBell")] public interface IBell { [JsiiMethod(name: "ring")] void Ring(); [JsiiTypeProxy(nativeType: typeof(IBell), fullyQualifiedName: "jsii-calc.IBell")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBell { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "ring")] public void Ring() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRinger.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as an interface. [JsiiInterface(nativeType: typeof(IBellRinger), fullyQualifiedName: "jsii-calc.IBellRinger")] public interface IBellRinger { [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBell\\"}}]")] void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.IBell bell); /// Takes the object parameter as an interface. [JsiiTypeProxy(nativeType: typeof(IBellRinger), fullyQualifiedName: "jsii-calc.IBellRinger")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IBellRinger { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IBell\\"}}]")] public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.IBell bell) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IBell)}, new object[]{bell}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. [JsiiInterface(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] public interface ICalculatorProps { /// The initial value of the calculator. /// /// NOTE: Any number works here, it's fine. /// /// Default: 0 /// [JsiiProperty(name: "initialValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? InitialValue { get { return null; } } /// The maximum value the calculator can store. /// /// Default: none /// [JsiiProperty(name: "maximumValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? MaximumValue { get { return null; } } /// Properties for Calculator. [JsiiTypeProxy(nativeType: typeof(ICalculatorProps), fullyQualifiedName: "jsii-calc.CalculatorProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps { private _Proxy(ByRefValue reference): base(reference) { } /// The initial value of the calculator. /// /// NOTE: Any number works here, it's fine. /// /// Default: 0 /// [JsiiOptional] [JsiiProperty(name: "initialValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? InitialValue { get => GetInstanceProperty(); } /// The maximum value the calculator can store. /// /// Default: none /// [JsiiOptional] [JsiiProperty(name: "maximumValue", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? MaximumValue { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IChildStruct982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IChildStruct982), fullyQualifiedName: "jsii-calc.ChildStruct982")] public interface IChildStruct982 : Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 { [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] double Bar { get; } [JsiiTypeProxy(nativeType: typeof(IChildStruct982), fullyQualifiedName: "jsii-calc.ChildStruct982")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IChildStruct982 { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Bar { get => GetInstanceProperty()!; } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRinger.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as a calss. [JsiiInterface(nativeType: typeof(IConcreteBellRinger), fullyQualifiedName: "jsii-calc.IConcreteBellRinger")] public interface IConcreteBellRinger { [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}}]")] void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.Bell bell); /// Takes the object parameter as a calss. [JsiiTypeProxy(nativeType: typeof(IConcreteBellRinger), fullyQualifiedName: "jsii-calc.IConcreteBellRinger")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConcreteBellRinger { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "yourTurn", parametersJson: "[{\\"name\\":\\"bell\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.Bell\\"}}]")] public void YourTurn(Amazon.JSII.Tests.CalculatorNamespace.Bell bell) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Bell)}, new object[]{bell}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConfusingToJacksonStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IConfusingToJacksonStruct), fullyQualifiedName: "jsii-calc.ConfusingToJacksonStruct")] public interface IConfusingToJacksonStruct { [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] object? UnionProperty { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IConfusingToJacksonStruct), fullyQualifiedName: "jsii-calc.ConfusingToJacksonStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"},{\\"fqn\\":\\"jsii-calc.AbstractClass\\"}]}},\\"kind\\":\\"array\\"}}]}}", isOptional: true)] public object? UnionProperty { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IContainerProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IContainerProps), fullyQualifiedName: "jsii-calc.ContainerProps")] public interface IContainerProps { [JsiiProperty(name: "arrayProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"array\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] ArrayProp { get; } [JsiiProperty(name: "objProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] System.Collections.Generic.IDictionary ObjProp { get; } [JsiiProperty(name: "recordProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] System.Collections.Generic.IDictionary RecordProp { get; } [JsiiTypeProxy(nativeType: typeof(IContainerProps), fullyQualifiedName: "jsii-calc.ContainerProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IContainerProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "arrayProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"array\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.IDummyObj[] ArrayProp { get => GetInstanceProperty()!; } [JsiiProperty(name: "objProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary ObjProp { get => GetInstanceProperty>()!; } [JsiiProperty(name: "recordProp", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.DummyObj\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary RecordProp { get => GetInstanceProperty>()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IDeprecatedInterface), fullyQualifiedName: "jsii-calc.IDeprecatedInterface")] [System.Obsolete("useless interface")] public interface IDeprecatedInterface { /// /// Stability: Deprecated /// [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete("could be better")] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? MutableProperty { get { return null; } set { throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented"); } } /// /// Stability: Deprecated /// [JsiiMethod(name: "method")] [System.Obsolete("services no purpose")] void Method(); /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IDeprecatedInterface), fullyQualifiedName: "jsii-calc.IDeprecatedInterface")] [System.Obsolete("useless interface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedInterface { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete("could be better")] public double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } /// /// Stability: Deprecated /// [JsiiMethod(name: "method")] [System.Obsolete("services no purpose")] public void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Deprecated /// [JsiiInterface(nativeType: typeof(IDeprecatedStruct), fullyQualifiedName: "jsii-calc.DeprecatedStruct")] [System.Obsolete("it just wraps a string")] public interface IDeprecatedStruct { /// /// Stability: Deprecated /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete("well, yeah")] string ReadonlyProperty { get; } /// /// Stability: Deprecated /// [JsiiTypeProxy(nativeType: typeof(IDeprecatedStruct), fullyQualifiedName: "jsii-calc.DeprecatedStruct")] [System.Obsolete("it just wraps a string")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDeprecatedStruct { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Deprecated /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete("well, yeah")] public string ReadonlyProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. [JsiiInterface(nativeType: typeof(IDerivedStruct), fullyQualifiedName: "jsii-calc.DerivedStruct")] public interface IDerivedStruct : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct { [JsiiProperty(name: "anotherRequired", typeJson: "{\\"primitive\\":\\"date\\"}")] System.DateTime AnotherRequired { get; } [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool Bool { get; } /// An example of a non primitive property. [JsiiProperty(name: "nonPrimitive", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive { get; } /// This is optional. [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] System.Collections.Generic.IDictionary? AnotherOptional { get { return null; } } [JsiiProperty(name: "optionalAny", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] object? OptionalAny { get { return null; } } [JsiiProperty(name: "optionalArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string[]? OptionalArray { get { return null; } } /// A struct which derives from another struct. [JsiiTypeProxy(nativeType: typeof(IDerivedStruct), fullyQualifiedName: "jsii-calc.DerivedStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDerivedStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "anotherRequired", typeJson: "{\\"primitive\\":\\"date\\"}")] public System.DateTime AnotherRequired { get => GetInstanceProperty()!; } [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Bool { get => GetInstanceProperty()!; } /// An example of a non primitive property. [JsiiProperty(name: "nonPrimitive", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive { get => GetInstanceProperty()!; } /// This is optional. [JsiiOptional] [JsiiProperty(name: "anotherOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}", isOptional: true)] public System.Collections.Generic.IDictionary? AnotherOptional { get => GetInstanceProperty?>(); } [JsiiOptional] [JsiiProperty(name: "optionalAny", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] public object? OptionalAny { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "optionalArray", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] public string[]? OptionalArray { get => GetInstanceProperty(); } /// (deprecated) An awesome number value. /// /// Stability: Deprecated /// [JsiiProperty(name: "anumber", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public double Anumber { get => GetInstanceProperty()!; } /// (deprecated) A string value. /// /// Stability: Deprecated /// [JsiiProperty(name: "astring", typeJson: "{\\"primitive\\":\\"string\\"}")] [System.Obsolete()] public string Astring { get => GetInstanceProperty()!; } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}", isOptional: true)] [System.Obsolete()] public string[]? FirstOptional { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondBottom.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDiamondBottom), fullyQualifiedName: "jsii-calc.DiamondBottom")] public interface IDiamondBottom : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondLeft, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDiamondRight { [JsiiProperty(name: "bottom", typeJson: "{\\"primitive\\":\\"date\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] System.DateTime? Bottom { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IDiamondBottom), fullyQualifiedName: "jsii-calc.DiamondBottom")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondBottom { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "bottom", typeJson: "{\\"primitive\\":\\"date\\"}", isOptional: true)] public System.DateTime? Bottom { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "hoistedTop", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [System.Obsolete()] public string? HoistedTop { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "left", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [System.Obsolete()] public double? Left { get => GetInstanceProperty(); } /// /// Stability: Deprecated /// [JsiiOptional] [JsiiProperty(name: "right", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [System.Obsolete()] public bool? Right { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceBaseLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDiamondInheritanceBaseLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceBaseLevelStruct")] public interface IDiamondInheritanceBaseLevelStruct { [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string BaseLevelProperty { get; } [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceBaseLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceBaseLevelStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceFirstMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDiamondInheritanceFirstMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceFirstMidLevelStruct")] public interface IDiamondInheritanceFirstMidLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct { [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string FirstMidLevelProperty { get; } [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceFirstMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceFirstMidLevelStruct")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceFirstMidLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string FirstMidLevelProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceSecondMidLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDiamondInheritanceSecondMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceSecondMidLevelStruct")] public interface IDiamondInheritanceSecondMidLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceBaseLevelStruct { [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string SecondMidLevelProperty { get; } [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceSecondMidLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceSecondMidLevelStruct")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceSecondMidLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SecondMidLevelProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceTopLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDiamondInheritanceTopLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceTopLevelStruct")] public interface IDiamondInheritanceTopLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceFirstMidLevelStruct, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceSecondMidLevelStruct { [JsiiProperty(name: "topLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string TopLevelProperty { get; } [JsiiTypeProxy(nativeType: typeof(IDiamondInheritanceTopLevelStruct), fullyQualifiedName: "jsii-calc.DiamondInheritanceTopLevelStruct")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDiamondInheritanceTopLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "topLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string TopLevelProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "firstMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string FirstMidLevelProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "baseLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string BaseLevelProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "secondMidLevelProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string SecondMidLevelProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDontUseMe.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. [JsiiInterface(nativeType: typeof(IDontUseMe), fullyQualifiedName: "jsii-calc.DontUseMe")] public interface IDontUseMe { /// > Don't set this parameter. /// /// A parameter that shouldn't be set, with the annotation in a weird place. /// [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? DontSetMe { get { return null; } } /// > Don't use this interface An interface that shouldn't be used, with the annotation in a weird place. [JsiiTypeProxy(nativeType: typeof(IDontUseMe), fullyQualifiedName: "jsii-calc.DontUseMe")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDontUseMe { private _Proxy(ByRefValue reference): base(reference) { } /// > Don't set this parameter. /// /// A parameter that shouldn't be set, with the annotation in a weird place. /// [JsiiOptional] [JsiiProperty(name: "dontSetMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? DontSetMe { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDummyObj.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IDummyObj), fullyQualifiedName: "jsii-calc.DummyObj")] public interface IDummyObj { [JsiiProperty(name: "example", typeJson: "{\\"primitive\\":\\"string\\"}")] string Example { get; } [JsiiTypeProxy(nativeType: typeof(IDummyObj), fullyQualifiedName: "jsii-calc.DummyObj")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IDummyObj { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "example", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Example { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IEraseUndefinedHashValuesOptions.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IEraseUndefinedHashValuesOptions), fullyQualifiedName: "jsii-calc.EraseUndefinedHashValuesOptions")] public interface IEraseUndefinedHashValuesOptions { [JsiiProperty(name: "option1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Option1 { get { return null; } } [JsiiProperty(name: "option2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Option2 { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IEraseUndefinedHashValuesOptions), fullyQualifiedName: "jsii-calc.EraseUndefinedHashValuesOptions")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IEraseUndefinedHashValuesOptions { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "option1", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Option1 { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "option2", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Option2 { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Experimental /// [JsiiInterface(nativeType: typeof(IExperimentalInterface), fullyQualifiedName: "jsii-calc.IExperimentalInterface")] public interface IExperimentalInterface { /// /// Stability: Experimental /// [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? MutableProperty { get { return null; } set { throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented"); } } /// /// Stability: Experimental /// [JsiiMethod(name: "method")] void Method(); /// /// Stability: Experimental /// [JsiiTypeProxy(nativeType: typeof(IExperimentalInterface), fullyQualifiedName: "jsii-calc.IExperimentalInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalInterface { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Experimental /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } /// /// Stability: Experimental /// [JsiiMethod(name: "method")] public void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// Stability: Experimental /// [JsiiInterface(nativeType: typeof(IExperimentalStruct), fullyQualifiedName: "jsii-calc.ExperimentalStruct")] public interface IExperimentalStruct { /// /// Stability: Experimental /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string ReadonlyProperty { get; } /// /// Stability: Experimental /// [JsiiTypeProxy(nativeType: typeof(IExperimentalStruct), fullyQualifiedName: "jsii-calc.ExperimentalStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExperimentalStruct { private _Proxy(ByRefValue reference): base(reference) { } /// /// Stability: Experimental /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IExtendsInternalInterface), fullyQualifiedName: "jsii-calc.ExtendsInternalInterface")] public interface IExtendsInternalInterface { [JsiiProperty(name: "boom", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool Boom { get; } [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] string Prop { get; } [JsiiTypeProxy(nativeType: typeof(IExtendsInternalInterface), fullyQualifiedName: "jsii-calc.ExtendsInternalInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsInternalInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "boom", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Boom { get => GetInstanceProperty()!; } [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Prop { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IExtendsPrivateInterface), fullyQualifiedName: "jsii-calc.IExtendsPrivateInterface")] public interface IExtendsPrivateInterface { [JsiiProperty(name: "moreThings", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] string[] MoreThings { get; } [JsiiProperty(name: "private", typeJson: "{\\"primitive\\":\\"string\\"}")] string Private { get; set; } [JsiiTypeProxy(nativeType: typeof(IExtendsPrivateInterface), fullyQualifiedName: "jsii-calc.IExtendsPrivateInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExtendsPrivateInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "moreThings", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public string[] MoreThings { get => GetInstanceProperty()!; } [JsiiProperty(name: "private", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Private { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// External: true /// [JsiiInterface(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")] public interface IExternalInterface { /// /// External: true /// [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? MutableProperty { get { return null; } set { throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented"); } } /// /// External: true /// [JsiiMethod(name: "method")] void Method(); /// /// External: true /// [JsiiTypeProxy(nativeType: typeof(IExternalInterface), fullyQualifiedName: "jsii-calc.IExternalInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalInterface { private _Proxy(ByRefValue reference): base(reference) { } /// /// External: true /// [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } /// /// External: true /// [JsiiMethod(name: "method")] public void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExternalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// External: true /// [JsiiInterface(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")] public interface IExternalStruct { /// /// External: true /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string ReadonlyProperty { get; } /// /// External: true /// [JsiiTypeProxy(nativeType: typeof(IExternalStruct), fullyQualifiedName: "jsii-calc.ExternalStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IExternalStruct { private _Proxy(ByRefValue reference): base(reference) { } /// /// External: true /// [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlier.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even friendlier classes can implement this interface. [JsiiInterface(nativeType: typeof(IFriendlier), fullyQualifiedName: "jsii-calc.IFriendlier")] public interface IFriendlier : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { /// Say farewell. [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Farewell(); /// Say goodbye. /// A goodbye blessing. [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Goodbye(); /// Even friendlier classes can implement this interface. [JsiiTypeProxy(nativeType: typeof(IFriendlier), fullyQualifiedName: "jsii-calc.IFriendlier")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier { private _Proxy(ByRefValue reference): base(reference) { } /// Say farewell. [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Farewell() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Say goodbye. /// A goodbye blessing. [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Goodbye() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// (deprecated) Say hello! /// /// Stability: Deprecated /// [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGenerator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IFriendlyRandomGenerator), fullyQualifiedName: "jsii-calc.IFriendlyRandomGenerator")] public interface IFriendlyRandomGenerator : Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { [JsiiTypeProxy(nativeType: typeof(IFriendlyRandomGenerator), fullyQualifiedName: "jsii-calc.IFriendlyRandomGenerator")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IFriendlyRandomGenerator { private _Proxy(ByRefValue reference): base(reference) { } /// Returns another random number. /// A random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public double Next() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// (deprecated) Say hello! /// /// Stability: Deprecated /// [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IGreetee.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// These are some arguments you can pass to a method. [JsiiInterface(nativeType: typeof(IGreetee), fullyQualifiedName: "jsii-calc.Greetee")] public interface IGreetee { /// The name of the greetee. /// /// Default: world /// [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Name { get { return null; } } /// These are some arguments you can pass to a method. [JsiiTypeProxy(nativeType: typeof(IGreetee), fullyQualifiedName: "jsii-calc.Greetee")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IGreetee { private _Proxy(ByRefValue reference): base(reference) { } /// The name of the greetee. /// /// Default: world /// [JsiiOptional] [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Name { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IImplictBaseOfBase), fullyQualifiedName: "jsii-calc.ImplictBaseOfBase")] public interface IImplictBaseOfBase : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseProps { [JsiiProperty(name: "goo", typeJson: "{\\"primitive\\":\\"date\\"}")] System.DateTime Goo { get; } [JsiiTypeProxy(nativeType: typeof(IImplictBaseOfBase), fullyQualifiedName: "jsii-calc.ImplictBaseOfBase")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IImplictBaseOfBase { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "goo", typeJson: "{\\"primitive\\":\\"date\\"}")] public System.DateTime Goo { get => GetInstanceProperty()!; } [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar { get => GetInstanceProperty()!; } [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IIndirectlyImplemented.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IIndirectlyImplemented), fullyQualifiedName: "jsii-calc.IIndirectlyImplemented")] public interface IIndirectlyImplemented { [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] string Property { get; } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] double Method(); [JsiiTypeProxy(nativeType: typeof(IIndirectlyImplemented), fullyQualifiedName: "jsii-calc.IIndirectlyImplemented")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IIndirectlyImplemented { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Property { get => GetInstanceProperty()!; } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public double Method() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// awslabs/jsii#220 Abstract return type. [JsiiInterface(nativeType: typeof(IInterfaceImplementedByAbstractClass), fullyQualifiedName: "jsii-calc.IInterfaceImplementedByAbstractClass")] public interface IInterfaceImplementedByAbstractClass { [JsiiProperty(name: "propFromInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] string PropFromInterface { get; } /// awslabs/jsii#220 Abstract return type. [JsiiTypeProxy(nativeType: typeof(IInterfaceImplementedByAbstractClass), fullyQualifiedName: "jsii-calc.IInterfaceImplementedByAbstractClass")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceImplementedByAbstractClass { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "propFromInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] public string PropFromInterface { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataType.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. [JsiiInterface(nativeType: typeof(IInterfaceThatShouldNotBeADataType), fullyQualifiedName: "jsii-calc.IInterfaceThatShouldNotBeADataType")] public interface IInterfaceThatShouldNotBeADataType : Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithMethods { [JsiiProperty(name: "otherValue", typeJson: "{\\"primitive\\":\\"string\\"}")] string OtherValue { get; } /// Even though this interface has only properties, it is disqualified from being a datatype because it inherits from an interface that is not a datatype. [JsiiTypeProxy(nativeType: typeof(IInterfaceThatShouldNotBeADataType), fullyQualifiedName: "jsii-calc.IInterfaceThatShouldNotBeADataType")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceThatShouldNotBeADataType { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "otherValue", typeJson: "{\\"primitive\\":\\"string\\"}")] public string OtherValue { get => GetInstanceProperty()!; } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Value { get => GetInstanceProperty()!; } [JsiiMethod(name: "doThings")] public void DoThings() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternal.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IInterfaceWithInternal), fullyQualifiedName: "jsii-calc.IInterfaceWithInternal")] public interface IInterfaceWithInternal { [JsiiMethod(name: "visible")] void Visible(); [JsiiTypeProxy(nativeType: typeof(IInterfaceWithInternal), fullyQualifiedName: "jsii-calc.IInterfaceWithInternal")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithInternal { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "visible")] public void Visible() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethods.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IInterfaceWithMethods), fullyQualifiedName: "jsii-calc.IInterfaceWithMethods")] public interface IInterfaceWithMethods { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] string Value { get; } [JsiiMethod(name: "doThings")] void DoThings(); [JsiiTypeProxy(nativeType: typeof(IInterfaceWithMethods), fullyQualifiedName: "jsii-calc.IInterfaceWithMethods")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithMethods { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Value { get => GetInstanceProperty()!; } [JsiiMethod(name: "doThings")] public void DoThings() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArguments.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. [JsiiInterface(nativeType: typeof(IInterfaceWithOptionalMethodArguments), fullyQualifiedName: "jsii-calc.IInterfaceWithOptionalMethodArguments")] public interface IInterfaceWithOptionalMethodArguments { [JsiiMethod(name: "hello", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] void Hello(string arg1, double? arg2 = null); /// awslabs/jsii#175 Interface proxies (and builders) do not respect optional arguments in methods. [JsiiTypeProxy(nativeType: typeof(IInterfaceWithOptionalMethodArguments), fullyQualifiedName: "jsii-calc.IInterfaceWithOptionalMethodArguments")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithOptionalMethodArguments { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "hello", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public void Hello(string arg1, double? arg2 = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object?[]{arg1, arg2}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IInterfaceWithProperties), fullyQualifiedName: "jsii-calc.IInterfaceWithProperties")] public interface IInterfaceWithProperties { [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] string ReadOnlyString { get; } [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] string ReadWriteString { get; set; } [JsiiTypeProxy(nativeType: typeof(IInterfaceWithProperties), fullyQualifiedName: "jsii-calc.IInterfaceWithProperties")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadOnlyString { get => GetInstanceProperty()!; } [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadWriteString { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IInterfaceWithPropertiesExtension), fullyQualifiedName: "jsii-calc.IInterfaceWithPropertiesExtension")] public interface IInterfaceWithPropertiesExtension : Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] double Foo { get; set; } [JsiiTypeProxy(nativeType: typeof(IInterfaceWithPropertiesExtension), fullyQualifiedName: "jsii-calc.IInterfaceWithPropertiesExtension")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithPropertiesExtension { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "readOnlyString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadOnlyString { get => GetInstanceProperty()!; } [JsiiProperty(name: "readWriteString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadWriteString { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJSII417Derived), fullyQualifiedName: "jsii-calc.IJSII417Derived")] public interface IJSII417Derived : Amazon.JSII.Tests.CalculatorNamespace.IJSII417PublicBaseOfBase { [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] string Property { get; } [JsiiMethod(name: "bar")] void Bar(); [JsiiMethod(name: "baz")] void Baz(); [JsiiTypeProxy(nativeType: typeof(IJSII417Derived), fullyQualifiedName: "jsii-calc.IJSII417Derived")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417Derived { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Property { get => GetInstanceProperty()!; } [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool HasRoot { get => GetInstanceProperty()!; } [JsiiMethod(name: "bar")] public void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "baz")] public void Baz() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJSII417PublicBaseOfBase), fullyQualifiedName: "jsii-calc.IJSII417PublicBaseOfBase")] public interface IJSII417PublicBaseOfBase { [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool HasRoot { get; } [JsiiMethod(name: "foo")] void Foo(); [JsiiTypeProxy(nativeType: typeof(IJSII417PublicBaseOfBase), fullyQualifiedName: "jsii-calc.IJSII417PublicBaseOfBase")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJSII417PublicBaseOfBase { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool HasRoot { get => GetInstanceProperty()!; } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJavaReservedWordsInAnInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJavaReservedWordsInAnInterface), fullyQualifiedName: "jsii-calc.IJavaReservedWordsInAnInterface")] public interface IJavaReservedWordsInAnInterface { [JsiiProperty(name: "while", typeJson: "{\\"primitive\\":\\"string\\"}")] string While { get; } [JsiiMethod(name: "abstract")] void Abstract(); [JsiiMethod(name: "assert")] void Assert(); [JsiiMethod(name: "boolean")] void Boolean(); [JsiiMethod(name: "break")] void Break(); [JsiiMethod(name: "byte")] void Byte(); [JsiiMethod(name: "case")] void Case(); [JsiiMethod(name: "catch")] void Catch(); [JsiiMethod(name: "char")] void Char(); [JsiiMethod(name: "class")] void Class(); [JsiiMethod(name: "const")] void Const(); [JsiiMethod(name: "continue")] void Continue(); [JsiiMethod(name: "default")] void Default(); [JsiiMethod(name: "do")] void Do(); [JsiiMethod(name: "double")] void Double(); [JsiiMethod(name: "else")] void Else(); [JsiiMethod(name: "enum")] void Enum(); [JsiiMethod(name: "extends")] void Extends(); [JsiiMethod(name: "false")] void False(); [JsiiMethod(name: "final")] void Final(); [JsiiMethod(name: "finally")] void Finally(); [JsiiMethod(name: "float")] void Float(); [JsiiMethod(name: "for")] void For(); [JsiiMethod(name: "goto")] void Goto(); [JsiiMethod(name: "if")] void If(); [JsiiMethod(name: "implements")] void Implements(); [JsiiMethod(name: "import")] void Import(); [JsiiMethod(name: "instanceof")] void Instanceof(); [JsiiMethod(name: "int")] void Int(); [JsiiMethod(name: "interface")] void Interface(); [JsiiMethod(name: "long")] void Long(); [JsiiMethod(name: "native")] void Native(); [JsiiMethod(name: "null")] void Null(); [JsiiMethod(name: "package")] void Package(); [JsiiMethod(name: "private")] void Private(); [JsiiMethod(name: "protected")] void Protected(); [JsiiMethod(name: "public")] void Public(); [JsiiMethod(name: "return")] void Return(); [JsiiMethod(name: "short")] void Short(); [JsiiMethod(name: "static")] void Static(); [JsiiMethod(name: "strictfp")] void Strictfp(); [JsiiMethod(name: "super")] void Super(); [JsiiMethod(name: "switch")] void Switch(); [JsiiMethod(name: "synchronized")] void Synchronized(); [JsiiMethod(name: "this")] void This(); [JsiiMethod(name: "throw")] void Throw(); [JsiiMethod(name: "throws")] void Throws(); [JsiiMethod(name: "transient")] void Transient(); [JsiiMethod(name: "true")] void True(); [JsiiMethod(name: "try")] void Try(); [JsiiMethod(name: "void")] void Void(); [JsiiMethod(name: "volatile")] void Volatile(); [JsiiTypeProxy(nativeType: typeof(IJavaReservedWordsInAnInterface), fullyQualifiedName: "jsii-calc.IJavaReservedWordsInAnInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJavaReservedWordsInAnInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "while", typeJson: "{\\"primitive\\":\\"string\\"}")] public string While { get => GetInstanceProperty()!; } [JsiiMethod(name: "abstract")] public void Abstract() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "assert")] public void Assert() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "boolean")] public void Boolean() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "break")] public void Break() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "byte")] public void Byte() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "case")] public void Case() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "catch")] public void Catch() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "char")] public void Char() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "class")] public void Class() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "const")] public void Const() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "continue")] public void Continue() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "default")] public void Default() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "do")] public void Do() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "double")] public void Double() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "else")] public void Else() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "enum")] public void Enum() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "extends")] public void Extends() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "false")] public void False() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "final")] public void Final() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "finally")] public void Finally() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "float")] public void Float() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "for")] public void For() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "goto")] public void Goto() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "if")] public void If() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "implements")] public void Implements() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "import")] public void Import() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "instanceof")] public void Instanceof() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "int")] public void Int() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "interface")] public void Interface() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "long")] public void Long() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "native")] public void Native() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "null")] public void Null() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "package")] public void Package() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "private")] public void Private() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "protected")] public void Protected() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "public")] public void Public() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "return")] public void Return() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "short")] public void Short() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "static")] public void Static() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "strictfp")] public void Strictfp() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "super")] public void Super() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "switch")] public void Switch() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "synchronized")] public void Synchronized() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "this")] public void This() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "throw")] public void Throw() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "throws")] public void Throws() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "transient")] public void Transient() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "true")] public void True() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "try")] public void Try() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "void")] public void Void() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "volatile")] public void Volatile() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJsii487External), fullyQualifiedName: "jsii-calc.IJsii487External")] public interface IJsii487External { [JsiiTypeProxy(nativeType: typeof(IJsii487External), fullyQualifiedName: "jsii-calc.IJsii487External")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJsii487External2), fullyQualifiedName: "jsii-calc.IJsii487External2")] public interface IJsii487External2 { [JsiiTypeProxy(nativeType: typeof(IJsii487External2), fullyQualifiedName: "jsii-calc.IJsii487External2")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External2 { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IJsii496), fullyQualifiedName: "jsii-calc.IJsii496")] public interface IJsii496 { [JsiiTypeProxy(nativeType: typeof(IJsii496), fullyQualifiedName: "jsii-calc.IJsii496")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii496 { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILevelOneProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(ILevelOneProps), fullyQualifiedName: "jsii-calc.LevelOneProps")] public interface ILevelOneProps { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}")] Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop { get; } [JsiiTypeProxy(nativeType: typeof(ILevelOneProps), fullyQualifiedName: "jsii-calc.LevelOneProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILoadBalancedFargateServiceProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// jsii#298: show default values in sphinx documentation, and respect newlines. [JsiiInterface(nativeType: typeof(ILoadBalancedFargateServiceProps), fullyQualifiedName: "jsii-calc.LoadBalancedFargateServiceProps")] public interface ILoadBalancedFargateServiceProps { /// The container port of the application load balancer attached to your Fargate service. /// /// Corresponds to container port mapping. /// /// Default: 80 /// [JsiiProperty(name: "containerPort", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? ContainerPort { get { return null; } } /// The number of cpu units used by the task. /// /// Valid values, which determines your range of valid values for the memory parameter: /// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB /// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB /// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB /// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments /// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 256 /// [JsiiProperty(name: "cpu", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Cpu { get { return null; } } /// The amount (in MiB) of memory used by the task. /// /// This field is required and you must use one of the following values, which determines your range of valid values /// for the cpu parameter: /// /// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) /// /// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) /// /// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) /// /// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) /// /// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 512 /// [JsiiProperty(name: "memoryMiB", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? MemoryMiB { get { return null; } } /// Determines whether the Application Load Balancer will be internet-facing. /// /// Default: true /// [JsiiProperty(name: "publicLoadBalancer", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? PublicLoadBalancer { get { return null; } } /// Determines whether your Fargate Service will be assigned a public IP address. /// /// Default: false /// [JsiiProperty(name: "publicTasks", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? PublicTasks { get { return null; } } /// jsii#298: show default values in sphinx documentation, and respect newlines. [JsiiTypeProxy(nativeType: typeof(ILoadBalancedFargateServiceProps), fullyQualifiedName: "jsii-calc.LoadBalancedFargateServiceProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ILoadBalancedFargateServiceProps { private _Proxy(ByRefValue reference): base(reference) { } /// The container port of the application load balancer attached to your Fargate service. /// /// Corresponds to container port mapping. /// /// Default: 80 /// [JsiiOptional] [JsiiProperty(name: "containerPort", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? ContainerPort { get => GetInstanceProperty(); } /// The number of cpu units used by the task. /// /// Valid values, which determines your range of valid values for the memory parameter: /// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB /// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB /// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB /// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments /// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 256 /// [JsiiOptional] [JsiiProperty(name: "cpu", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Cpu { get => GetInstanceProperty(); } /// The amount (in MiB) of memory used by the task. /// /// This field is required and you must use one of the following values, which determines your range of valid values /// for the cpu parameter: /// /// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) /// /// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) /// /// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) /// /// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) /// /// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 512 /// [JsiiOptional] [JsiiProperty(name: "memoryMiB", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? MemoryMiB { get => GetInstanceProperty(); } /// Determines whether the Application Load Balancer will be internet-facing. /// /// Default: true /// [JsiiOptional] [JsiiProperty(name: "publicLoadBalancer", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? PublicLoadBalancer { get => GetInstanceProperty(); } /// Determines whether your Fargate Service will be assigned a public IP address. /// /// Default: false /// [JsiiOptional] [JsiiProperty(name: "publicTasks", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? PublicTasks { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteral.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IMutableObjectLiteral), fullyQualifiedName: "jsii-calc.IMutableObjectLiteral")] public interface IMutableObjectLiteral { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] string Value { get; set; } [JsiiTypeProxy(nativeType: typeof(IMutableObjectLiteral), fullyQualifiedName: "jsii-calc.IMutableObjectLiteral")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IMutableObjectLiteral { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Value { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INestedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(INestedStruct), fullyQualifiedName: "jsii-calc.NestedStruct")] public interface INestedStruct { /// When provided, must be > 0. [JsiiProperty(name: "numberProp", typeJson: "{\\"primitive\\":\\"number\\"}")] double NumberProp { get; } [JsiiTypeProxy(nativeType: typeof(INestedStruct), fullyQualifiedName: "jsii-calc.NestedStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INestedStruct { private _Proxy(ByRefValue reference): base(reference) { } /// When provided, must be > 0. [JsiiProperty(name: "numberProp", typeJson: "{\\"primitive\\":\\"number\\"}")] public double NumberProp { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(INonInternalInterface), fullyQualifiedName: "jsii-calc.INonInternalInterface")] public interface INonInternalInterface : Amazon.JSII.Tests.CalculatorNamespace.IAnotherPublicInterface { [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] string B { get; set; } [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] string C { get; set; } [JsiiTypeProxy(nativeType: typeof(INonInternalInterface), fullyQualifiedName: "jsii-calc.INonInternalInterface")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INonInternalInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "b", typeJson: "{\\"primitive\\":\\"string\\"}")] public string B { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "c", typeJson: "{\\"primitive\\":\\"string\\"}")] public string C { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"string\\"}")] public string A { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INullShouldBeTreatedAsUndefinedData.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(INullShouldBeTreatedAsUndefinedData), fullyQualifiedName: "jsii-calc.NullShouldBeTreatedAsUndefinedData")] public interface INullShouldBeTreatedAsUndefinedData { [JsiiProperty(name: "arrayWithThreeElementsAndUndefinedAsSecondArgument", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument { get; } [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] object? ThisShouldBeUndefined { get { return null; } } [JsiiTypeProxy(nativeType: typeof(INullShouldBeTreatedAsUndefinedData), fullyQualifiedName: "jsii-calc.NullShouldBeTreatedAsUndefinedData")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "arrayWithThreeElementsAndUndefinedAsSecondArgument", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] public object? ThisShouldBeUndefined { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithProperty.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Make sure that setters are properly called on objects with interfaces. [JsiiInterface(nativeType: typeof(IObjectWithProperty), fullyQualifiedName: "jsii-calc.IObjectWithProperty")] public interface IObjectWithProperty { [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] string Property { get; set; } [JsiiMethod(name: "wasSet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] bool WasSet(); /// Make sure that setters are properly called on objects with interfaces. [JsiiTypeProxy(nativeType: typeof(IObjectWithProperty), fullyQualifiedName: "jsii-calc.IObjectWithProperty")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IObjectWithProperty { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Property { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiMethod(name: "wasSet", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] public bool WasSet() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalMethod.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Checks that optional result from interface method code generates correctly. [JsiiInterface(nativeType: typeof(IOptionalMethod), fullyQualifiedName: "jsii-calc.IOptionalMethod")] public interface IOptionalMethod { [JsiiMethod(name: "optional", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}")] string? Optional(); /// Checks that optional result from interface method code generates correctly. [JsiiTypeProxy(nativeType: typeof(IOptionalMethod), fullyQualifiedName: "jsii-calc.IOptionalMethod")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalMethod { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "optional", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string? Optional() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IOptionalStruct), fullyQualifiedName: "jsii-calc.OptionalStruct")] public interface IOptionalStruct { [JsiiProperty(name: "field", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Field { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IOptionalStruct), fullyQualifiedName: "jsii-calc.OptionalStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "field", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Field { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParamShadowsBuiltinsProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IParamShadowsBuiltinsProps), fullyQualifiedName: "jsii-calc.ParamShadowsBuiltinsProps")] public interface IParamShadowsBuiltinsProps { [JsiiProperty(name: "booleanProperty", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool BooleanProperty { get; } [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string StringProperty { get; } [JsiiProperty(name: "structProperty", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}")] Amazon.JSII.Tests.CalculatorNamespace.IStructA StructProperty { get; } [JsiiTypeProxy(nativeType: typeof(IParamShadowsBuiltinsProps), fullyQualifiedName: "jsii-calc.ParamShadowsBuiltinsProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IParamShadowsBuiltinsProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "booleanProperty", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool BooleanProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "structProperty", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.IStructA StructProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParentStruct982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// https://github.com/aws/jsii/issues/982. [JsiiInterface(nativeType: typeof(IParentStruct982), fullyQualifiedName: "jsii-calc.ParentStruct982")] public interface IParentStruct982 { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] string Foo { get; } /// https://github.com/aws/jsii/issues/982. [JsiiTypeProxy(nativeType: typeof(IParentStruct982), fullyQualifiedName: "jsii-calc.ParentStruct982")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplemented.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IPrivatelyImplemented), fullyQualifiedName: "jsii-calc.IPrivatelyImplemented")] public interface IPrivatelyImplemented { [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool Success { get; } [JsiiTypeProxy(nativeType: typeof(IPrivatelyImplemented), fullyQualifiedName: "jsii-calc.IPrivatelyImplemented")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPrivatelyImplemented { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Success { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IPublicInterface), fullyQualifiedName: "jsii-calc.IPublicInterface")] public interface IPublicInterface { [JsiiMethod(name: "bye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Bye(); [JsiiTypeProxy(nativeType: typeof(IPublicInterface), fullyQualifiedName: "jsii-calc.IPublicInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "bye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Bye() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IPublicInterface2), fullyQualifiedName: "jsii-calc.IPublicInterface2")] public interface IPublicInterface2 { [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Ciao(); [JsiiTypeProxy(nativeType: typeof(IPublicInterface2), fullyQualifiedName: "jsii-calc.IPublicInterface2")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface2 { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Ciao() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGenerator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Generates random numbers. [JsiiInterface(nativeType: typeof(IRandomNumberGenerator), fullyQualifiedName: "jsii-calc.IRandomNumberGenerator")] public interface IRandomNumberGenerator { /// Returns another random number. /// A random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] double Next(); /// Generates random numbers. [JsiiTypeProxy(nativeType: typeof(IRandomNumberGenerator), fullyQualifiedName: "jsii-calc.IRandomNumberGenerator")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator { private _Proxy(ByRefValue reference): base(reference) { } /// Returns another random number. /// A random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public double Next() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Returns a subclass of a known class which implements an interface. [JsiiInterface(nativeType: typeof(IReturnJsii976), fullyQualifiedName: "jsii-calc.IReturnJsii976")] public interface IReturnJsii976 { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] double Foo { get; } /// Returns a subclass of a known class which implements an interface. [JsiiTypeProxy(nativeType: typeof(IReturnJsii976), fullyQualifiedName: "jsii-calc.IReturnJsii976")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnJsii976 { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IReturnsNumber), fullyQualifiedName: "jsii-calc.IReturnsNumber")] public interface IReturnsNumber { [JsiiProperty(name: "numberProp", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}")] Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number NumberProp { get; } [JsiiMethod(name: "obtainNumber", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable ObtainNumber(); [JsiiTypeProxy(nativeType: typeof(IReturnsNumber), fullyQualifiedName: "jsii-calc.IReturnsNumber")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IReturnsNumber { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "numberProp", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number NumberProp { get => GetInstanceProperty()!; } [JsiiMethod(name: "obtainNumber", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable ObtainNumber() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRootStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. /// /// This is cheating with the (current) declared types, but this is the "more /// idiomatic" way for Pythonists. /// [JsiiInterface(nativeType: typeof(IRootStruct), fullyQualifiedName: "jsii-calc.RootStruct")] public interface IRootStruct { /// May not be empty. [JsiiProperty(name: "stringProp", typeJson: "{\\"primitive\\":\\"string\\"}")] string StringProp { get; } [JsiiProperty(name: "nestedStruct", typeJson: "{\\"fqn\\":\\"jsii-calc.NestedStruct\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { get { return null; } } /// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. /// /// This is cheating with the (current) declared types, but this is the "more /// idiomatic" way for Pythonists. /// [JsiiTypeProxy(nativeType: typeof(IRootStruct), fullyQualifiedName: "jsii-calc.RootStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IRootStruct { private _Proxy(ByRefValue reference): base(reference) { } /// May not be empty. [JsiiProperty(name: "stringProp", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProp { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "nestedStruct", typeJson: "{\\"fqn\\":\\"jsii-calc.NestedStruct\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISecondLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(ISecondLevelStruct), fullyQualifiedName: "jsii-calc.SecondLevelStruct")] public interface ISecondLevelStruct { /// It's long and required. [JsiiProperty(name: "deeperRequiredProp", typeJson: "{\\"primitive\\":\\"string\\"}")] string DeeperRequiredProp { get; } /// It's long, but you'll almost never pass it. [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? DeeperOptionalProp { get { return null; } } [JsiiTypeProxy(nativeType: typeof(ISecondLevelStruct), fullyQualifiedName: "jsii-calc.SecondLevelStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } /// It's long and required. [JsiiProperty(name: "deeperRequiredProp", typeJson: "{\\"primitive\\":\\"string\\"}")] public string DeeperRequiredProp { get => GetInstanceProperty()!; } /// It's long, but you'll almost never pass it. [JsiiOptional] [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? DeeperOptionalProp { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISmellyStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(ISmellyStruct), fullyQualifiedName: "jsii-calc.SmellyStruct")] public interface ISmellyStruct { [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] string Property { get; } [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool YetAnoterOne { get; } [JsiiTypeProxy(nativeType: typeof(ISmellyStruct), fullyQualifiedName: "jsii-calc.SmellyStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISmellyStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Property { get => GetInstanceProperty()!; } [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool YetAnoterOne { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")] public interface IStableInterface { [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? MutableProperty { get { return null; } set { throw new System.NotSupportedException("'set' for 'MutableProperty' is not implemented"); } } [JsiiMethod(name: "method")] void Method(); [JsiiTypeProxy(nativeType: typeof(IStableInterface), fullyQualifiedName: "jsii-calc.IStableInterface")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableInterface { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } [JsiiMethod(name: "method")] public void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")] public interface IStableStruct { [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] string ReadonlyProperty { get; } [JsiiTypeProxy(nativeType: typeof(IStableStruct), fullyQualifiedName: "jsii-calc.StableStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStableStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructA.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// We can serialize and deserialize structs without silently ignoring optional fields. [JsiiInterface(nativeType: typeof(IStructA), fullyQualifiedName: "jsii-calc.StructA")] public interface IStructA { [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] string RequiredString { get; } [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? OptionalNumber { get { return null; } } [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? OptionalString { get { return null; } } /// We can serialize and deserialize structs without silently ignoring optional fields. [JsiiTypeProxy(nativeType: typeof(IStructA), fullyQualifiedName: "jsii-calc.StructA")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructA { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string RequiredString { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? OptionalNumber { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? OptionalString { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructB.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. [JsiiInterface(nativeType: typeof(IStructB), fullyQualifiedName: "jsii-calc.StructB")] public interface IStructB { [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] string RequiredString { get; } [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? OptionalBoolean { get { return null; } } [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { get { return null; } } /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. [JsiiTypeProxy(nativeType: typeof(IStructB), fullyQualifiedName: "jsii-calc.StructB")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructB { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string RequiredString { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? OptionalBoolean { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructParameterType.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. /// /// See: https://github.com/aws/aws-cdk/issues/4302 /// [JsiiInterface(nativeType: typeof(IStructParameterType), fullyQualifiedName: "jsii-calc.StructParameterType")] public interface IStructParameterType { [JsiiProperty(name: "scope", typeJson: "{\\"primitive\\":\\"string\\"}")] string Scope { get; } [JsiiProperty(name: "props", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] bool? Props { get { return null; } } /// Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. /// /// See: https://github.com/aws/aws-cdk/issues/4302 /// [JsiiTypeProxy(nativeType: typeof(IStructParameterType), fullyQualifiedName: "jsii-calc.StructParameterType")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "scope", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Scope { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "props", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? Props { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegate.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that a "pure" implementation of an interface works correctly. [JsiiInterface(nativeType: typeof(IStructReturningDelegate), fullyQualifiedName: "jsii-calc.IStructReturningDelegate")] public interface IStructReturningDelegate { [JsiiMethod(name: "returnStruct", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.IStructB ReturnStruct(); /// Verifies that a "pure" implementation of an interface works correctly. [JsiiTypeProxy(nativeType: typeof(IStructReturningDelegate), fullyQualifiedName: "jsii-calc.IStructReturningDelegate")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructReturningDelegate { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "returnStruct", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.StructB\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.IStructB ReturnStruct() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithCollectionOfUnionts.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IStructWithCollectionOfUnionts), fullyQualifiedName: "jsii-calc.StructWithCollectionOfUnionts")] public interface IStructWithCollectionOfUnionts { [JsiiProperty(name: "unionProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},\\"kind\\":\\"array\\"}}")] System.Collections.Generic.IDictionary[] UnionProperty { get; } [JsiiTypeProxy(nativeType: typeof(IStructWithCollectionOfUnionts), fullyQualifiedName: "jsii-calc.StructWithCollectionOfUnionts")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructWithCollectionOfUnionts { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "unionProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},\\"kind\\":\\"array\\"}}")] public System.Collections.Generic.IDictionary[] UnionProperty { get => GetInstanceProperty[]>()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IStructWithEnum), fullyQualifiedName: "jsii-calc.StructWithEnum")] public interface IStructWithEnum { /// An enum value. [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"jsii-calc.StringEnum\\"}")] Amazon.JSII.Tests.CalculatorNamespace.StringEnum Foo { get; } /// Optional enum value (of type integer). /// /// Default: AllTypesEnum.YOUR_ENUM_VALUE /// [JsiiProperty(name: "bar", typeJson: "{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum? Bar { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IStructWithEnum), fullyQualifiedName: "jsii-calc.StructWithEnum")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum { private _Proxy(ByRefValue reference): base(reference) { } /// An enum value. [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"jsii-calc.StringEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.StringEnum Foo { get => GetInstanceProperty()!; } /// Optional enum value (of type integer). /// /// Default: AllTypesEnum.YOUR_ENUM_VALUE /// [JsiiOptional] [JsiiProperty(name: "bar", typeJson: "{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum? Bar { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithJavaReservedWords.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IStructWithJavaReservedWords), fullyQualifiedName: "jsii-calc.StructWithJavaReservedWords")] public interface IStructWithJavaReservedWords { [JsiiProperty(name: "default", typeJson: "{\\"primitive\\":\\"string\\"}")] string Default { get; } [JsiiProperty(name: "assert", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Assert { get { return null; } } [JsiiProperty(name: "result", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Result { get { return null; } } [JsiiProperty(name: "that", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? That { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IStructWithJavaReservedWords), fullyQualifiedName: "jsii-calc.StructWithJavaReservedWords")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IStructWithJavaReservedWords { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "default", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Default { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "assert", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Assert { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "result", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Result { get => GetInstanceProperty(); } [JsiiOptional] [JsiiProperty(name: "that", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? That { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISupportsNiceJavaBuilderProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(ISupportsNiceJavaBuilderProps), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilderProps")] public interface ISupportsNiceJavaBuilderProps { /// Some number, like 42. [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] double Bar { get; } /// An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. /// /// But here we are, doing it like we didn't care. /// [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Id { get { return null; } } [JsiiTypeProxy(nativeType: typeof(ISupportsNiceJavaBuilderProps), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilderProps")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps { private _Proxy(ByRefValue reference): base(reference) { } /// Some number, like 42. [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Bar { get => GetInstanceProperty()!; } /// An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. /// /// But here we are, doing it like we didn't care. /// [JsiiOptional] [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Id { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ITopLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(ITopLevelStruct), fullyQualifiedName: "jsii-calc.TopLevelStruct")] public interface ITopLevelStruct { /// This is a required field. [JsiiProperty(name: "required", typeJson: "{\\"primitive\\":\\"string\\"}")] string Required { get; } /// A union to really stress test our serialization. [JsiiProperty(name: "secondLevel", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.SecondLevelStruct\\"}]}}")] object SecondLevel { get; } /// You don't have to pass this. [JsiiProperty(name: "optional", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Optional { get { return null; } } [JsiiTypeProxy(nativeType: typeof(ITopLevelStruct), fullyQualifiedName: "jsii-calc.TopLevelStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct { private _Proxy(ByRefValue reference): base(reference) { } /// This is a required field. [JsiiProperty(name: "required", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Required { get => GetInstanceProperty()!; } /// A union to really stress test our serialization. [JsiiProperty(name: "secondLevel", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.SecondLevelStruct\\"}]}}")] public object SecondLevel { get => GetInstanceProperty()!; } /// You don't have to pass this. [JsiiOptional] [JsiiProperty(name: "optional", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Optional { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiInterface(nativeType: typeof(IUnionProperties), fullyQualifiedName: "jsii-calc.UnionProperties")] public interface IUnionProperties { [JsiiProperty(name: "bar", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.AllTypes\\"}]}}")] object Bar { get; } [JsiiProperty(name: "foo", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"}]}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] object? Foo { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IUnionProperties), fullyQualifiedName: "jsii-calc.UnionProperties")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IUnionProperties { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bar", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.AllTypes\\"}]}}")] public object Bar { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "foo", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"}]}}", isOptional: true)] public object? Foo { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IWallClock.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Implement this interface. [JsiiInterface(nativeType: typeof(IWallClock), fullyQualifiedName: "jsii-calc.IWallClock")] public interface IWallClock { /// Returns the current time, formatted as an ISO-8601 string. [JsiiMethod(name: "iso8601Now", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Iso8601Now(); /// Implement this interface. [JsiiTypeProxy(nativeType: typeof(IWallClock), fullyQualifiedName: "jsii-calc.IWallClock")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IWallClock { private _Proxy(ByRefValue reference): base(reference) { } /// Returns the current time, formatted as an ISO-8601 string. [JsiiMethod(name: "iso8601Now", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Iso8601Now() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementInternalInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ImplementInternalInterface), fullyQualifiedName: "jsii-calc.ImplementInternalInterface")] public class ImplementInternalInterface : DeputyBase { public ImplementInternalInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementInternalInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementInternalInterface(DeputyProps props): base(props) { } [JsiiProperty(name: "prop", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Prop { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Implementation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Implementation), fullyQualifiedName: "jsii-calc.Implementation")] public class Implementation : DeputyBase { public Implementation(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Implementation(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Implementation(DeputyProps props): base(props) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternal.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ImplementsInterfaceWithInternal), fullyQualifiedName: "jsii-calc.ImplementsInterfaceWithInternal")] public class ImplementsInterfaceWithInternal : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithInternal { public ImplementsInterfaceWithInternal(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsInterfaceWithInternal(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsInterfaceWithInternal(DeputyProps props): base(props) { } [JsiiMethod(name: "visible")] public virtual void Visible() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternalSubclass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ImplementsInterfaceWithInternalSubclass), fullyQualifiedName: "jsii-calc.ImplementsInterfaceWithInternalSubclass")] public class ImplementsInterfaceWithInternalSubclass : Amazon.JSII.Tests.CalculatorNamespace.ImplementsInterfaceWithInternal { public ImplementsInterfaceWithInternalSubclass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsInterfaceWithInternalSubclass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsInterfaceWithInternalSubclass(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsPrivateInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ImplementsPrivateInterface), fullyQualifiedName: "jsii-calc.ImplementsPrivateInterface")] public class ImplementsPrivateInterface : DeputyBase { public ImplementsPrivateInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsPrivateInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ImplementsPrivateInterface(DeputyProps props): base(props) { } [JsiiProperty(name: "private", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Private { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.ImplictBaseOfBase")] public class ImplictBaseOfBase : Amazon.JSII.Tests.CalculatorNamespace.IImplictBaseOfBase { [JsiiProperty(name: "goo", typeJson: "{\\"primitive\\":\\"date\\"}")] public System.DateTime Goo { get; set; } [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar { get; set; } [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.InbetweenClass), fullyQualifiedName: "jsii-calc.InbetweenClass")] public class InbetweenClass : Amazon.JSII.Tests.CalculatorNamespace.PublicClass, Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface2 { public InbetweenClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InbetweenClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InbetweenClass(DeputyProps props): base(props) { } [JsiiMethod(name: "ciao", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Ciao() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceCollections.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that collections of interfaces or structs are correctly handled. /// /// See: https://github.com/aws/jsii/issues/1196 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceCollections), fullyQualifiedName: "jsii-calc.InterfaceCollections")] public class InterfaceCollections : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfaceCollections(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfaceCollections(DeputyProps props): base(props) { } [JsiiMethod(name: "listOfInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.IBell\\"},\\"kind\\":\\"array\\"}}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IBell[] ListOfInterfaces() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceCollections), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "listOfStructs", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.StructA\\"},\\"kind\\":\\"array\\"}}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IStructA[] ListOfStructs() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceCollections), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "mapOfInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.IBell\\"},\\"kind\\":\\"map\\"}}}")] public static System.Collections.Generic.IDictionary MapOfInterfaces() { return InvokeStaticMethod>(typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceCollections), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "mapOfStructs", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"jsii-calc.StructA\\"},\\"kind\\":\\"map\\"}}}")] public static System.Collections.Generic.IDictionary MapOfStructs() { return InvokeStaticMethod>(typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceCollections), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Foo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses.Foo), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceIncludesClasses.Foo")] public class Foo : DeputyBase { public Foo(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Foo(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Foo(DeputyProps props): base(props) { } [JsiiOptional] [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? Bar { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Hello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello")] public class Hello : Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses.IHello { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { [JsiiInterface(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello")] public interface IHello { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] double Foo { get; } [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceIncludesClasses.Hello")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses.IHello { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/Hello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello")] public class Hello : Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface.IHello { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface { [JsiiInterface(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello")] public interface IHello { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] double Foo { get; } [JsiiTypeProxy(nativeType: typeof(IHello), fullyQualifiedName: "jsii-calc.InterfaceInNamespaceOnlyInterface.Hello")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface.IHello { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfacesMaker.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// We can return arrays of interfaces See aws/aws-cdk#2362. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfacesMaker), fullyQualifiedName: "jsii-calc.InterfacesMaker")] public class InterfacesMaker : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfacesMaker(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InterfacesMaker(DeputyProps props): base(props) { } [JsiiMethod(name: "makeInterfaces", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IDoublable\\"},\\"kind\\":\\"array\\"}}}", parametersJson: "[{\\"name\\":\\"count\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public static Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IDoublable[] MakeInterfaces(double count) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.InterfacesMaker), new System.Type[]{typeof(double)}, new object[]{count})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Internal/DependencyResolution/Anchor.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Internal.DependencyResolution { public sealed class Anchor { public Anchor() { new Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution.Anchor(); new Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Internal.DependencyResolution.Anchor(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Isomorphism.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Checks the "same instance" isomorphism is preserved within the constructor. /// /// Create a subclass of this, and assert that this.myself() actually returns /// this from within the constructor. /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Isomorphism), fullyQualifiedName: "jsii-calc.Isomorphism")] public abstract class Isomorphism : DeputyBase { protected Isomorphism(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Isomorphism(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Isomorphism(DeputyProps props): base(props) { } [JsiiMethod(name: "myself", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.Isomorphism\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Isomorphism Myself() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Checks the "same instance" isomorphism is preserved within the constructor. /// /// Create a subclass of this, and assert that this.myself() actually returns /// this from within the constructor. /// [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Isomorphism), fullyQualifiedName: "jsii-calc.Isomorphism")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Isomorphism { private _Proxy(ByRefValue reference): base(reference) { } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Issue2638.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Docstrings with period. /// /// See: https://github.com/aws/jsii/issues/2638 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Issue2638), fullyQualifiedName: "jsii-calc.Issue2638")] public class Issue2638 : DeputyBase { /// First sentence. /// /// Second sentence. Third sentence. /// public Issue2638(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Issue2638(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Issue2638(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Issue2638B.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Issue2638B), fullyQualifiedName: "jsii-calc.Issue2638B")] public class Issue2638B : DeputyBase { public Issue2638B(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Issue2638B(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Issue2638B(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JSII417Derived), fullyQualifiedName: "jsii-calc.JSII417Derived", parametersJson: "[{\\"name\\":\\"property\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class JSII417Derived : Amazon.JSII.Tests.CalculatorNamespace.JSII417PublicBaseOfBase { public JSII417Derived(string property): base(_MakeDeputyProps(property)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string property) { return new DeputyProps(new object?[]{property}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSII417Derived(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSII417Derived(DeputyProps props): base(props) { } [JsiiMethod(name: "bar")] public virtual void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "baz")] public virtual void Baz() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] protected virtual string Property { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417PublicBaseOfBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JSII417PublicBaseOfBase), fullyQualifiedName: "jsii-calc.JSII417PublicBaseOfBase")] public class JSII417PublicBaseOfBase : DeputyBase { public JSII417PublicBaseOfBase(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSII417PublicBaseOfBase(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSII417PublicBaseOfBase(DeputyProps props): base(props) { } [JsiiMethod(name: "makeInstance", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.JSII417PublicBaseOfBase\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.JSII417PublicBaseOfBase MakeInstance() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JSII417PublicBaseOfBase), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "foo")] public virtual void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "hasRoot", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool HasRoot { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JSObjectLiteralForInterface), fullyQualifiedName: "jsii-calc.JSObjectLiteralForInterface")] public class JSObjectLiteralForInterface : DeputyBase { public JSObjectLiteralForInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralForInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralForInterface(DeputyProps props): base(props) { } [JsiiMethod(name: "giveMeFriendly", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly GiveMeFriendly() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "giveMeFriendlyGenerator", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IFriendlyRandomGenerator\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IFriendlyRandomGenerator GiveMeFriendlyGenerator() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JSObjectLiteralToNative), fullyQualifiedName: "jsii-calc.JSObjectLiteralToNative")] public class JSObjectLiteralToNative : DeputyBase { public JSObjectLiteralToNative(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralToNative(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralToNative(DeputyProps props): base(props) { } [JsiiMethod(name: "returnLiteral", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.JSObjectLiteralToNativeClass\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.JSObjectLiteralToNativeClass ReturnLiteral() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JSObjectLiteralToNativeClass), fullyQualifiedName: "jsii-calc.JSObjectLiteralToNativeClass")] public class JSObjectLiteralToNativeClass : DeputyBase { public JSObjectLiteralToNativeClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralToNativeClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JSObjectLiteralToNativeClass(DeputyProps props): base(props) { } [JsiiProperty(name: "propA", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string PropA { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "propB", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double PropB { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JavaReservedWords), fullyQualifiedName: "jsii-calc.JavaReservedWords")] public class JavaReservedWords : DeputyBase { public JavaReservedWords(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JavaReservedWords(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JavaReservedWords(DeputyProps props): base(props) { } [JsiiMethod(name: "abstract")] public virtual void Abstract() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "assert")] public virtual void Assert() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "boolean")] public virtual void Boolean() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "break")] public virtual void Break() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "byte")] public virtual void Byte() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "case")] public virtual void Case() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "catch")] public virtual void Catch() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "char")] public virtual void Char() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "class")] public virtual void Class() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "const")] public virtual void Const() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "continue")] public virtual void Continue() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "default")] public virtual void Default() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "do")] public virtual void Do() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "double")] public virtual void Double() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "else")] public virtual void Else() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "enum")] public virtual void Enum() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "extends")] public virtual void Extends() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "false")] public virtual void False() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "final")] public virtual void Final() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "finally")] public virtual void Finally() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "float")] public virtual void Float() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "for")] public virtual void For() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "goto")] public virtual void Goto() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "if")] public virtual void If() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "implements")] public virtual void Implements() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "import")] public virtual void Import() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "instanceof")] public virtual void Instanceof() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "int")] public virtual void Int() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "interface")] public virtual void Interface() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "long")] public virtual void Long() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "native")] public virtual void Native() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "new")] public virtual void New() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "null")] public virtual void Null() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "package")] public virtual void Package() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "private")] public virtual void Private() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "protected")] public virtual void Protected() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "public")] public virtual void Public() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "return")] public virtual void Return() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "short")] public virtual void Short() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "static")] public virtual void Static() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "strictfp")] public virtual void Strictfp() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "super")] public virtual void Super() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "switch")] public virtual void Switch() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "synchronized")] public virtual void Synchronized() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "this")] public virtual void This() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "throw")] public virtual void Throw() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "throws")] public virtual void Throws() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "transient")] public virtual void Transient() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "true")] public virtual void True() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "try")] public virtual void Try() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "void")] public virtual void Void() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "volatile")] public virtual void Volatile() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "while", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string While { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii487Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii487Derived), fullyQualifiedName: "jsii-calc.Jsii487Derived")] public class Jsii487Derived : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External2, Amazon.JSII.Tests.CalculatorNamespace.IJsii487External { public Jsii487Derived(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Jsii487Derived(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Jsii487Derived(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii496Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii496Derived), fullyQualifiedName: "jsii-calc.Jsii496Derived")] public class Jsii496Derived : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.IJsii496 { public Jsii496Derived(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Jsii496Derived(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Jsii496Derived(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii3656/IImplementMeOpts.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Jsii3656 { [JsiiInterface(nativeType: typeof(IImplementMeOpts), fullyQualifiedName: "jsii-calc.jsii3656.ImplementMeOpts")] public interface IImplementMeOpts { [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] string Name { get; } [JsiiProperty(name: "count", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] double? Count { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IImplementMeOpts), fullyQualifiedName: "jsii-calc.jsii3656.ImplementMeOpts")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.IImplementMeOpts { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Name { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "count", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? Count { get => GetInstanceProperty(); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii3656/ImplementMeOpts.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Jsii3656 { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.jsii3656.ImplementMeOpts")] public class ImplementMeOpts : Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.IImplementMeOpts { [JsiiProperty(name: "name", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Name { get; set; } [JsiiOptional] [JsiiProperty(name: "count", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? Count { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii3656/OverrideMe.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Jsii3656 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe), fullyQualifiedName: "jsii-calc.jsii3656.OverrideMe")] public abstract class OverrideMe : DeputyBase { protected OverrideMe(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverrideMe(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverrideMe(DeputyProps props): base(props) { } [JsiiMethod(name: "callAbstract", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"receiver\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.jsii3656.OverrideMe\\"}}]")] public static bool CallAbstract(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe receiver) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe)}, new object[]{receiver})!; } [JsiiMethod(name: "implementMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"opts\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.jsii3656.ImplementMeOpts\\"}}]")] public abstract bool ImplementMe(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.IImplementMeOpts opts); [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe), fullyQualifiedName: "jsii-calc.jsii3656.OverrideMe")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.OverrideMe { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "implementMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"opts\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.jsii3656.ImplementMeOpts\\"}}]")] public override bool ImplementMe(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.IImplementMeOpts opts) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Jsii3656.IImplementMeOpts)}, new object[]{opts})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Host runtime version should be set via JSII_AGENT. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent), fullyQualifiedName: "jsii-calc.JsiiAgent")] public class JsiiAgent : DeputyBase { public JsiiAgent(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JsiiAgent(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JsiiAgent(DeputyProps props): base(props) { } /// Returns the value of the JSII_AGENT environment variable. [JsiiOptional] [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public static string? Value { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent)); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsonFormatter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Make sure structs are un-decorated on the way in. /// /// See: https://github.com/aws/aws-cdk/issues/5066 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), fullyQualifiedName: "jsii-calc.JsonFormatter")] public class JsonFormatter : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JsonFormatter(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected JsonFormatter(DeputyProps props): base(props) { } [JsiiMethod(name: "anyArray", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyArray() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyBooleanFalse", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyBooleanFalse() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyBooleanTrue", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyBooleanTrue() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyDate", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyDate() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyEmptyString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyEmptyString() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyFunction", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyFunction() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyHash", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyHash() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyNull", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyNull() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyNumber", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyNumber() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyRef", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyRef() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyString() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyUndefined", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyUndefined() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "anyZero", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object AnyZero() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "stringify", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"value\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public static string? Stringify(object? @value = null) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{typeof(object)}, new object?[]{@value}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LevelOne.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Validates that nested classes get correct code generation for the occasional forward reference. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.LevelOne), fullyQualifiedName: "jsii-calc.LevelOne", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.LevelOneProps\\"}}]")] public class LevelOne : DeputyBase { public LevelOne(Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps props): base(_MakeDeputyProps(props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps props) { return new DeputyProps(new object?[]{props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected LevelOne(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected LevelOne(DeputyProps props): base(props) { } [JsiiProperty(name: "props", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOneProps\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps Props { get => GetInstanceProperty()!; } [JsiiInterface(nativeType: typeof(IPropBooleanValue), fullyQualifiedName: "jsii-calc.LevelOne.PropBooleanValue")] public interface IPropBooleanValue { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool Value { get; } [JsiiTypeProxy(nativeType: typeof(IPropBooleanValue), fullyQualifiedName: "jsii-calc.LevelOne.PropBooleanValue")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Value { get => GetInstanceProperty()!; } } } #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.LevelOne.PropBooleanValue")] public class PropBooleanValue : Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Value { get; set; } } [JsiiInterface(nativeType: typeof(IPropProperty), fullyQualifiedName: "jsii-calc.LevelOne.PropProperty")] public interface IPropProperty { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropBooleanValue\\"}")] Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue Prop { get; } [JsiiTypeProxy(nativeType: typeof(IPropProperty), fullyQualifiedName: "jsii-calc.LevelOne.PropProperty")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropBooleanValue\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue Prop { get => GetInstanceProperty()!; } } } #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.LevelOne.PropProperty")] public class PropProperty : Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropBooleanValue\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropBooleanValue Prop { get; set; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LevelOneProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.LevelOneProps")] public class LevelOneProps : Amazon.JSII.Tests.CalculatorNamespace.ILevelOneProps { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.LevelOne.PropProperty\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.LevelOne.IPropProperty Prop { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServiceProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// jsii#298: show default values in sphinx documentation, and respect newlines. [JsiiByValue(fqn: "jsii-calc.LoadBalancedFargateServiceProps")] public class LoadBalancedFargateServiceProps : Amazon.JSII.Tests.CalculatorNamespace.ILoadBalancedFargateServiceProps { /// The container port of the application load balancer attached to your Fargate service. /// /// Corresponds to container port mapping. /// /// Default: 80 /// [JsiiOptional] [JsiiProperty(name: "containerPort", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? ContainerPort { get; set; } /// The number of cpu units used by the task. /// /// Valid values, which determines your range of valid values for the memory parameter: /// 256 (.25 vCPU) - Available memory values: 0.5GB, 1GB, 2GB /// 512 (.5 vCPU) - Available memory values: 1GB, 2GB, 3GB, 4GB /// 1024 (1 vCPU) - Available memory values: 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB /// 2048 (2 vCPU) - Available memory values: Between 4GB and 16GB in 1GB increments /// 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 256 /// [JsiiOptional] [JsiiProperty(name: "cpu", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Cpu { get; set; } /// The amount (in MiB) of memory used by the task. /// /// This field is required and you must use one of the following values, which determines your range of valid values /// for the cpu parameter: /// /// 0.5GB, 1GB, 2GB - Available cpu values: 256 (.25 vCPU) /// /// 1GB, 2GB, 3GB, 4GB - Available cpu values: 512 (.5 vCPU) /// /// 2GB, 3GB, 4GB, 5GB, 6GB, 7GB, 8GB - Available cpu values: 1024 (1 vCPU) /// /// Between 4GB and 16GB in 1GB increments - Available cpu values: 2048 (2 vCPU) /// /// Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) /// /// This default is set in the underlying FargateTaskDefinition construct. /// /// Default: 512 /// [JsiiOptional] [JsiiProperty(name: "memoryMiB", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? MemoryMiB { get; set; } /// Determines whether the Application Load Balancer will be internet-facing. /// /// Default: true /// [JsiiOptional] [JsiiProperty(name: "publicLoadBalancer", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? PublicLoadBalancer { get; set; } /// Determines whether your Fargate Service will be assigned a public IP address. /// /// Default: false /// [JsiiOptional] [JsiiProperty(name: "publicTasks", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? PublicTasks { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.MethodNamedProperty), fullyQualifiedName: "jsii-calc.MethodNamedProperty")] public class MethodNamedProperty : DeputyBase { public MethodNamedProperty(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MethodNamedProperty(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MethodNamedProperty(DeputyProps props): base(props) { } [JsiiMethod(name: "property", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Property() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "elite", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Elite { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2530/MyClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2530 { /// Verifies a method with parameters "_" can be generated. /// /// See: https://github.com/aws/jsii/issues/2530 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2530.MyClass), fullyQualifiedName: "jsii-calc.module2530.MyClass", parametersJson: "[{\\"name\\":\\"_\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public class MyClass : DeputyBase { public MyClass(double _): base(_MakeDeputyProps(_)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double _) { return new DeputyProps(new object?[]{_}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(DeputyProps props): base(props) { } [JsiiMethod(name: "bar", parametersJson: "[{\\"name\\":\\"_\\",\\"type\\":{\\"primitive\\":\\"boolean\\"}}]")] public static void Bar(bool _) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2530.MyClass), new System.Type[]{typeof(bool)}, new object[]{_}); } [JsiiMethod(name: "foo", parametersJson: "[{\\"name\\":\\"_\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual void Foo(string _) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string)}, new object[]{_}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2617/OnlyStatics.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2617 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2617.OnlyStatics), fullyQualifiedName: "jsii-calc.module2617.OnlyStatics")] public class OnlyStatics : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OnlyStatics(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OnlyStatics(DeputyProps props): base(props) { } [JsiiMethod(name: "bar")] public static void Bar() { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2617.OnlyStatics), new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public static void Foo() { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2617.OnlyStatics), new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2647/ExtendAndImplement.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2647 { /// This class falls into the category of "multiple bases" from a different module from a go code gen perspective. /// /// See: https://github.com/aws/jsii/issues/2647 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2647.ExtendAndImplement), fullyQualifiedName: "jsii-calc.module2647.ExtendAndImplement", parametersJson: "[{\\"name\\":\\"very\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-base-of-base.Very\\"}}]")] public class ExtendAndImplement : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.BaseFor2647, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly { /// /// Stability: Deprecated /// [System.Obsolete()] public ExtendAndImplement(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very very): base(_MakeDeputyProps(very)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Very very) { return new DeputyProps(new object?[]{very}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExtendAndImplement(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.Obsolete()] [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ExtendAndImplement(DeputyProps props): base(props) { } /// Say hello! [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "localMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string LocalMethod() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2689/Methods/MyClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2689.Methods { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2689.Methods.MyClass), fullyQualifiedName: "jsii-calc.module2689.methods.MyClass")] public class MyClass : DeputyBase { public MyClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(DeputyProps props): base(props) { } [JsiiMethod(name: "bar", parametersJson: "[{\\"name\\":\\"_bar\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}}]")] public virtual void Bar(System.Collections.Generic.IDictionary bar) { InvokeInstanceVoidMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{bar}); } [JsiiMethod(name: "foo", parametersJson: "[{\\"name\\":\\"_values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}}]")] public virtual void Foo(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] values) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[])}, new object[]{values}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2689/Props/MyClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2689.Props { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2689.Props.MyClass), fullyQualifiedName: "jsii-calc.module2689.props.MyClass")] public class MyClass : DeputyBase { public MyClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(DeputyProps props): base(props) { } [JsiiProperty(name: "bar", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary Bar { get => GetInstanceProperty>()!; } [JsiiProperty(name: "foo", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] Foo { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2689/Retval/MyClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2689.Retval { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2689.Retval.MyClass), fullyQualifiedName: "jsii-calc.module2689.retval.MyClass")] public class MyClass : DeputyBase { public MyClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(DeputyProps props): base(props) { } [JsiiMethod(name: "bar", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}}")] public virtual System.Collections.Generic.IDictionary Bar() { return InvokeInstanceMethod>(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "foo", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] Foo() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2689/Structs/IMyStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2689.Structs { [JsiiInterface(nativeType: typeof(IMyStruct), fullyQualifiedName: "jsii-calc.module2689.structs.MyStruct")] public interface IMyStruct { [JsiiProperty(name: "baseMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}")] System.Collections.Generic.IDictionary BaseMap { get; } [JsiiProperty(name: "numbers", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}")] Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] Numbers { get; } [JsiiTypeProxy(nativeType: typeof(IMyStruct), fullyQualifiedName: "jsii-calc.module2689.structs.MyStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2689.Structs.IMyStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "baseMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary BaseMap { get => GetInstanceProperty>()!; } [JsiiProperty(name: "numbers", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] Numbers { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2689/Structs/MyStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2689.Structs { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.module2689.structs.MyStruct")] public class MyStruct : Amazon.JSII.Tests.CalculatorNamespace.Module2689.Structs.IMyStruct { [JsiiProperty(name: "baseMap", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-base.BaseProps\\"},\\"kind\\":\\"map\\"}}")] public System.Collections.Generic.IDictionary BaseMap { get; set; } [JsiiProperty(name: "numbers", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},\\"kind\\":\\"array\\"}}")] public Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number[] Numbers { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule1/Bar.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule1 { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.module2692.submodule1.Bar")] public class Bar : Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule1.IBar { [JsiiProperty(name: "bar1", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar1 { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule1/IBar.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule1 { [JsiiInterface(nativeType: typeof(IBar), fullyQualifiedName: "jsii-calc.module2692.submodule1.Bar")] public interface IBar { [JsiiProperty(name: "bar1", typeJson: "{\\"primitive\\":\\"string\\"}")] string Bar1 { get; } [JsiiTypeProxy(nativeType: typeof(IBar), fullyQualifiedName: "jsii-calc.module2692.submodule1.Bar")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule1.IBar { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bar1", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar1 { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule2/Bar.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2 { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.module2692.submodule2.Bar")] public class Bar : Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2.IBar { [JsiiProperty(name: "bar2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar2 { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule2/Foo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2 { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.module2692.submodule2.Foo")] public class Foo : Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2.IFoo { [JsiiProperty(name: "foo2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo2 { get; set; } [JsiiProperty(name: "bar2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar2 { get; set; } [JsiiProperty(name: "bar1", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar1 { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule2/IBar.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2 { [JsiiInterface(nativeType: typeof(IBar), fullyQualifiedName: "jsii-calc.module2692.submodule2.Bar")] public interface IBar { [JsiiProperty(name: "bar2", typeJson: "{\\"primitive\\":\\"string\\"}")] string Bar2 { get; } [JsiiTypeProxy(nativeType: typeof(IBar), fullyQualifiedName: "jsii-calc.module2692.submodule2.Bar")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2.IBar { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bar2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar2 { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2692/Submodule2/IFoo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2 { [JsiiInterface(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2692.submodule2.Foo")] public interface IFoo : Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2.IBar, Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule1.IBar { [JsiiProperty(name: "foo2", typeJson: "{\\"primitive\\":\\"string\\"}")] string Foo2 { get; } [JsiiTypeProxy(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2692.submodule2.Foo")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2692.Submodule2.IFoo { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo2 { get => GetInstanceProperty()!; } [JsiiProperty(name: "bar2", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar2 { get => GetInstanceProperty()!; } [JsiiProperty(name: "bar1", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Bar1 { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2700/Base.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2700 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2700.Base), fullyQualifiedName: "jsii-calc.module2700.Base")] public class Base : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2700.IFoo { public Base(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Base(DeputyProps props): base(props) { } [JsiiMethod(name: "bar", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Bar() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "baz", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Baz { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2700/Derived.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2700 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2700.Derived), fullyQualifiedName: "jsii-calc.module2700.Derived")] public class Derived : Amazon.JSII.Tests.CalculatorNamespace.Module2700.Base, Amazon.JSII.Tests.CalculatorNamespace.Module2700.IFoo { public Derived(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Derived(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Derived(DeputyProps props): base(props) { } [JsiiMethod(name: "zoo", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Zoo() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2700/IFoo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2700 { [JsiiInterface(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2700.IFoo")] public interface IFoo { [JsiiProperty(name: "baz", typeJson: "{\\"primitive\\":\\"number\\"}")] double Baz { get; } [JsiiMethod(name: "bar", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] string Bar(); [JsiiTypeProxy(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2700.IFoo")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2700.IFoo { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "baz", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Baz { get => GetInstanceProperty()!; } [JsiiMethod(name: "bar", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public string Bar() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Baz.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Baz), fullyQualifiedName: "jsii-calc.module2702.Baz")] public class Baz : Amazon.JSII.Tests.CalculatorNamespace.Module2702.Class3, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IBaz { public Baz(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Baz(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Baz(DeputyProps props): base(props) { } [JsiiMethod(name: "bazMethod")] public virtual void BazMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Class1.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Class1), fullyQualifiedName: "jsii-calc.module2702.Class1")] public class Class1 : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base { public Class1(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class1(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class1(DeputyProps props): base(props) { } [JsiiMethod(name: "base")] public virtual void Base() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Class2.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Class2), fullyQualifiedName: "jsii-calc.module2702.Class2")] public class Class2 : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base { public Class2(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class2(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class2(DeputyProps props): base(props) { } [JsiiProperty(name: "base", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Base { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Class3.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Class3), fullyQualifiedName: "jsii-calc.module2702.Class3")] public class Class3 : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { public Class3(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class3(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Class3(DeputyProps props): base(props) { } [JsiiMethod(name: "bar")] public virtual void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public virtual void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "iBaseInterface")] public virtual void IBaseInterface() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Construct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Construct), fullyQualifiedName: "jsii-calc.module2702.Construct")] public class Construct : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IConstruct { public Construct(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Construct(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Construct(DeputyProps props): base(props) { } [JsiiMethod(name: "constructMethod")] public virtual void ConstructMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/IBaz.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiInterface(nativeType: typeof(IBaz), fullyQualifiedName: "jsii-calc.module2702.IBaz")] public interface IBaz : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { [JsiiMethod(name: "bazMethod")] void BazMethod(); [JsiiTypeProxy(nativeType: typeof(IBaz), fullyQualifiedName: "jsii-calc.module2702.IBaz")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IBaz { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "bazMethod")] public void BazMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "bar")] public void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/IConstruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiInterface(nativeType: typeof(IConstruct), fullyQualifiedName: "jsii-calc.module2702.IConstruct")] public interface IConstruct { [JsiiMethod(name: "constructMethod")] void ConstructMethod(); [JsiiTypeProxy(nativeType: typeof(IConstruct), fullyQualifiedName: "jsii-calc.module2702.IConstruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IConstruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "constructMethod")] public void ConstructMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/IFoo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiInterface(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2702.IFoo")] public interface IFoo : Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.IBaseInterface { [JsiiProperty(name: "iBaseInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] string IBaseInterface { get; } [JsiiTypeProxy(nativeType: typeof(IFoo), fullyQualifiedName: "jsii-calc.module2702.IFoo")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IFoo { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "iBaseInterface", typeJson: "{\\"primitive\\":\\"string\\"}")] public string IBaseInterface { get => GetInstanceProperty()!; } [JsiiMethod(name: "bar")] public void Bar() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "foo")] public void Foo() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/IResource.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiInterface(nativeType: typeof(IResource), fullyQualifiedName: "jsii-calc.module2702.IResource")] public interface IResource : Amazon.JSII.Tests.CalculatorNamespace.Module2702.IConstruct { [JsiiMethod(name: "resourceMethod")] void ResourceMethod(); [JsiiTypeProxy(nativeType: typeof(IResource), fullyQualifiedName: "jsii-calc.module2702.IResource")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IResource { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "resourceMethod")] public void ResourceMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "constructMethod")] public void ConstructMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/IVpc.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiInterface(nativeType: typeof(IVpc), fullyQualifiedName: "jsii-calc.module2702.IVpc")] public interface IVpc : Amazon.JSII.Tests.CalculatorNamespace.Module2702.IResource { [JsiiMethod(name: "vpcMethod")] void VpcMethod(); [JsiiTypeProxy(nativeType: typeof(IVpc), fullyQualifiedName: "jsii-calc.module2702.IVpc")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IVpc { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "vpcMethod")] public void VpcMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "resourceMethod")] public void ResourceMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "constructMethod")] public void ConstructMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Resource.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Resource), fullyQualifiedName: "jsii-calc.module2702.Resource")] public abstract class Resource : Amazon.JSII.Tests.CalculatorNamespace.Module2702.Construct, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IResource { protected Resource(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Resource(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Resource(DeputyProps props): base(props) { } [JsiiMethod(name: "resourceMethod")] public virtual void ResourceMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Resource), fullyQualifiedName: "jsii-calc.module2702.Resource")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Module2702.Resource { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "constructMethod")] public override void ConstructMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Module2702/Vpc.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Module2702 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Module2702.Vpc), fullyQualifiedName: "jsii-calc.module2702.Vpc")] public class Vpc : Amazon.JSII.Tests.CalculatorNamespace.Module2702.Resource, Amazon.JSII.Tests.CalculatorNamespace.Module2702.IVpc { public Vpc(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Vpc(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Vpc(DeputyProps props): base(props) { } [JsiiMethod(name: "vpcMethod")] public virtual void VpcMethod() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "*" binary operation. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply), fullyQualifiedName: "jsii-calc.Multiply", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"Left-hand side operand.\\"},\\"name\\":\\"lhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"Right-hand side operand.\\"},\\"name\\":\\"rhs\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Multiply : Amazon.JSII.Tests.CalculatorNamespace.BinaryOperation, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier, Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator { /// Creates a BinaryOperation. /// Left-hand side operand. /// Right-hand side operand. public Multiply(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs): base(_MakeDeputyProps(lhs, rhs)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue lhs, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue rhs) { return new DeputyProps(new object?[]{lhs, rhs}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Multiply(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Multiply(DeputyProps props): base(props) { } /// Say farewell. [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Farewell() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Say goodbye. [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Goodbye() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Returns another random number. [JsiiMethod(name: "next", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double Next() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// String representation of the value. [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// The value. [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public override double Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NamespaceDoc.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// ///

jsii Calculator

/// /// This library is used to demonstrate and test the features of JSII /// ///

How to use running sum API:

/// /// First, create a calculator: /// /// /// /// Then call some operations: /// /// /// ///

Code Samples

/// /// ///
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class NamespaceDoc { } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// The negation operation ("-value"). [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Negate), fullyQualifiedName: "jsii-calc.Negate", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Negate : Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation, Amazon.JSII.Tests.CalculatorNamespace.IFriendlier { public Negate(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand): base(_MakeDeputyProps(operand)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand) { return new DeputyProps(new object?[]{operand}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Negate(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Negate(DeputyProps props): base(props) { } /// Say farewell. [JsiiMethod(name: "farewell", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Farewell() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Say goodbye. [JsiiMethod(name: "goodbye", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Goodbye() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Say hello! [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// String representation of the value. [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// The value. [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] public override double Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedClassInstance.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.NestedClassInstance), fullyQualifiedName: "jsii-calc.NestedClassInstance")] public class NestedClassInstance : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestedClassInstance(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NestedClassInstance(DeputyProps props): base(props) { } [JsiiMethod(name: "makeInstance", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.NestingClass.NestedClass\\"}}")] public static Amazon.JSII.Tests.CustomSubmoduleName.NestingClass.NestedClass MakeInstance() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.NestedClassInstance), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.NestedStruct")] public class NestedStruct : Amazon.JSII.Tests.CalculatorNamespace.INestedStruct { /// When provided, must be > 0. [JsiiProperty(name: "numberProp", typeJson: "{\\"primitive\\":\\"number\\"}")] public double NumberProp { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Test fixture to verify that jsii modules can use the node standard library. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.NodeStandardLibrary), fullyQualifiedName: "jsii-calc.NodeStandardLibrary")] public class NodeStandardLibrary : DeputyBase { public NodeStandardLibrary(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NodeStandardLibrary(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NodeStandardLibrary(DeputyProps props): base(props) { } /// Uses node.js "crypto" module to calculate sha256 of a string. /// "6a2da20943931e9834fc12cfe5bb47bbd9ae43489a30726962b576f4e3993e50" [JsiiMethod(name: "cryptoSha256", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string CryptoSha256() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Reads a local resource file (resource.txt) asynchronously. /// "Hello, resource!" [JsiiMethod(name: "fsReadFile", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", isAsync: true)] public virtual string FsReadFile() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Sync version of fsReadFile. /// "Hello, resource! SYNC!" [JsiiMethod(name: "fsReadFileSync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string FsReadFileSync() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Returns the current os.platform() from the "os" node module. [JsiiProperty(name: "osPlatform", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string OsPlatform { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Nodirect/Sub1/TypeFromSub1.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Nodirect.Sub1 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Nodirect.Sub1.TypeFromSub1), fullyQualifiedName: "jsii-calc.nodirect.sub1.TypeFromSub1")] public class TypeFromSub1 : DeputyBase { public TypeFromSub1(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TypeFromSub1(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TypeFromSub1(DeputyProps props): base(props) { } [JsiiMethod(name: "sub1", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Sub1() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Nodirect/Sub2/TypeFromSub2.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Nodirect.Sub2 { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Nodirect.Sub2.TypeFromSub2), fullyQualifiedName: "jsii-calc.nodirect.sub2.TypeFromSub2")] public class TypeFromSub2 : DeputyBase { public TypeFromSub2(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TypeFromSub2(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TypeFromSub2(DeputyProps props): base(props) { } [JsiiMethod(name: "sub2", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string Sub2() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefined.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// jsii#282, aws-cdk#157: null should be treated as "undefined". [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.NullShouldBeTreatedAsUndefined), fullyQualifiedName: "jsii-calc.NullShouldBeTreatedAsUndefined", parametersJson: "[{\\"name\\":\\"_param1\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"optional\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public class NullShouldBeTreatedAsUndefined : DeputyBase { public NullShouldBeTreatedAsUndefined(string param1, object? optional = null): base(_MakeDeputyProps(param1, optional)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string param1, object? optional = null) { return new DeputyProps(new object?[]{param1, optional}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NullShouldBeTreatedAsUndefined(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NullShouldBeTreatedAsUndefined(DeputyProps props): base(props) { } [JsiiMethod(name: "giveMeUndefined", parametersJson: "[{\\"name\\":\\"value\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public virtual void GiveMeUndefined(object? @value = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object?[]{@value}); } [JsiiMethod(name: "giveMeUndefinedInsideAnObject", parametersJson: "[{\\"name\\":\\"input\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.NullShouldBeTreatedAsUndefinedData\\"}}]")] public virtual void GiveMeUndefinedInsideAnObject(Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData input) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData)}, new object[]{input}); } [JsiiMethod(name: "verifyPropertyIsUndefined")] public virtual void VerifyPropertyIsUndefined() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiOptional] [JsiiProperty(name: "changeMeToUndefined", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? ChangeMeToUndefined { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedData.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.NullShouldBeTreatedAsUndefinedData")] public class NullShouldBeTreatedAsUndefinedData : Amazon.JSII.Tests.CalculatorNamespace.INullShouldBeTreatedAsUndefinedData { [JsiiProperty(name: "arrayWithThreeElementsAndUndefinedAsSecondArgument", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument { get; set; } [JsiiOptional] [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\\"primitive\\":\\"any\\"}", isOptional: true)] public object? ThisShouldBeUndefined { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This allows us to test that a reference can be stored for objects that implement interfaces. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.NumberGenerator), fullyQualifiedName: "jsii-calc.NumberGenerator", parametersJson: "[{\\"name\\":\\"generator\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IRandomNumberGenerator\\"}}]")] public class NumberGenerator : DeputyBase { public NumberGenerator(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator generator): base(_MakeDeputyProps(generator)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator generator) { return new DeputyProps(new object?[]{generator}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NumberGenerator(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected NumberGenerator(DeputyProps props): base(props) { } [JsiiMethod(name: "isSameGenerator", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"gen\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IRandomNumberGenerator\\"}}]")] public virtual bool IsSameGenerator(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator gen) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator)}, new object[]{gen})!; } [JsiiMethod(name: "nextTimes100", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double NextTimes100() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "generator", typeJson: "{\\"fqn\\":\\"jsii-calc.IRandomNumberGenerator\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IRandomNumberGenerator Generator { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verify that object references can be passed inside collections. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ObjectRefsInCollections), fullyQualifiedName: "jsii-calc.ObjectRefsInCollections")] public class ObjectRefsInCollections : DeputyBase { public ObjectRefsInCollections(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectRefsInCollections(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectRefsInCollections(DeputyProps props): base(props) { } /// Returns the sum of all values. [JsiiMethod(name: "sumFromArray", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}}]")] public virtual double SumFromArray(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] values) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[])}, new object[]{values})!; } /// Returns the sum of all values in a map. [JsiiMethod(name: "sumFromMap", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"map\\"}}}]")] public virtual double SumFromMap(System.Collections.Generic.IDictionary values) { return InvokeInstanceMethod(new System.Type[]{typeof(System.Collections.Generic.IDictionary)}, new object[]{values})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectWithPropertyProvider.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ObjectWithPropertyProvider), fullyQualifiedName: "jsii-calc.ObjectWithPropertyProvider")] public class ObjectWithPropertyProvider : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectWithPropertyProvider(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ObjectWithPropertyProvider(DeputyProps props): base(props) { } [JsiiMethod(name: "provide", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IObjectWithProperty\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IObjectWithProperty Provide() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.ObjectWithPropertyProvider), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Old.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// (deprecated) Old class. /// /// Stability: Deprecated /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Old), fullyQualifiedName: "jsii-calc.Old")] [System.Obsolete("Use the new class or the old class whatever you want because whatever you like is always the best")] public class Old : DeputyBase { public Old(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Old(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Old(DeputyProps props): base(props) { } /// (deprecated) Doo wop that thing. /// /// Stability: Deprecated /// [JsiiMethod(name: "doAThing")] [System.Obsolete()] public virtual void DoAThing() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Onlystatic/OnlyStaticMethods.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Onlystatic { /// Test for https://github.com/aws/jsii/issues/2617. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Onlystatic.OnlyStaticMethods), fullyQualifiedName: "jsii-calc.onlystatic.OnlyStaticMethods")] public class OnlyStaticMethods : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OnlyStaticMethods(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OnlyStaticMethods(DeputyProps props): base(props) { } [JsiiMethod(name: "staticMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public static string StaticMethod() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Onlystatic.OnlyStaticMethods), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalArgumentInvoker.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.OptionalArgumentInvoker), fullyQualifiedName: "jsii-calc.OptionalArgumentInvoker", parametersJson: "[{\\"name\\":\\"delegate\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IInterfaceWithOptionalMethodArguments\\"}}]")] public class OptionalArgumentInvoker : DeputyBase { public OptionalArgumentInvoker(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithOptionalMethodArguments @delegate): base(_MakeDeputyProps(@delegate)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithOptionalMethodArguments @delegate) { return new DeputyProps(new object?[]{@delegate}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalArgumentInvoker(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalArgumentInvoker(DeputyProps props): base(props) { } [JsiiMethod(name: "invokeWithOptional")] public virtual void InvokeWithOptional() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "invokeWithoutOptional")] public virtual void InvokeWithoutOptional() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalConstructorArgument.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.OptionalConstructorArgument), fullyQualifiedName: "jsii-calc.OptionalConstructorArgument", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"arg2\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg3\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"date\\"}}]")] public class OptionalConstructorArgument : DeputyBase { public OptionalConstructorArgument(double arg1, string arg2, System.DateTime? arg3 = null): base(_MakeDeputyProps(arg1, arg2, arg3)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double arg1, string arg2, System.DateTime? arg3 = null) { return new DeputyProps(new object?[]{arg1, arg2, arg3}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalConstructorArgument(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalConstructorArgument(DeputyProps props): base(props) { } [JsiiProperty(name: "arg1", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Arg1 { get => GetInstanceProperty()!; } [JsiiProperty(name: "arg2", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Arg2 { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "arg3", typeJson: "{\\"primitive\\":\\"date\\"}", isOptional: true)] public virtual System.DateTime? Arg3 { get => GetInstanceProperty(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiByValue(fqn: "jsii-calc.OptionalStruct")] public class OptionalStruct : Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct { [JsiiOptional] [JsiiProperty(name: "field", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Field { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.OptionalStructConsumer), fullyQualifiedName: "jsii-calc.OptionalStructConsumer", parametersJson: "[{\\"name\\":\\"optionalStruct\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.OptionalStruct\\"}}]")] public class OptionalStructConsumer : DeputyBase { public OptionalStructConsumer(Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct? optionalStruct = null): base(_MakeDeputyProps(optionalStruct)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct? optionalStruct = null) { return new DeputyProps(new object?[]{optionalStruct}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalStructConsumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OptionalStructConsumer(DeputyProps props): base(props) { } [JsiiProperty(name: "parameterWasUndefined", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool ParameterWasUndefined { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "fieldValue", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? FieldValue { get => GetInstanceProperty(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// /// See: https://github.com/aws/jsii/issues/903 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.OverridableProtectedMember), fullyQualifiedName: "jsii-calc.OverridableProtectedMember")] public class OverridableProtectedMember : DeputyBase { public OverridableProtectedMember(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverridableProtectedMember(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverridableProtectedMember(DeputyProps props): base(props) { } [JsiiMethod(name: "overrideMe", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] protected virtual string OverrideMe() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "switchModes")] public virtual void SwitchModes() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "valueFromProtected", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string ValueFromProtected() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "overrideReadOnly", typeJson: "{\\"primitive\\":\\"string\\"}")] protected virtual string OverrideReadOnly { get => GetInstanceProperty()!; } [JsiiProperty(name: "overrideReadWrite", typeJson: "{\\"primitive\\":\\"string\\"}")] protected virtual string OverrideReadWrite { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.OverrideReturnsObject), fullyQualifiedName: "jsii-calc.OverrideReturnsObject")] public class OverrideReturnsObject : DeputyBase { public OverrideReturnsObject(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverrideReturnsObject(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OverrideReturnsObject(DeputyProps props): base(props) { } [JsiiMethod(name: "test", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IReturnsNumber\\"}}]")] public virtual double Test(Amazon.JSII.Tests.CalculatorNamespace.IReturnsNumber obj) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IReturnsNumber)}, new object[]{obj})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParamShadowsBuiltins.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Validate that parameters named "str" or "builtins" do not shadow the actual type names in Python. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ParamShadowsBuiltins), fullyQualifiedName: "jsii-calc.ParamShadowsBuiltins", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"should be set to something that is NOT a valid expression in Python (e.g: test\${NOPE}testtest).\\"},\\"name\\":\\"builtins\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"docs\\":{\\"summary\\":\\"should be set to something that is NOT a valid expression in Python (e.g: test\${NOPE}testtest).\\"},\\"name\\":\\"str\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"docs\\":{\\"summary\\":\\"should be set to valid values.\\"},\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ParamShadowsBuiltinsProps\\"}}]")] public class ParamShadowsBuiltins : DeputyBase { /// should be set to something that is NOT a valid expression in Python (e.g: "\${NOPE}""). /// should be set to something that is NOT a valid expression in Python (e.g: "\${NOPE}""). /// should be set to valid values. public ParamShadowsBuiltins(string builtins, string str, Amazon.JSII.Tests.CalculatorNamespace.IParamShadowsBuiltinsProps props): base(_MakeDeputyProps(builtins, str, props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string builtins, string str, Amazon.JSII.Tests.CalculatorNamespace.IParamShadowsBuiltinsProps props) { return new DeputyProps(new object?[]{builtins, str, props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ParamShadowsBuiltins(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ParamShadowsBuiltins(DeputyProps props): base(props) { } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParamShadowsBuiltinsProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.ParamShadowsBuiltinsProps")] public class ParamShadowsBuiltinsProps : Amazon.JSII.Tests.CalculatorNamespace.IParamShadowsBuiltinsProps { [JsiiProperty(name: "booleanProperty", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool BooleanProperty { get; set; } [JsiiProperty(name: "stringProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProperty { get; set; } [JsiiProperty(name: "structProperty", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.IStructA StructProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParamShadowsScope.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Validate that namespaces being shadowed by local variables does not cause type checking issues. /// /// See: https://github.com/aws/aws-cdk/issues/22975 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ParamShadowsScope), fullyQualifiedName: "jsii-calc.ParamShadowsScope")] public class ParamShadowsScope : DeputyBase { public ParamShadowsScope(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ParamShadowsScope(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ParamShadowsScope(DeputyProps props): base(props) { } [JsiiMethod(name: "useScope", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}}", parametersJson: "[{\\"name\\":\\"scope\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}}]")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number UseScope(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number scope) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number)}, new object[]{scope})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// https://github.com/aws/jsii/issues/982. [JsiiByValue(fqn: "jsii-calc.ParentStruct982")] public class ParentStruct982 : Amazon.JSII.Tests.CalculatorNamespace.IParentStruct982 { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer), fullyQualifiedName: "jsii-calc.PartiallyInitializedThisConsumer")] public abstract class PartiallyInitializedThisConsumer : DeputyBase { protected PartiallyInitializedThisConsumer(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PartiallyInitializedThisConsumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PartiallyInitializedThisConsumer(DeputyProps props): base(props) { } [JsiiMethod(name: "consumePartiallyInitializedThis", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ConstructorPassesThisOut\\"}},{\\"name\\":\\"dt\\",\\"type\\":{\\"primitive\\":\\"date\\"}},{\\"name\\":\\"ev\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}]")] public abstract string ConsumePartiallyInitializedThis(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut obj, System.DateTime dt, Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum ev); [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer), fullyQualifiedName: "jsii-calc.PartiallyInitializedThisConsumer")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.PartiallyInitializedThisConsumer { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "consumePartiallyInitializedThis", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.ConstructorPassesThisOut\\"}},{\\"name\\":\\"dt\\",\\"type\\":{\\"primitive\\":\\"date\\"}},{\\"name\\":\\"ev\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}}]")] public override string ConsumePartiallyInitializedThis(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut obj, System.DateTime dt, Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum ev) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.ConstructorPassesThisOut), typeof(System.DateTime), typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum)}, new object[]{obj, dt, ev})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Polymorphism), fullyQualifiedName: "jsii-calc.Polymorphism")] public class Polymorphism : DeputyBase { public Polymorphism(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Polymorphism(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Polymorphism(DeputyProps props): base(props) { } [JsiiMethod(name: "sayHello", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"friendly\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}}]")] public virtual string SayHello(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly friendly) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly)}, new object[]{friendly})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// The power operation. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Power), fullyQualifiedName: "jsii-calc.Power", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The base of the power.\\"},\\"name\\":\\"base\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}},{\\"docs\\":{\\"summary\\":\\"The number of times to multiply.\\"},\\"name\\":\\"pow\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public class Power : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { /// Creates a Power operation. /// The base of the power. /// The number of times to multiply. public Power(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue @base, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue pow): base(_MakeDeputyProps(@base, pow)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue @base, Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue pow) { return new DeputyProps(new object?[]{@base, pow}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Power(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Power(DeputyProps props): base(props) { } /// The base of the power. [JsiiProperty(name: "base", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Base { get => GetInstanceProperty()!; } /// The expression that this operation consists of. /// /// Must be implemented by derived classes. /// [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get => GetInstanceProperty()!; } /// The number of times to multiply. [JsiiProperty(name: "pow", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Pow { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PromiseNothing.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PromiseNothing), fullyQualifiedName: "jsii-calc.PromiseNothing")] public class PromiseNothing : DeputyBase { public PromiseNothing(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PromiseNothing(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PromiseNothing(DeputyProps props): base(props) { } [JsiiMethod(name: "promiseIt", isAsync: true)] public static void PromiseIt() { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.PromiseNothing), new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "instancePromiseIt", isAsync: true)] public virtual void InstancePromiseIt() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PropertyNamedProperty.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Reproduction for https://github.com/aws/jsii/issues/1113 Where a method or property named "property" would result in impossible to load Python code. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PropertyNamedProperty), fullyQualifiedName: "jsii-calc.PropertyNamedProperty")] public class PropertyNamedProperty : DeputyBase { public PropertyNamedProperty(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PropertyNamedProperty(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PropertyNamedProperty(DeputyProps props): base(props) { } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Property { get => GetInstanceProperty()!; } [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool YetAnoterOne { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PublicClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PublicClass), fullyQualifiedName: "jsii-calc.PublicClass")] public class PublicClass : DeputyBase { public PublicClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PublicClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PublicClass(DeputyProps props): base(props) { } [JsiiMethod(name: "hello")] public virtual void Hello() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonReservedWords.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PythonReservedWords), fullyQualifiedName: "jsii-calc.PythonReservedWords")] public class PythonReservedWords : DeputyBase { public PythonReservedWords(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PythonReservedWords(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected PythonReservedWords(DeputyProps props): base(props) { } [JsiiMethod(name: "and")] public virtual void And() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "as")] public virtual void As() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "assert")] public virtual void Assert() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "async")] public virtual void Async() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "await")] public virtual void Await() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "break")] public virtual void Break() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "class")] public virtual void Class() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "continue")] public virtual void Continue() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "def")] public virtual void Def() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "del")] public virtual void Del() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "elif")] public virtual void Elif() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "else")] public virtual void Else() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "except")] public virtual void Except() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "finally")] public virtual void Finally() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "for")] public virtual void For() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "from")] public virtual void From() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "global")] public virtual void Global() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "if")] public virtual void If() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "import")] public virtual void Import() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "in")] public virtual void In() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "is")] public virtual void Is() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "lambda")] public virtual void Lambda() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "nonlocal")] public virtual void Nonlocal() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "not")] public virtual void Not() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "or")] public virtual void Or() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "pass")] public virtual void Pass() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "raise")] public virtual void Raise() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "return")] public virtual void Return() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "try")] public virtual void Try() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "while")] public virtual void While() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "with")] public virtual void With() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "yield")] public virtual void Yield() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/ClassWithSelf.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.ClassWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.ClassWithSelf", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class ClassWithSelf : DeputyBase { public ClassWithSelf(string self): base(_MakeDeputyProps(self)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string self) { return new DeputyProps(new object?[]{self}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithSelf(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithSelf(DeputyProps props): base(props) { } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual string Method(double self) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{self})!; } [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Self { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/ClassWithSelfKwarg.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.ClassWithSelfKwarg), fullyQualifiedName: "jsii-calc.PythonSelf.ClassWithSelfKwarg", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.PythonSelf.StructWithSelf\\"}}]")] public class ClassWithSelfKwarg : DeputyBase { public ClassWithSelfKwarg(Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf props): base(_MakeDeputyProps(props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf props) { return new DeputyProps(new object?[]{props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithSelfKwarg(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ClassWithSelfKwarg(DeputyProps props): base(props) { } [JsiiProperty(name: "props", typeJson: "{\\"fqn\\":\\"jsii-calc.PythonSelf.StructWithSelf\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf Props { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/IInterfaceWithSelf.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { [JsiiInterface(nativeType: typeof(IInterfaceWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.IInterfaceWithSelf")] public interface IInterfaceWithSelf { [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] string Method(double self); [JsiiTypeProxy(nativeType: typeof(IInterfaceWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.IInterfaceWithSelf")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IInterfaceWithSelf { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"self\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public string Method(double self) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{self})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/IStructWithSelf.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { [JsiiInterface(nativeType: typeof(IStructWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.StructWithSelf")] public interface IStructWithSelf { [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] string Self { get; } [JsiiTypeProxy(nativeType: typeof(IStructWithSelf), fullyQualifiedName: "jsii-calc.PythonSelf.StructWithSelf")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Self { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonSelf/StructWithSelf.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.PythonSelf { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.PythonSelf.StructWithSelf")] public class StructWithSelf : Amazon.JSII.Tests.CalculatorNamespace.PythonSelf.IStructWithSelf { [JsiiProperty(name: "self", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Self { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// See awslabs/jsii#138. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ReferenceEnumFromScopedPackage), fullyQualifiedName: "jsii-calc.ReferenceEnumFromScopedPackage")] public class ReferenceEnumFromScopedPackage : DeputyBase { public ReferenceEnumFromScopedPackage(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReferenceEnumFromScopedPackage(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReferenceEnumFromScopedPackage(DeputyProps props): base(props) { } [JsiiMethod(name: "loadFoo", returnsJson: "{\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.EnumFromScopedModule\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule? LoadFoo() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "saveFoo", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.EnumFromScopedModule\\"}}]")] public virtual void SaveFoo(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule)}, new object[]{@value}); } [JsiiOptional] [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.EnumFromScopedModule\\"}", isOptional: true)] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule? Foo { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsPrivateImplementationOfInterface.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Helps ensure the JSII kernel & runtime cooperate correctly when an un-exported instance of a class is returned with a declared type that is an exported interface, and the instance inherits from an exported class. /// an instance of an un-exported class that extends \`ExportedBaseClass\`, declared as \`IPrivatelyImplemented\`. /// /// See: https://github.com/aws/jsii/issues/320 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.ReturnsPrivateImplementationOfInterface), fullyQualifiedName: "jsii-calc.ReturnsPrivateImplementationOfInterface")] public class ReturnsPrivateImplementationOfInterface : DeputyBase { public ReturnsPrivateImplementationOfInterface(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReturnsPrivateImplementationOfInterface(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReturnsPrivateImplementationOfInterface(DeputyProps props): base(props) { } [JsiiProperty(name: "privateImplementation", typeJson: "{\\"fqn\\":\\"jsii-calc.IPrivatelyImplemented\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IPrivatelyImplemented PrivateImplementation { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// This is here to check that we can pass a nested struct into a kwargs by specifying it as an in-line dictionary. /// /// This is cheating with the (current) declared types, but this is the "more /// idiomatic" way for Pythonists. /// [JsiiByValue(fqn: "jsii-calc.RootStruct")] public class RootStruct : Amazon.JSII.Tests.CalculatorNamespace.IRootStruct { /// May not be empty. [JsiiProperty(name: "stringProp", typeJson: "{\\"primitive\\":\\"string\\"}")] public string StringProp { get; set; } [JsiiOptional] [JsiiProperty(name: "nestedStruct", typeJson: "{\\"fqn\\":\\"jsii-calc.NestedStruct\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.RootStructValidator), fullyQualifiedName: "jsii-calc.RootStructValidator")] public class RootStructValidator : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected RootStructValidator(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected RootStructValidator(DeputyProps props): base(props) { } [JsiiMethod(name: "validate", parametersJson: "[{\\"name\\":\\"struct\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.RootStruct\\"}}]")] public static void Validate(Amazon.JSII.Tests.CalculatorNamespace.IRootStruct @struct) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.RootStructValidator), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IRootStruct)}, new object[]{@struct}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.RuntimeTypeChecking), fullyQualifiedName: "jsii-calc.RuntimeTypeChecking")] public class RuntimeTypeChecking : DeputyBase { public RuntimeTypeChecking(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeTypeChecking(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected RuntimeTypeChecking(DeputyProps props): base(props) { } [JsiiMethod(name: "methodWithDefaultedArguments", parametersJson: "[{\\"name\\":\\"arg1\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"arg2\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg3\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"date\\"}}]")] public virtual void MethodWithDefaultedArguments(double? arg1 = null, string? arg2 = null, System.DateTime? arg3 = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double), typeof(string), typeof(System.DateTime)}, new object?[]{arg1, arg2, arg3}); } [JsiiMethod(name: "methodWithOptionalAnyArgument", parametersJson: "[{\\"name\\":\\"arg\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"any\\"}}]")] public virtual void MethodWithOptionalAnyArgument(object? arg = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object?[]{arg}); } /// Used to verify verification of number of method arguments. [JsiiMethod(name: "methodWithOptionalArguments", parametersJson: "[{\\"name\\":\\"arg1\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"arg2\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"arg3\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"date\\"}}]")] public virtual void MethodWithOptionalArguments(double arg1, string arg2, System.DateTime? arg3 = null) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double), typeof(string), typeof(System.DateTime)}, new object?[]{arg1, arg2, arg3}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.SecondLevelStruct")] public class SecondLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct { /// It's long and required. [JsiiProperty(name: "deeperRequiredProp", typeJson: "{\\"primitive\\":\\"string\\"}")] public string DeeperRequiredProp { get; set; } /// It's long, but you'll almost never pass it. [JsiiOptional] [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? DeeperOptionalProp { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Test that a single instance can be returned under two different FQNs. /// /// JSII clients can instantiate 2 different strongly-typed wrappers for the same /// object. Unfortunately, this will break object equality, but if we didn't do /// this it would break runtime type checks in the JVM or CLR. /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SingleInstanceTwoTypes), fullyQualifiedName: "jsii-calc.SingleInstanceTwoTypes")] public class SingleInstanceTwoTypes : DeputyBase { public SingleInstanceTwoTypes(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingleInstanceTwoTypes(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingleInstanceTwoTypes(DeputyProps props): base(props) { } [JsiiMethod(name: "interface1", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.InbetweenClass\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.InbetweenClass Interface1() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "interface2", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IPublicInterface\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IPublicInterface Interface2() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonInt.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that singleton enums are handled correctly. /// /// https://github.com/aws/jsii/issues/231 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SingletonInt), fullyQualifiedName: "jsii-calc.SingletonInt")] public class SingletonInt : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingletonInt(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingletonInt(DeputyProps props): base(props) { } [JsiiMethod(name: "isSingletonInt", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual bool IsSingletonInt(double @value) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{@value})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonIntEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// A singleton integer. [JsiiEnum(nativeType: typeof(SingletonIntEnum), fullyQualifiedName: "jsii-calc.SingletonIntEnum")] public enum SingletonIntEnum { /// Elite! [JsiiEnumMember(name: "SINGLETON_INT")] SINGLETON_INT } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonString.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that singleton enums are handled correctly. /// /// https://github.com/aws/jsii/issues/231 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SingletonString), fullyQualifiedName: "jsii-calc.SingletonString")] public class SingletonString : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingletonString(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SingletonString(DeputyProps props): base(props) { } [JsiiMethod(name: "isSingletonString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual bool IsSingletonString(string @value) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{@value})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonStringEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// A singleton string. [JsiiEnum(nativeType: typeof(SingletonStringEnum), fullyQualifiedName: "jsii-calc.SingletonStringEnum")] public enum SingletonStringEnum { /// 1337. [JsiiEnumMember(name: "SINGLETON_STRING")] SINGLETON_STRING } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.SmellyStruct")] public class SmellyStruct : Amazon.JSII.Tests.CalculatorNamespace.ISmellyStruct { [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Property { get; set; } [JsiiProperty(name: "yetAnoterOne", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool YetAnoterOne { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SomeTypeJsii976), fullyQualifiedName: "jsii-calc.SomeTypeJsii976")] public class SomeTypeJsii976 : DeputyBase { public SomeTypeJsii976(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SomeTypeJsii976(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SomeTypeJsii976(DeputyProps props): base(props) { } [JsiiMethod(name: "returnAnonymous", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public static object ReturnAnonymous() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.SomeTypeJsii976), new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "returnReturn", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.IReturnJsii976\\"}}")] public static Amazon.JSII.Tests.CalculatorNamespace.IReturnJsii976 ReturnReturn() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.SomeTypeJsii976), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StableClass), fullyQualifiedName: "jsii-calc.StableClass", parametersJson: "[{\\"name\\":\\"readonlyString\\",\\"type\\":{\\"primitive\\":\\"string\\"}},{\\"name\\":\\"mutableNumber\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public class StableClass : DeputyBase { public StableClass(string readonlyString, double? mutableNumber = null): base(_MakeDeputyProps(readonlyString, mutableNumber)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string readonlyString, double? mutableNumber = null) { return new DeputyProps(new object?[]{readonlyString, mutableNumber}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StableClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StableClass(DeputyProps props): base(props) { } [JsiiMethod(name: "method")] public virtual void Method() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadonlyProperty { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "mutableProperty", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public virtual double? MutableProperty { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiEnum(nativeType: typeof(StableEnum), fullyQualifiedName: "jsii-calc.StableEnum")] public enum StableEnum { [JsiiEnumMember(name: "OPTION_A")] OPTION_A, [JsiiEnumMember(name: "OPTION_B")] OPTION_B } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.StableStruct")] public class StableStruct : Amazon.JSII.Tests.CalculatorNamespace.IStableStruct { [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public string ReadonlyProperty { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This is used to validate the ability to use \`this\` from within a static context. /// /// https://github.com/awslabs/aws-cdk/issues/2304 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), fullyQualifiedName: "jsii-calc.StaticContext")] public class StaticContext : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticContext(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticContext(DeputyProps props): base(props) { } [JsiiMethod(name: "canAccessStaticContext", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}")] public static bool CanAccessStaticContext() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "staticVariable", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public static bool StaticVariable { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext))!; set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticContext), value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticHelloChild.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild), fullyQualifiedName: "jsii-calc.StaticHelloChild")] public class StaticHelloChild : Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticHelloChild(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticHelloChild(DeputyProps props): base(props) { } [JsiiMethod(name: "method")] public static new void Method() { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild), new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"number\\"}")] public static new double Property { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloChild))!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticHelloParent.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Static methods that override parent class are technically overrides (the inheritance of statics is part of the ES6 specification), but certain other languages such as Java do not carry statics in the inheritance chain at all, so they cannot be overridden, only hidden. /// /// The difference is fairly minor (for typical use-cases, the end result is the /// same), however this has implications on what the generated code should look /// like. /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent), fullyQualifiedName: "jsii-calc.StaticHelloParent")] public class StaticHelloParent : DeputyBase { public StaticHelloParent(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticHelloParent(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StaticHelloParent(DeputyProps props): base(props) { } [JsiiMethod(name: "method")] public static void Method() { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent), new System.Type[]{}, new object[]{}); } [JsiiProperty(name: "property", typeJson: "{\\"primitive\\":\\"number\\"}")] public static double Property { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.StaticHelloParent))!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics), fullyQualifiedName: "jsii-calc.Statics", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class Statics : DeputyBase { public Statics(string @value): base(_MakeDeputyProps(@value)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string @value) { return new DeputyProps(new object?[]{@value}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Statics(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Statics(DeputyProps props): base(props) { } /// Jsdocs for static method. /// The name of the person to say hello to. [JsiiMethod(name: "staticMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"The name of the person to say hello to.\\"},\\"name\\":\\"name\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static string StaticMethod(string name) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics), new System.Type[]{typeof(string)}, new object[]{name})!; } [JsiiMethod(name: "justMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string JustMethod() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// Constants may also use all-caps. [JsiiProperty(name: "BAR", typeJson: "{\\"primitive\\":\\"number\\"}")] public static double BAR { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; [JsiiProperty(name: "ConstObj", typeJson: "{\\"fqn\\":\\"jsii-calc.DoubleTrouble\\"}")] public static Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble ConstObj { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; /// Jsdocs for static property. [JsiiProperty(name: "Foo", typeJson: "{\\"primitive\\":\\"string\\"}")] public static string Foo { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; /// Constants can also use camelCase. [JsiiProperty(name: "zooBar", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"map\\"}}")] public static System.Collections.Generic.IDictionary ZooBar { get; } = GetStaticProperty>(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; /// Jsdocs for static getter. /// /// Jsdocs for static setter. /// [JsiiProperty(name: "instance", typeJson: "{\\"fqn\\":\\"jsii-calc.Statics\\"}")] public static Amazon.JSII.Tests.CalculatorNamespace.Statics Instance { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics), value); } [JsiiProperty(name: "nonConstStatic", typeJson: "{\\"primitive\\":\\"number\\"}")] public static double NonConstStatic { get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics))!; set => SetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Statics), value); } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string Value { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiEnum(nativeType: typeof(StringEnum), fullyQualifiedName: "jsii-calc.StringEnum")] public enum StringEnum { [JsiiEnumMember(name: "A")] A, [JsiiEnumMember(name: "B")] B, [JsiiEnumMember(name: "C")] C } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StripInternal.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StripInternal), fullyQualifiedName: "jsii-calc.StripInternal")] public class StripInternal : DeputyBase { public StripInternal(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StripInternal(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StripInternal(DeputyProps props): base(props) { } [JsiiProperty(name: "youSeeMe", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string YouSeeMe { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// We can serialize and deserialize structs without silently ignoring optional fields. [JsiiByValue(fqn: "jsii-calc.StructA")] public class StructA : Amazon.JSII.Tests.CalculatorNamespace.IStructA { [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string RequiredString { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalNumber", typeJson: "{\\"primitive\\":\\"number\\"}", isOptional: true)] public double? OptionalNumber { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalString", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? OptionalString { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. [JsiiByValue(fqn: "jsii-calc.StructB")] public class StructB : Amazon.JSII.Tests.CalculatorNamespace.IStructB { [JsiiProperty(name: "requiredString", typeJson: "{\\"primitive\\":\\"string\\"}")] public string RequiredString { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalBoolean", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? OptionalBoolean { get; set; } [JsiiOptional] [JsiiProperty(name: "optionalStructA", typeJson: "{\\"fqn\\":\\"jsii-calc.StructA\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterType.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 /// Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. /// /// See: https://github.com/aws/aws-cdk/issues/4302 /// [JsiiByValue(fqn: "jsii-calc.StructParameterType")] public class StructParameterType : Amazon.JSII.Tests.CalculatorNamespace.IStructParameterType { [JsiiProperty(name: "scope", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Scope { get; set; } [JsiiOptional] [JsiiProperty(name: "props", typeJson: "{\\"primitive\\":\\"boolean\\"}", isOptional: true)] public bool? Props { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Just because we can. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StructPassing), fullyQualifiedName: "jsii-calc.StructPassing")] public class StructPassing : DeputyBase { public StructPassing(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StructPassing(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StructPassing(DeputyProps props): base(props) { } [JsiiMethod(name: "howManyVarArgsDidIPass", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"_positional\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"inputs\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.TopLevelStruct\\"},\\"variadic\\":true}]")] public static double HowManyVarArgsDidIPass(double positional, params Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct[] inputs) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructPassing), new System.Type[]{typeof(double), typeof(Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct[])}, new object[]{positional, inputs})!; } [JsiiMethod(name: "roundTrip", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.TopLevelStruct\\"}}", parametersJson: "[{\\"name\\":\\"_positional\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"name\\":\\"input\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.TopLevelStruct\\"}}]")] public static Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct RoundTrip(double positional, Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct input) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructPassing), new System.Type[]{typeof(double), typeof(Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct)}, new object[]{positional, input})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), fullyQualifiedName: "jsii-calc.StructUnionConsumer")] public class StructUnionConsumer : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StructUnionConsumer(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected StructUnionConsumer(DeputyProps props): base(props) { } [JsiiMethod(name: "isStructA", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"struct\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}]")] public static bool IsStructA(object @struct) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), new System.Type[]{typeof(object)}, new object[]{@struct})!; } [JsiiMethod(name: "isStructB", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"struct\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}]")] public static bool IsStructB(object @struct) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), new System.Type[]{typeof(object)}, new object[]{@struct})!; } [JsiiMethod(name: "provideStruct", returnsJson: "{\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}", parametersJson: "[{\\"name\\":\\"which\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static object ProvideStruct(string which) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), new System.Type[]{typeof(string)}, new object[]{which})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithCollectionOfUnionts.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.StructWithCollectionOfUnionts")] public class StructWithCollectionOfUnionts : Amazon.JSII.Tests.CalculatorNamespace.IStructWithCollectionOfUnionts { private System.Collections.Generic.IDictionary[] _unionProperty; [JsiiProperty(name: "unionProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"map\\"}},\\"kind\\":\\"array\\"}}")] public System.Collections.Generic.IDictionary[] UnionProperty { get => _unionProperty; set { _unionProperty = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.StructWithEnum")] public class StructWithEnum : Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum { /// An enum value. [JsiiProperty(name: "foo", typeJson: "{\\"fqn\\":\\"jsii-calc.StringEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.StringEnum Foo { get; set; } /// Optional enum value (of type integer). /// /// Default: AllTypesEnum.YOUR_ENUM_VALUE /// [JsiiOptional] [JsiiProperty(name: "bar", typeJson: "{\\"fqn\\":\\"jsii-calc.AllTypesEnum\\"}", isOptional: true)] public Amazon.JSII.Tests.CalculatorNamespace.AllTypesEnum? Bar { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWords.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.StructWithJavaReservedWords")] public class StructWithJavaReservedWords : Amazon.JSII.Tests.CalculatorNamespace.IStructWithJavaReservedWords { [JsiiProperty(name: "default", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Default { get; set; } [JsiiOptional] [JsiiProperty(name: "assert", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Assert { get; set; } [JsiiOptional] [JsiiProperty(name: "result", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Result { get; set; } [JsiiOptional] [JsiiProperty(name: "that", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? That { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/BackReferences/IMyClassReference.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences { [JsiiInterface(nativeType: typeof(IMyClassReference), fullyQualifiedName: "jsii-calc.submodule.back_references.MyClassReference")] public interface IMyClassReference { [JsiiProperty(name: "reference", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.MyClass\\"}")] Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass Reference { get; } [JsiiTypeProxy(nativeType: typeof(IMyClassReference), fullyQualifiedName: "jsii-calc.submodule.back_references.MyClassReference")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences.IMyClassReference { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "reference", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.MyClass\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass Reference { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/BackReferences/MyClassReference.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.submodule.back_references.MyClassReference")] public class MyClassReference : Amazon.JSII.Tests.CalculatorNamespace.Submodule.BackReferences.IMyClassReference { [JsiiProperty(name: "reference", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.MyClass\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass Reference { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/Awesomeness.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiEnum(nativeType: typeof(Awesomeness), fullyQualifiedName: "jsii-calc.submodule.child.Awesomeness")] public enum Awesomeness { /// It was awesome! [JsiiEnumMember(name: "AWESOME")] AWESOME } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/Goodness.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiEnum(nativeType: typeof(Goodness), fullyQualifiedName: "jsii-calc.submodule.child.Goodness")] public enum Goodness { /// It's pretty good. [JsiiEnumMember(name: "PRETTY_GOOD")] PRETTY_GOOD, /// It's really good. [JsiiEnumMember(name: "REALLY_GOOD")] REALLY_GOOD, /// It's amazingly good. [JsiiEnumMember(name: "AMAZINGLY_GOOD")] AMAZINGLY_GOOD } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/IKwargsProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiInterface(nativeType: typeof(IKwargsProps), fullyQualifiedName: "jsii-calc.submodule.child.KwargsProps")] public interface IKwargsProps : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct { [JsiiProperty(name: "extra", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] string? Extra { get { return null; } } [JsiiTypeProxy(nativeType: typeof(IKwargsProps), fullyQualifiedName: "jsii-calc.submodule.child.KwargsProps")] new internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps { private _Proxy(ByRefValue reference): base(reference) { } [JsiiOptional] [JsiiProperty(name: "extra", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Extra { get => GetInstanceProperty(); } [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/ISomeStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiInterface(nativeType: typeof(ISomeStruct), fullyQualifiedName: "jsii-calc.submodule.child.SomeStruct")] public interface ISomeStruct { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop { get; } [JsiiTypeProxy(nativeType: typeof(ISomeStruct), fullyQualifiedName: "jsii-calc.submodule.child.SomeStruct")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/IStructure.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiInterface(nativeType: typeof(IStructure), fullyQualifiedName: "jsii-calc.submodule.child.Structure")] public interface IStructure { [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] bool Bool { get; } [JsiiTypeProxy(nativeType: typeof(IStructure), fullyQualifiedName: "jsii-calc.submodule.child.Structure")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IStructure { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Bool { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/InnerClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.InnerClass), fullyQualifiedName: "jsii-calc.submodule.child.InnerClass")] public class InnerClass : DeputyBase { public InnerClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InnerClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected InnerClass(DeputyProps props): base(props) { } [JsiiProperty(name: "staticProp", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeStruct\\"}")] public static Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct StaticProp { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.InnerClass))!; } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/KwargsProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiByValue(fqn: "jsii-calc.submodule.child.KwargsProps")] public class KwargsProps : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps { [JsiiOptional] [JsiiProperty(name: "extra", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Extra { get; set; } [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/OuterClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { /// Checks that classes can self-reference during initialization. /// /// See: : https://github.com/aws/jsii/pull/1706 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.OuterClass), fullyQualifiedName: "jsii-calc.submodule.child.OuterClass")] public class OuterClass : DeputyBase { public OuterClass(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OuterClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected OuterClass(DeputyProps props): base(props) { } [JsiiProperty(name: "innerClass", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.InnerClass\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.InnerClass InnerClass { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/SomeEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { [JsiiEnum(nativeType: typeof(SomeEnum), fullyQualifiedName: "jsii-calc.submodule.child.SomeEnum")] public enum SomeEnum { [JsiiEnumMember(name: "SOME")] SOME } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/SomeStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.submodule.child.SomeStruct")] public class SomeStruct : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct { [JsiiProperty(name: "prop", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeEnum\\"}")] public Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.SomeEnum Prop { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Child/Structure.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.submodule.child.Structure")] public class Structure : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IStructure { [JsiiProperty(name: "bool", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public bool Bool { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Default.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule { #pragma warning disable CS8618 /// A struct named "Default". /// /// See: https://github.com/aws/jsii/issues/2637 /// [JsiiByValue(fqn: "jsii-calc.submodule.Default")] public class Default : Amazon.JSII.Tests.CalculatorNamespace.Submodule.IDefault { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/IDefault.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule { /// A struct named "Default". /// /// See: https://github.com/aws/jsii/issues/2637 /// [JsiiInterface(nativeType: typeof(IDefault), fullyQualifiedName: "jsii-calc.submodule.Default")] public interface IDefault { [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] double Foo { get; } /// A struct named "Default". /// /// See: https://github.com/aws/jsii/issues/2637 /// [JsiiTypeProxy(nativeType: typeof(IDefault), fullyQualifiedName: "jsii-calc.submodule.Default")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.IDefault { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "foo", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Foo { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Isolated/Kwargs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Isolated { /// Ensures imports are correctly registered for kwargs lifted properties from super-structs. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Isolated.Kwargs), fullyQualifiedName: "jsii-calc.submodule.isolated.Kwargs")] public class Kwargs : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Kwargs(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Kwargs(DeputyProps props): base(props) { } [JsiiMethod(name: "method", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"props\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.child.KwargsProps\\"}}]")] public static bool Method(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps? props = null) { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Isolated.Kwargs), new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.IKwargsProps)}, new object?[]{props})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Isolated/NamespaceDoc.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Isolated { /// ///

Read you, read me

/// /// This is the readme of the jsii-calc.submodule.isolated module. ///
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class NamespaceDoc { } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/MyClass.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.MyClass), fullyQualifiedName: "jsii-calc.submodule.MyClass", parametersJson: "[{\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.child.SomeStruct\\"}}]")] public class MyClass : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested.INamespaced { public MyClass(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct props): base(_MakeDeputyProps(props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct props) { return new DeputyProps(new object?[]{props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected MyClass(DeputyProps props): base(props) { } [JsiiMethod(name: "methodWithSpecialParam", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.param.SpecialParameter\\"}}]")] public virtual string MethodWithSpecialParam(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter param) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter)}, new object[]{param})!; } [JsiiProperty(name: "awesomeness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Awesomeness\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Awesomeness Awesomeness { get => GetInstanceProperty()!; } [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string DefinedAt { get => GetInstanceProperty()!; } [JsiiProperty(name: "goodness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Goodness\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Goodness Goodness { get => GetInstanceProperty()!; } [JsiiProperty(name: "props", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.SomeStruct\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.ISomeStruct Props { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "allTypes", typeJson: "{\\"fqn\\":\\"jsii-calc.AllTypes\\"}", isOptional: true)] public virtual Amazon.JSII.Tests.CalculatorNamespace.AllTypes? AllTypes { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/NamespaceDoc.cs 1`] = ` #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule { /// ///

Read you, read me

/// /// This is the readme of the jsii-calc.submodule module. ///
[System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class NamespaceDoc { } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/NestedSubmodule/DeeplyNested/INamespaced.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested { [JsiiInterface(nativeType: typeof(INamespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced")] public interface INamespaced { [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] string DefinedAt { get; } [JsiiTypeProxy(nativeType: typeof(INamespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested.INamespaced { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] public string DefinedAt { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/NestedSubmodule/Namespaced.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.Namespaced")] public abstract class Namespaced : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.DeeplyNested.INamespaced { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Namespaced(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Namespaced(DeputyProps props): base(props) { } [JsiiProperty(name: "definedAt", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string DefinedAt { get => GetInstanceProperty()!; } [JsiiProperty(name: "goodness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Goodness\\"}")] public abstract Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Goodness Goodness { get; } [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced), fullyQualifiedName: "jsii-calc.submodule.nested_submodule.Namespaced")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.Submodule.NestedSubmodule.Namespaced { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "goodness", typeJson: "{\\"fqn\\":\\"jsii-calc.submodule.child.Goodness\\"}")] public override Amazon.JSII.Tests.CalculatorNamespace.Submodule.Child.Goodness Goodness { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Param/ISpecialParameter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param { [JsiiInterface(nativeType: typeof(ISpecialParameter), fullyQualifiedName: "jsii-calc.submodule.param.SpecialParameter")] public interface ISpecialParameter { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] string Value { get; } [JsiiTypeProxy(nativeType: typeof(ISpecialParameter), fullyQualifiedName: "jsii-calc.submodule.param.SpecialParameter")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter { private _Proxy(ByRefValue reference): base(reference) { } [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Value { get => GetInstanceProperty()!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Param/SpecialParameter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.submodule.param.SpecialParameter")] public class SpecialParameter : Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter { [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Value { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Submodule/Returnsparam/ReturnsSpecialParameter.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Submodule.Returnsparam { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Submodule.Returnsparam.ReturnsSpecialParameter), fullyQualifiedName: "jsii-calc.submodule.returnsparam.ReturnsSpecialParameter")] public class ReturnsSpecialParameter : DeputyBase { public ReturnsSpecialParameter(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReturnsSpecialParameter(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ReturnsSpecialParameter(DeputyProps props): base(props) { } [JsiiMethod(name: "returnsSpecialParam", returnsJson: "{\\"type\\":{\\"fqn\\":\\"jsii-calc.submodule.param.SpecialParameter\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.Submodule.Param.ISpecialParameter ReturnsSpecialParam() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation that sums multiple values. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Sum), fullyQualifiedName: "jsii-calc.Sum")] public class Sum : Amazon.JSII.Tests.CalculatorNamespace.Composition.CompositeOperation { public Sum(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Sum(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Sum(DeputyProps props): base(props) { } /// The expression that this operation consists of. /// /// Must be implemented by derived classes. /// [JsiiProperty(name: "expression", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public override Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Expression { get => GetInstanceProperty()!; } /// The parts to sum. [JsiiProperty(name: "parts", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"},\\"kind\\":\\"array\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue[] Parts { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilder.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SupportsNiceJavaBuilder), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilder", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"some identifier.\\"},\\"name\\":\\"id\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"docs\\":{\\"summary\\":\\"the default value of \`bar\`.\\"},\\"name\\":\\"defaultBar\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"docs\\":{\\"summary\\":\\"some props once can provide.\\"},\\"name\\":\\"props\\",\\"optional\\":true,\\"type\\":{\\"fqn\\":\\"jsii-calc.SupportsNiceJavaBuilderProps\\"}},{\\"docs\\":{\\"summary\\":\\"a variadic continuation.\\"},\\"name\\":\\"rest\\",\\"type\\":{\\"primitive\\":\\"string\\"},\\"variadic\\":true}]")] public class SupportsNiceJavaBuilder : Amazon.JSII.Tests.CalculatorNamespace.SupportsNiceJavaBuilderWithRequiredProps { /// some identifier. /// the default value of \`bar\`. /// some props once can provide. /// a variadic continuation. public SupportsNiceJavaBuilder(double id, double? defaultBar = null, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps? props = null, params string[] rest): base(_MakeDeputyProps(id, defaultBar, props, rest)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double id, double? defaultBar = null, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps? props = null, params string[] rest) { return new DeputyProps(new object?[]{id, defaultBar, props, rest}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SupportsNiceJavaBuilder(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SupportsNiceJavaBuilder(DeputyProps props): base(props) { } /// some identifier. [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"number\\"}")] public override double Id { get => GetInstanceProperty()!; } [JsiiProperty(name: "rest", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"string\\"},\\"kind\\":\\"array\\"}}")] public virtual string[] Rest { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.SupportsNiceJavaBuilderProps")] public class SupportsNiceJavaBuilderProps : Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps { /// Some number, like 42. [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] public double Bar { get; set; } /// An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. /// /// But here we are, doing it like we didn't care. /// [JsiiOptional] [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Id { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SupportsNiceJavaBuilderWithRequiredProps), fullyQualifiedName: "jsii-calc.SupportsNiceJavaBuilderWithRequiredProps", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"some identifier of your choice.\\"},\\"name\\":\\"id\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"docs\\":{\\"summary\\":\\"some properties.\\"},\\"name\\":\\"props\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.SupportsNiceJavaBuilderProps\\"}}]")] public class SupportsNiceJavaBuilderWithRequiredProps : DeputyBase { /// some identifier of your choice. /// some properties. public SupportsNiceJavaBuilderWithRequiredProps(double id, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps props): base(_MakeDeputyProps(id, props)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(double id, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps props) { return new DeputyProps(new object?[]{id, props}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SupportsNiceJavaBuilderWithRequiredProps(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SupportsNiceJavaBuilderWithRequiredProps(DeputyProps props): base(props) { } [JsiiProperty(name: "bar", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Bar { get => GetInstanceProperty()!; } /// some identifier of your choice. [JsiiProperty(name: "id", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double Id { get => GetInstanceProperty()!; } [JsiiOptional] [JsiiProperty(name: "propId", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? PropId { get => GetInstanceProperty(); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.SyncVirtualMethods), fullyQualifiedName: "jsii-calc.SyncVirtualMethods")] public class SyncVirtualMethods : DeputyBase { public SyncVirtualMethods(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SyncVirtualMethods(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected SyncVirtualMethods(DeputyProps props): base(props) { } [JsiiMethod(name: "callerIsAsync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", isAsync: true)] public virtual double CallerIsAsync() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "callerIsMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double CallerIsMethod() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "modifyOtherProperty", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual void ModifyOtherProperty(string @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string)}, new object[]{@value}); } [JsiiMethod(name: "modifyValueOfTheProperty", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual void ModifyValueOfTheProperty(string @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(string)}, new object[]{@value}); } [JsiiMethod(name: "readA", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public virtual double ReadA() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "retrieveOtherProperty", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string RetrieveOtherProperty() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "retrieveReadOnlyProperty", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string RetrieveReadOnlyProperty() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "retrieveValueOfTheProperty", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string RetrieveValueOfTheProperty() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "virtualMethod", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"n\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual double VirtualMethod(double n) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{n})!; } [JsiiMethod(name: "writeA", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual void WriteA(double @value) { InvokeInstanceVoidMethod(new System.Type[]{typeof(double)}, new object[]{@value}); } [JsiiProperty(name: "readonlyProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ReadonlyProperty { get => GetInstanceProperty()!; } [JsiiProperty(name: "a", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double A { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "callerIsProperty", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double CallerIsProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "otherProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string OtherProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "theProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string TheProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } [JsiiProperty(name: "valueOfOtherProperty", typeJson: "{\\"primitive\\":\\"string\\"}")] public virtual string ValueOfOtherProperty { get => GetInstanceProperty()!; set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TestStructWithEnum.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.TestStructWithEnum), fullyQualifiedName: "jsii-calc.TestStructWithEnum")] public class TestStructWithEnum : DeputyBase { public TestStructWithEnum(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TestStructWithEnum(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TestStructWithEnum(DeputyProps props): base(props) { } /// Returns true if \`foo\` is \`StringEnum.A\`. [JsiiMethod(name: "isStringEnumA", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"input\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.StructWithEnum\\"}}]")] public virtual bool IsStringEnumA(Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum input) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum)}, new object[]{input})!; } /// Returns true if \`foo\` is \`StringEnum.B\` and \`bar\` is \`AllTypesEnum.THIS_IS_GREAT\`. [JsiiMethod(name: "isStringEnumB", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"input\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.StructWithEnum\\"}}]")] public virtual bool IsStringEnumB(Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum input) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum)}, new object[]{input})!; } /// Returns \`foo: StringEnum.A\`. [JsiiProperty(name: "structWithFoo", typeJson: "{\\"fqn\\":\\"jsii-calc.StructWithEnum\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum StructWithFoo { get => GetInstanceProperty()!; } /// Returns \`foo: StringEnum.C\` and \`bar: AllTypesEnum.MY_ENUM_VALUE\`. [JsiiProperty(name: "structWithFooBar", typeJson: "{\\"fqn\\":\\"jsii-calc.StructWithEnum\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IStructWithEnum StructWithFooBar { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Thrower), fullyQualifiedName: "jsii-calc.Thrower")] public class Thrower : DeputyBase { public Thrower(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Thrower(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Thrower(DeputyProps props): base(props) { } [JsiiMethod(name: "throwError")] public virtual void ThrowError() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.TopLevelStruct")] public class TopLevelStruct : Amazon.JSII.Tests.CalculatorNamespace.ITopLevelStruct { /// This is a required field. [JsiiProperty(name: "required", typeJson: "{\\"primitive\\":\\"string\\"}")] public string Required { get; set; } private object _secondLevel; /// A union to really stress test our serialization. [JsiiProperty(name: "secondLevel", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.SecondLevelStruct\\"}]}}")] public object SecondLevel { get => _secondLevel; set { _secondLevel = value; } } /// You don't have to pass this. [JsiiOptional] [JsiiProperty(name: "optional", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public string? Optional { get; set; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TwoMethodsWithSimilarCapitalization.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// In TypeScript it is possible to have two methods with the same name but different capitalization. /// /// See: https://github.com/aws/jsii/issues/2508 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.TwoMethodsWithSimilarCapitalization), fullyQualifiedName: "jsii-calc.TwoMethodsWithSimilarCapitalization")] public class TwoMethodsWithSimilarCapitalization : DeputyBase { public TwoMethodsWithSimilarCapitalization(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TwoMethodsWithSimilarCapitalization(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected TwoMethodsWithSimilarCapitalization(DeputyProps props): base(props) { } [JsiiMethod(name: "toIsoString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string ToIsoString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// /// Stability: Deprecated /// [JsiiMethod(name: "toIsOString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete("python requires that all alternatives are deprecated")] public virtual string ToIsOString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } /// /// Stability: Deprecated /// [JsiiMethod(name: "toISOString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete("python requires that all alternatives are deprecated")] public virtual string ToISOString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiProperty(name: "fooBar", typeJson: "{\\"primitive\\":\\"number\\"}")] public virtual double FooBar { get => GetInstanceProperty()!; } /// /// Stability: Deprecated /// [JsiiProperty(name: "fooBAR", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete("YES")] public virtual double FooBAR { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UmaskCheck.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Checks the current file permissions are cool (no funky UMASK down-scoping happened). /// /// See: https://github.com/aws/jsii/issues/1765 /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UmaskCheck), fullyQualifiedName: "jsii-calc.UmaskCheck")] public class UmaskCheck : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UmaskCheck(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UmaskCheck(DeputyProps props): base(props) { } /// This should return 0o644 (-rw-r--r--). [JsiiMethod(name: "mode", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}")] public static double Mode() { return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.UmaskCheck), new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation on a single operand. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation", parametersJson: "[{\\"name\\":\\"operand\\",\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}}]")] public abstract class UnaryOperation : Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Operation { protected UnaryOperation(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand): base(_MakeDeputyProps(operand)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue operand) { return new DeputyProps(new object?[]{operand}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UnaryOperation(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UnaryOperation(DeputyProps props): base(props) { } [JsiiProperty(name: "operand", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.NumericValue\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue Operand { get => GetInstanceProperty()!; } /// An operation on a single operand. [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation), fullyQualifiedName: "jsii-calc.UnaryOperation")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.UnaryOperation { private _Proxy(ByRefValue reference): base(reference) { } /// (deprecated) The value. /// /// Stability: Deprecated /// [JsiiProperty(name: "value", typeJson: "{\\"primitive\\":\\"number\\"}")] [System.Obsolete()] public override double Value { get => GetInstanceProperty()!; } /// (deprecated) String representation of the value. /// /// Stability: Deprecated /// [JsiiMethod(name: "toString", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] [System.Obsolete()] public override string ToString() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Union { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), fullyQualifiedName: "jsii-calc.union.ConsumesUnion")] public class ConsumesUnion : DeputyBase { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumesUnion(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected ConsumesUnion(DeputyProps props): base(props) { } [JsiiMethod(name: "unionType", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.union.IResolvable\\"},{\\"fqn\\":\\"jsii-calc.union.Resolvable\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}]}}}]")] public static void UnionType(object param) { InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), new System.Type[]{typeof(object)}, new object[]{param}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/IResolvable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Union { [JsiiInterface(nativeType: typeof(IResolvable), fullyQualifiedName: "jsii-calc.union.IResolvable")] public interface IResolvable { [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] object Resolve(); [JsiiTypeProxy(nativeType: typeof(IResolvable), fullyQualifiedName: "jsii-calc.union.IResolvable")] internal sealed class _Proxy : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public object Resolve() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/Resolvable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace.Union { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable), fullyQualifiedName: "jsii-calc.union.Resolvable")] public class Resolvable : DeputyBase, Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable { /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Resolvable(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected Resolvable(DeputyProps props): base(props) { } [JsiiMethod(name: "resolve", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public virtual object Resolve() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { #pragma warning disable CS8618 [JsiiByValue(fqn: "jsii-calc.UnionProperties")] public class UnionProperties : Amazon.JSII.Tests.CalculatorNamespace.IUnionProperties { private object _bar; [JsiiProperty(name: "bar", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"jsii-calc.AllTypes\\"}]}}")] public object Bar { get => _bar; set { _bar = value; } } private object? _foo; [JsiiOptional] [JsiiProperty(name: "foo", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"}]}}", isOptional: true)] public object? Foo { get => _foo; set { _foo = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UpcasingReflectable.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Ensures submodule-imported types from dependencies can be used correctly. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UpcasingReflectable), fullyQualifiedName: "jsii-calc.UpcasingReflectable", parametersJson: "[{\\"name\\":\\"delegate\\",\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"map\\"}}}]")] public class UpcasingReflectable : DeputyBase, Amazon.JSII.Tests.CustomSubmoduleName.IReflectable { public UpcasingReflectable(System.Collections.Generic.IDictionary @delegate): base(_MakeDeputyProps(@delegate)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(System.Collections.Generic.IDictionary @delegate) { return new DeputyProps(new object?[]{@delegate}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UpcasingReflectable(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UpcasingReflectable(DeputyProps props): base(props) { } [JsiiProperty(name: "reflector", typeJson: "{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.Reflector\\"}")] public static Amazon.JSII.Tests.CustomSubmoduleName.Reflector Reflector { get; } = GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.UpcasingReflectable))!; [JsiiProperty(name: "entries", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"fqn\\":\\"@scope/jsii-calc-lib.submodule.ReflectableEntry\\"},\\"kind\\":\\"array\\"}}")] public virtual Amazon.JSII.Tests.CustomSubmoduleName.IReflectableEntry[] Entries { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UseBundledDependency), fullyQualifiedName: "jsii-calc.UseBundledDependency")] public class UseBundledDependency : DeputyBase { public UseBundledDependency(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseBundledDependency(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseBundledDependency(DeputyProps props): base(props) { } [JsiiMethod(name: "value", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}")] public virtual object Value() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Depend on a type from jsii-calc-base as a test for awslabs/jsii#128. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UseCalcBase), fullyQualifiedName: "jsii-calc.UseCalcBase")] public class UseCalcBase : DeputyBase { public UseCalcBase(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseCalcBase(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UseCalcBase(DeputyProps props): base(props) { } [JsiiMethod(name: "hello", returnsJson: "{\\"type\\":{\\"fqn\\":\\"@scope/jsii-calc-base.Base\\"}}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Base Hello() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.UsesInterfaceWithProperties), fullyQualifiedName: "jsii-calc.UsesInterfaceWithProperties", parametersJson: "[{\\"name\\":\\"obj\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IInterfaceWithProperties\\"}}]")] public class UsesInterfaceWithProperties : DeputyBase { public UsesInterfaceWithProperties(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties obj): base(_MakeDeputyProps(obj)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties obj) { return new DeputyProps(new object?[]{obj}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UsesInterfaceWithProperties(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected UsesInterfaceWithProperties(DeputyProps props): base(props) { } [JsiiMethod(name: "justRead", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}")] public virtual string JustRead() { return InvokeInstanceMethod(new System.Type[]{}, new object[]{})!; } [JsiiMethod(name: "readStringAndNumber", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"ext\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.IInterfaceWithPropertiesExtension\\"}}]")] public virtual string ReadStringAndNumber(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithPropertiesExtension ext) { return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithPropertiesExtension)}, new object[]{ext})!; } [JsiiMethod(name: "writeAndRead", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"value\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public virtual string WriteAndRead(string @value) { return InvokeInstanceMethod(new System.Type[]{typeof(string)}, new object[]{@value})!; } [JsiiProperty(name: "obj", typeJson: "{\\"fqn\\":\\"jsii-calc.IInterfaceWithProperties\\"}")] public virtual Amazon.JSII.Tests.CalculatorNamespace.IInterfaceWithProperties Obj { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicInvoker.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VariadicInvoker), fullyQualifiedName: "jsii-calc.VariadicInvoker", parametersJson: "[{\\"name\\":\\"method\\",\\"type\\":{\\"fqn\\":\\"jsii-calc.VariadicMethod\\"}}]")] public class VariadicInvoker : DeputyBase { public VariadicInvoker(Amazon.JSII.Tests.CalculatorNamespace.VariadicMethod method): base(_MakeDeputyProps(method)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(Amazon.JSII.Tests.CalculatorNamespace.VariadicMethod method) { return new DeputyProps(new object?[]{method}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicInvoker(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicInvoker(DeputyProps props): base(props) { } [JsiiMethod(name: "asArray", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"number\\"},\\"kind\\":\\"array\\"}}}", parametersJson: "[{\\"name\\":\\"values\\",\\"type\\":{\\"primitive\\":\\"number\\"},\\"variadic\\":true}]")] public virtual double[] AsArray(params double[] values) { return InvokeInstanceMethod(new System.Type[]{typeof(double[])}, new object[]{values})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VariadicMethod), fullyQualifiedName: "jsii-calc.VariadicMethod", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"a prefix that will be use for all values returned by \`#asArray\`.\\"},\\"name\\":\\"prefix\\",\\"type\\":{\\"primitive\\":\\"number\\"},\\"variadic\\":true}]")] public class VariadicMethod : DeputyBase { /// a prefix that will be use for all values returned by \`#asArray\`. public VariadicMethod(params double[] prefix): base(_MakeDeputyProps(prefix)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(params double[] prefix) { return new DeputyProps(new object?[]{prefix}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicMethod(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicMethod(DeputyProps props): base(props) { } /// the first element of the array to be returned (after the \`prefix\` provided at construction time). /// other elements to be included in the array. [JsiiMethod(name: "asArray", returnsJson: "{\\"type\\":{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"number\\"},\\"kind\\":\\"array\\"}}}", parametersJson: "[{\\"docs\\":{\\"summary\\":\\"the first element of the array to be returned (after the \`prefix\` provided at construction time).\\"},\\"name\\":\\"first\\",\\"type\\":{\\"primitive\\":\\"number\\"}},{\\"docs\\":{\\"summary\\":\\"other elements to be included in the array.\\"},\\"name\\":\\"others\\",\\"type\\":{\\"primitive\\":\\"number\\"},\\"variadic\\":true}]")] public virtual double[] AsArray(double first, params double[] others) { return InvokeInstanceMethod(new System.Type[]{typeof(double), typeof(double[])}, new object[]{first, others})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicTypeUnion.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VariadicTypeUnion), fullyQualifiedName: "jsii-calc.VariadicTypeUnion", parametersJson: "[{\\"name\\":\\"union\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"variadic\\":true}]")] public class VariadicTypeUnion : DeputyBase { public VariadicTypeUnion(params object[] union): base(_MakeDeputyProps(union)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(params object[] union) { return new DeputyProps(new object?[]{union}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicTypeUnion(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VariadicTypeUnion(DeputyProps props): base(props) { } [JsiiProperty(name: "union", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}},\\"kind\\":\\"array\\"}}")] public virtual object[] Union { get => GetInstanceProperty()!; set { SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VirtualMethodPlayground), fullyQualifiedName: "jsii-calc.VirtualMethodPlayground")] public class VirtualMethodPlayground : DeputyBase { public VirtualMethodPlayground(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VirtualMethodPlayground(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VirtualMethodPlayground(DeputyProps props): base(props) { } [JsiiMethod(name: "overrideMeAsync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"index\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]", isAsync: true)] public virtual double OverrideMeAsync(double index) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{index})!; } [JsiiMethod(name: "overrideMeSync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"index\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual double OverrideMeSync(double index) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{index})!; } [JsiiMethod(name: "parallelSumAsync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"count\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]", isAsync: true)] public virtual double ParallelSumAsync(double count) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{count})!; } [JsiiMethod(name: "serialSumAsync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"count\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]", isAsync: true)] public virtual double SerialSumAsync(double count) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{count})!; } [JsiiMethod(name: "sumSync", returnsJson: "{\\"type\\":{\\"primitive\\":\\"number\\"}}", parametersJson: "[{\\"name\\":\\"count\\",\\"type\\":{\\"primitive\\":\\"number\\"}}]")] public virtual double SumSync(double count) { return InvokeInstanceMethod(new System.Type[]{typeof(double)}, new object[]{count})!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallback.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// This test is used to validate the runtimes can return correctly from a void callback. /// /// /// Implement overrideMe (method does not have to do anything). /// Invoke callMe /// Verify that methodWasCalled is true. /// /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VoidCallback), fullyQualifiedName: "jsii-calc.VoidCallback")] public abstract class VoidCallback : DeputyBase { protected VoidCallback(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VoidCallback(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected VoidCallback(DeputyProps props): base(props) { } [JsiiMethod(name: "callMe")] public virtual void CallMe() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } [JsiiMethod(name: "overrideMe")] protected abstract void OverrideMe(); [JsiiProperty(name: "methodWasCalled", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool MethodWasCalled { get => GetInstanceProperty()!; } /// This test is used to validate the runtimes can return correctly from a void callback. /// /// /// Implement overrideMe (method does not have to do anything). /// Invoke callMe /// Verify that methodWasCalled is true. /// /// [JsiiTypeProxy(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.VoidCallback), fullyQualifiedName: "jsii-calc.VoidCallback")] internal sealed class _Proxy : Amazon.JSII.Tests.CalculatorNamespace.VoidCallback { private _Proxy(ByRefValue reference): base(reference) { } [JsiiMethod(name: "overrideMe")] protected override void OverrideMe() { InvokeInstanceVoidMethod(new System.Type[]{}, new object[]{}); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WeirdDocs.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// > Don't use this class. /// /// A class that shouldn't be used, with the annotation in a weird place. /// [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.WeirdDocs), fullyQualifiedName: "jsii-calc.WeirdDocs")] public class WeirdDocs : DeputyBase { public WeirdDocs(): base(_MakeDeputyProps()) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps() { return new DeputyProps(System.Array.Empty()); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected WeirdDocs(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected WeirdDocs(DeputyProps props): base(props) { } /// > Don't read this property. /// /// A property that shouldn't be read, with the annotation in a weird place. /// [JsiiOptional] [JsiiProperty(name: "dontReadMe", typeJson: "{\\"primitive\\":\\"string\\"}", isOptional: true)] public virtual string? DontReadMe { get => GetInstanceProperty(); set => SetInstanceProperty(value); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; #pragma warning disable CS0672,CS0809,CS1591 namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that private property declarations in constructor arguments are hidden. [JsiiClass(nativeType: typeof(Amazon.JSII.Tests.CalculatorNamespace.WithPrivatePropertyInConstructor), fullyQualifiedName: "jsii-calc.WithPrivatePropertyInConstructor", parametersJson: "[{\\"name\\":\\"privateField\\",\\"optional\\":true,\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public class WithPrivatePropertyInConstructor : DeputyBase { public WithPrivatePropertyInConstructor(string? privateField = null): base(_MakeDeputyProps(privateField)) { } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(string? privateField = null) { return new DeputyProps(new object?[]{privateField}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected WithPrivatePropertyInConstructor(ByRefValue reference): base(reference) { } /// Used by jsii to construct an instance of this class from DeputyProps /// The deputy props [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] protected WithPrivatePropertyInConstructor(DeputyProps props): base(props) { } [JsiiProperty(name: "success", typeJson: "{\\"primitive\\":\\"boolean\\"}")] public virtual bool Success { get => GetInstanceProperty()!; } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/AssemblyInfo.cs 1`] = ` using Amazon.JSII.Runtime.Deputy; [assembly: JsiiAssembly("jsii-calc", "3.20.120", "jsii-calc-3.20.120.tgz")] `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/LICENSE 1`] = ` Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/NOTICE 1`] = ` jsii Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-3.20.120.tgz 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId/jsii-calc-3.20.120.tgz is a tarball`; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/resources/AWSLogo128x128.png 1`] = `dotnet/Amazon.JSII.Tests.CalculatorPackageId/resources/AWSLogo128x128.png is a binary file`; exports[`Generated code for "jsii-calc": / 1`] = ` ┗━ 📁 dotnet ┗━ 📁 Amazon.JSII.Tests.CalculatorPackageId ┗━ 📁 Amazon ┗━ 📁 JSII ┗━ 📁 Tests ┗━ 📁 CalculatorNamespace ┣━ 📄 AllTypes.cs.diff ┣━ 📁 Anonymous ┃ ┗━ 📄 UseOptions.cs.diff ┣━ 📄 Calculator.cs.diff ┣━ 📄 ClassWithCollectionOfUnions.cs.diff ┣━ 📄 ClassWithNestedUnion.cs.diff ┣━ 📄 ConfusingToJackson.cs.diff ┣━ 📄 ConfusingToJacksonStruct.cs.diff ┣━ 📄 StructUnionConsumer.cs.diff ┣━ 📄 StructWithCollectionOfUnionts.cs.diff ┣━ 📄 TopLevelStruct.cs.diff ┣━ 📁 Union ┃ ┗━ 📄 ConsumesUnion.cs.diff ┣━ 📄 UnionProperties.cs.diff ┗━ 📄 VariadicTypeUnion.cs.diff `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs --runtime-type-checking @@ -141,30 +141,144 @@ public virtual object[] UnionArrayProperty { get => GetInstanceProperty()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_cd4240 = 0 ; __idx_cd4240 < value.Length ; __idx_cd4240++) + { + switch (value[__idx_cd4240]) + { + case double cast_e9c63e: + break; + case byte cast_e9c63e: + break; + case decimal cast_e9c63e: + break; + case float cast_e9c63e: + break; + case int cast_e9c63e: + break; + case long cast_e9c63e: + break; + case sbyte cast_e9c63e: + break; + case short cast_e9c63e: + break; + case uint cast_e9c63e: + break; + case ulong cast_e9c63e: + break; + case ushort cast_e9c63e: + break; + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue cast_e9c63e: + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.NumericValue).FullName}; received {value[__idx_cd4240].GetType().FullName}", nameof(value)); + } + } + } SetInstanceProperty(value); } } [JsiiProperty(name: "unionMapProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"}]}},\\"kind\\":\\"map\\"}}")] public virtual System.Collections.Generic.IDictionary UnionMapProperty { get => GetInstanceProperty>()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + foreach (var __item_cd4240 in value) + { + switch (__item_cd4240.Value) + { + case string cast_af5ffb: + break; + case double cast_af5ffb: + break; + case byte cast_af5ffb: + break; + case decimal cast_af5ffb: + break; + case float cast_af5ffb: + break; + case int cast_af5ffb: + break; + case long cast_af5ffb: + break; + case sbyte cast_af5ffb: + break; + case short cast_af5ffb: + break; + case uint cast_af5ffb: + break; + case ulong cast_af5ffb: + break; + case ushort cast_af5ffb: + break; + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number cast_af5ffb: + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[\\"{__item_cd4240.Key}\\"] to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[\\"{__item_cd4240.Key}\\"] to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number).FullName}; received {__item_cd4240.Value.GetType().FullName}", nameof(value)); + } + } + } SetInstanceProperty(value); } } [JsiiProperty(name: "unionProperty", typeJson: "{\\"union\\":{\\"types\\":[{\\"primitive\\":\\"string\\"},{\\"primitive\\":\\"number\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.Number\\"},{\\"fqn\\":\\"jsii-calc.Multiply\\"}]}}")] public virtual object UnionProperty { get => GetInstanceProperty()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case string cast_cd4240: + break; + case double cast_cd4240: + break; + case byte cast_cd4240: + break; + case decimal cast_cd4240: + break; + case float cast_cd4240: + break; + case int cast_cd4240: + break; + case long cast_cd4240: + break; + case sbyte cast_cd4240: + break; + case short cast_cd4240: + break; + case uint cast_cd4240: + break; + case ulong cast_cd4240: + break; + case ushort cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.Multiply cast_cd4240: + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Number).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply).FullName}; received {value.GetType().FullName}", nameof(value)); + } + } SetInstanceProperty(value); } } [JsiiProperty(name: "unknownArrayProperty", typeJson: "{\\"collection\\":{\\"elementtype\\":{\\"primitive\\":\\"any\\"},\\"kind\\":\\"array\\"}}")] `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/UseOptions.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/UseOptions.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Anonymous/UseOptions.cs --runtime-type-checking @@ -22,10 +22,27 @@ } [JsiiMethod(name: "consume", returnsJson: "{\\"type\\":{\\"primitive\\":\\"string\\"}}", parametersJson: "[{\\"name\\":\\"option\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.anonymous.IOptionA\\"},{\\"fqn\\":\\"jsii-calc.anonymous.IOptionB\\"}]}}}]")] public static string Consume(object option) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (option) + { + case Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionA cast_a11a75: + break; + case Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionB cast_a11a75: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_a11a75: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(option)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionB).FullName}; received null", nameof(option)); + default: + throw new System.ArgumentException($"Expected argument {nameof(option)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.IOptionB).FullName}; received {option.GetType().FullName}", nameof(option)); + } + } return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Anonymous.UseOptions), new System.Type[]{typeof(object)}, new object[]{option})!; } [JsiiMethod(name: "privideAsAny", returnsJson: "{\\"type\\":{\\"primitive\\":\\"any\\"}}", parametersJson: "[{\\"name\\":\\"which\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static object PrivideAsAny(string which) `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs --runtime-type-checking @@ -131,10 +131,26 @@ public virtual object? UnionProperty { get => GetInstanceProperty(); set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case Amazon.JSII.Tests.CalculatorNamespace.Add cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.Multiply cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.Power cast_cd4240: + break; + case null: + break; + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Add).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Multiply).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Power).FullName}; received {value.GetType().FullName}", nameof(value)); + } + } SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollectionOfUnions.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollectionOfUnions.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollectionOfUnions.cs --runtime-type-checking @@ -12,10 +12,33 @@ } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(System.Collections.Generic.IDictionary[] unionProperty) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_7e4c6f = 0 ; __idx_7e4c6f < unionProperty.Length ; __idx_7e4c6f++) + { + foreach (var __item_85d4f8 in unionProperty[__idx_7e4c6f]) + { + switch (__item_85d4f8.Value) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_7df241: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_7df241: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_7df241: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][\\"{__item_85d4f8.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(unionProperty)); + default: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][\\"{__item_85d4f8.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {__item_85d4f8.Value.GetType().FullName}", nameof(unionProperty)); + } + } + } + } return new DeputyProps(new object?[]{unionProperty}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference @@ -35,10 +58,33 @@ public virtual System.Collections.Generic.IDictionary[] UnionProperty { get => GetInstanceProperty[]>()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_cd4240 = 0 ; __idx_cd4240 < value.Length ; __idx_cd4240++) + { + foreach (var __item_e9c63e in value[__idx_cd4240]) + { + switch (__item_e9c63e.Value) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_b53a7c: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_b53a7c: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_b53a7c: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_e9c63e.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_e9c63e.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {__item_e9c63e.Value.GetType().FullName}", nameof(value)); + } + } + } + } SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithNestedUnion.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithNestedUnion.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithNestedUnion.cs --runtime-type-checking @@ -12,10 +12,61 @@ } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(object[] unionProperty) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_7e4c6f = 0 ; __idx_7e4c6f < unionProperty.Length ; __idx_7e4c6f++) + { + switch (unionProperty[__idx_7e4c6f]) + { + case System.Collections.Generic.IDictionary cast_85d4f8: + foreach (var __item_94dd05 in cast_85d4f8) + { + switch (__item_94dd05.Value) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_dd6247: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_dd6247: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_dd6247: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][\\"{__item_94dd05.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(unionProperty)); + default: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][\\"{__item_94dd05.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {__item_94dd05.Value.GetType().FullName}", nameof(unionProperty)); + } + } + break; + case object[] cast_85d4f8: + for (var __idx_94dd05 = 0 ; __idx_94dd05 < cast_85d4f8.Length ; __idx_94dd05++) + { + switch (cast_85d4f8[__idx_94dd05]) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_8facca: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_8facca: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_8facca: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][{__idx_94dd05}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(unionProperty)); + default: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}][{__idx_94dd05}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {cast_85d4f8[__idx_94dd05].GetType().FullName}", nameof(unionProperty)); + } + } + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}] to be one of: System.Collections.Generic.IDictionary, object[]; received null", nameof(unionProperty)); + default: + throw new System.ArgumentException($"Expected argument {nameof(unionProperty)}[{__idx_7e4c6f}] to be one of: System.Collections.Generic.IDictionary, object[]; received {unionProperty[__idx_7e4c6f].GetType().FullName}", nameof(unionProperty)); + } + } + } return new DeputyProps(new object?[]{unionProperty}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference @@ -35,10 +86,61 @@ public virtual object[] UnionProperty { get => GetInstanceProperty()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_cd4240 = 0 ; __idx_cd4240 < value.Length ; __idx_cd4240++) + { + switch (value[__idx_cd4240]) + { + case System.Collections.Generic.IDictionary cast_e9c63e: + foreach (var __item_cce3ad in cast_e9c63e) + { + switch (__item_cce3ad.Value) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_40706a: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_40706a: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_40706a: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_cce3ad.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_cce3ad.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {__item_cce3ad.Value.GetType().FullName}", nameof(value)); + } + } + break; + case object[] cast_e9c63e: + for (var __idx_cce3ad = 0 ; __idx_cce3ad < cast_e9c63e.Length ; __idx_cce3ad++) + { + switch (cast_e9c63e[__idx_cce3ad]) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_e1169c: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_e1169c: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_e1169c: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][{__idx_cce3ad}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][{__idx_cce3ad}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {cast_e9c63e[__idx_cce3ad].GetType().FullName}", nameof(value)); + } + } + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: System.Collections.Generic.IDictionary, object[]; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: System.Collections.Generic.IDictionary, object[]; received {value[__idx_cd4240].GetType().FullName}", nameof(value)); + } + } + } SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs --runtime-type-checking @@ -42,10 +42,44 @@ public virtual object? UnionProperty { get => GetInstanceProperty(); set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_cd4240: + break; + case object[] cast_cd4240: + for (var __idx_f64a5c = 0 ; __idx_f64a5c < cast_cd4240.Length ; __idx_f64a5c++) + { + switch (cast_cd4240[__idx_f64a5c]) + { + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_201718: + break; + case Amazon.JSII.Tests.CalculatorNamespace.AbstractClass cast_201718: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_201718: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_f64a5c}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_f64a5c}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass).FullName}; received {cast_cd4240[__idx_f64a5c].GetType().FullName}", nameof(value)); + } + } + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_cd4240: + // Not enough information to type-check... + break; + case null: + break; + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, object[]; received {value.GetType().FullName}", nameof(value)); + } + } SetInstanceProperty(value); } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs --runtime-type-checking @@ -14,10 +14,44 @@ public object? UnionProperty { get => _unionProperty; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_cd4240: + break; + case object[] cast_cd4240: + for (var __idx_f64a5c = 0 ; __idx_f64a5c < cast_cd4240.Length ; __idx_f64a5c++) + { + switch (cast_cd4240[__idx_f64a5c]) + { + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_201718: + break; + case Amazon.JSII.Tests.CalculatorNamespace.AbstractClass cast_201718: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_201718: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_f64a5c}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_f64a5c}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AbstractClass).FullName}; received {cast_cd4240[__idx_f64a5c].GetType().FullName}", nameof(value)); + } + } + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_cd4240: + // Not enough information to type-check... + break; + case null: + break; + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}, object[]; received {value.GetType().FullName}", nameof(value)); + } + } _unionProperty = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs --runtime-type-checking @@ -22,16 +22,50 @@ } [JsiiMethod(name: "isStructA", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"struct\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}]")] public static bool IsStructA(object @struct) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (@struct) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_309153: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_309153: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_309153: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(@struct)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(@struct)); + default: + throw new System.ArgumentException($"Expected argument {nameof(@struct)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {@struct.GetType().FullName}", nameof(@struct)); + } + } return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), new System.Type[]{typeof(object)}, new object[]{@struct})!; } [JsiiMethod(name: "isStructB", returnsJson: "{\\"type\\":{\\"primitive\\":\\"boolean\\"}}", parametersJson: "[{\\"name\\":\\"struct\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}]")] public static bool IsStructB(object @struct) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (@struct) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_309153: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_309153: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_309153: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(@struct)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(@struct)); + default: + throw new System.ArgumentException($"Expected argument {nameof(@struct)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {@struct.GetType().FullName}", nameof(@struct)); + } + } return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.StructUnionConsumer), new System.Type[]{typeof(object)}, new object[]{@struct})!; } [JsiiMethod(name: "provideStruct", returnsJson: "{\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.StructA\\"},{\\"fqn\\":\\"jsii-calc.StructB\\"}]}}}", parametersJson: "[{\\"name\\":\\"which\\",\\"type\\":{\\"primitive\\":\\"string\\"}}]")] public static object ProvideStruct(string which) `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithCollectionOfUnionts.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithCollectionOfUnionts.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithCollectionOfUnionts.cs --runtime-type-checking @@ -15,10 +15,33 @@ public System.Collections.Generic.IDictionary[] UnionProperty { get => _unionProperty; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_cd4240 = 0 ; __idx_cd4240 < value.Length ; __idx_cd4240++) + { + foreach (var __item_e9c63e in value[__idx_cd4240]) + { + switch (__item_e9c63e.Value) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_b53a7c: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_b53a7c: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_b53a7c: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_e9c63e.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}][\\"{__item_e9c63e.Key}\\"] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {__item_e9c63e.Value.GetType().FullName}", nameof(value)); + } + } + } + } _unionProperty = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs --runtime-type-checking @@ -24,10 +24,47 @@ public object SecondLevel { get => _secondLevel; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case double cast_cd4240: + break; + case byte cast_cd4240: + break; + case decimal cast_cd4240: + break; + case float cast_cd4240: + break; + case int cast_cd4240: + break; + case long cast_cd4240: + break; + case sbyte cast_cd4240: + break; + case short cast_cd4240: + break; + case uint cast_cd4240: + break; + case ulong cast_cd4240: + break; + case ushort cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct cast_cd4240: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_cd4240: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.ISecondLevelStruct).FullName}; received {value.GetType().FullName}", nameof(value)); + } + } _secondLevel = value; } } /// You don't have to pass this. `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Union/ConsumesUnion.cs --runtime-type-checking @@ -22,9 +22,26 @@ } [JsiiMethod(name: "unionType", parametersJson: "[{\\"name\\":\\"param\\",\\"type\\":{\\"union\\":{\\"types\\":[{\\"fqn\\":\\"jsii-calc.union.IResolvable\\"},{\\"fqn\\":\\"jsii-calc.union.Resolvable\\"},{\\"fqn\\":\\"@scope/jsii-calc-lib.IFriendly\\"}]}}}]")] public static void UnionType(object param) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (param) + { + case Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable cast_ccaaac: + break; + case Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly cast_ccaaac: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_ccaaac: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(param)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}; received null", nameof(param)); + default: + throw new System.ArgumentException($"Expected argument {nameof(param)} to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.IResolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.Resolvable).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IFriendly).FullName}; received {param.GetType().FullName}", nameof(param)); + } + } InvokeStaticVoidMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.Union.ConsumesUnion), new System.Type[]{typeof(object)}, new object[]{param}); } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs --runtime-type-checking @@ -15,10 +15,46 @@ public object Bar { get => _bar; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case string cast_cd4240: + break; + case double cast_cd4240: + break; + case byte cast_cd4240: + break; + case decimal cast_cd4240: + break; + case float cast_cd4240: + break; + case int cast_cd4240: + break; + case long cast_cd4240: + break; + case sbyte cast_cd4240: + break; + case short cast_cd4240: + break; + case uint cast_cd4240: + break; + case ulong cast_cd4240: + break; + case ushort cast_cd4240: + break; + case Amazon.JSII.Tests.CalculatorNamespace.AllTypes cast_cd4240: + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypes).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: string, double, {typeof(Amazon.JSII.Tests.CalculatorNamespace.AllTypes).FullName}; received {value.GetType().FullName}", nameof(value)); + } + } _bar = value; } } private object? _foo; @@ -28,10 +64,44 @@ public object? Foo { get => _foo; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + switch (value) + { + case string cast_cd4240: + break; + case double cast_cd4240: + break; + case byte cast_cd4240: + break; + case decimal cast_cd4240: + break; + case float cast_cd4240: + break; + case int cast_cd4240: + break; + case long cast_cd4240: + break; + case sbyte cast_cd4240: + break; + case short cast_cd4240: + break; + case uint cast_cd4240: + break; + case ulong cast_cd4240: + break; + case ushort cast_cd4240: + break; + case null: + break; + default: + throw new System.ArgumentException($"Expected {nameof(value)} to be one of: string, double; received {value.GetType().FullName}", nameof(value)); + } + } _foo = value; } } } } `; exports[`Generated code for "jsii-calc": /dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicTypeUnion.cs.diff 1`] = ` --- dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicTypeUnion.cs --no-runtime-type-checking +++ dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicTypeUnion.cs --runtime-type-checking @@ -12,10 +12,30 @@ } [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.AggressiveInlining)] private static DeputyProps _MakeDeputyProps(params object[] union) { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_ef3ff7 = 0 ; __idx_ef3ff7 < union.Length ; __idx_ef3ff7++) + { + switch (union[__idx_ef3ff7]) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_0af1d4: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_0af1d4: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_0af1d4: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected argument {nameof(union)}[{__idx_ef3ff7}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(union)); + default: + throw new System.ArgumentException($"Expected argument {nameof(union)}[{__idx_ef3ff7}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {union[__idx_ef3ff7].GetType().FullName}", nameof(union)); + } + } + } return new DeputyProps(new object?[]{union}); } /// Used by jsii to construct an instance of this class from a Javascript-owned object reference /// The Javascript-owned object reference @@ -35,10 +55,30 @@ public virtual object[] Union { get => GetInstanceProperty()!; set { + if (Amazon.JSII.Runtime.Configuration.RuntimeTypeChecking) + { + for (var __idx_cd4240 = 0 ; __idx_cd4240 < value.Length ; __idx_cd4240++) + { + switch (value[__idx_cd4240]) + { + case Amazon.JSII.Tests.CalculatorNamespace.IStructA cast_e9c63e: + break; + case Amazon.JSII.Tests.CalculatorNamespace.IStructB cast_e9c63e: + break; + case Amazon.JSII.Runtime.Deputy.AnonymousObject cast_e9c63e: + // Not enough information to type-check... + break; + case null: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received null", nameof(value)); + default: + throw new System.ArgumentException($"Expected {nameof(value)}[{__idx_cd4240}] to be one of: {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructA).FullName}, {typeof(Amazon.JSII.Tests.CalculatorNamespace.IStructB).FullName}; received {value[__idx_cd4240].GetType().FullName}", nameof(value)); + } + } + } SetInstanceProperty(value); } } } } `;