diff --git a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj index 0d06ffbb13..171648cd2c 100644 --- a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj +++ b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Amazon.JSII.Analyzers.UnitTests.csproj @@ -4,6 +4,9 @@ netcoreapp3.1 false Amazon.JSII.Analyzers.UnitTests + + enable + true diff --git a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Helpers/DiagnosticVerifier.Helper.cs b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Helpers/DiagnosticVerifier.Helper.cs index de72e54f8d..4b3663ae48 100755 --- a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Helpers/DiagnosticVerifier.Helper.cs +++ b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Helpers/DiagnosticVerifier.Helper.cs @@ -34,7 +34,7 @@ public abstract partial class DiagnosticVerifier /// The language the source classes are in /// The analyzer to be run on the sources /// An IEnumerable of Diagnostics that surfaced in the source code, sorted by Location - private static Diagnostic[] GetSortedDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer) + private static Diagnostic[] GetSortedDiagnostics(string[] sources, string language, DiagnosticAnalyzer? analyzer) { return GetSortedDiagnosticsFromDocuments(analyzer, GetDocuments(sources, language)); } @@ -46,7 +46,7 @@ private static Diagnostic[] GetSortedDiagnostics(string[] sources, string langua /// The analyzer to run on the documents /// The Documents that the analyzer will be run on /// An IEnumerable of Diagnostics that surfaced in the source code, sorted by Location - protected static Diagnostic[] GetSortedDiagnosticsFromDocuments(DiagnosticAnalyzer analyzer, Document[] documents) + protected static Diagnostic[] GetSortedDiagnosticsFromDocuments(DiagnosticAnalyzer? analyzer, Document[] documents) { var projects = new HashSet(); foreach (var document in documents) @@ -162,7 +162,7 @@ private static Project CreateProject(string[] sources, string language = Languag solution = solution.AddDocument(documentId, newFileName, SourceText.From(source)); count++; } - return solution.GetProject(projectId); + return solution.GetProject(projectId)!; } #endregion } diff --git a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Verifiers/DiagnosticVerifier.cs b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Verifiers/DiagnosticVerifier.cs index 8a66157221..b5ea35d61b 100755 --- a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Verifiers/DiagnosticVerifier.cs +++ b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers.UnitTests/Verifiers/DiagnosticVerifier.cs @@ -16,7 +16,7 @@ public abstract partial class DiagnosticVerifier /// /// Get the CSharp analyzer being tested - to be implemented in non-abstract class /// - protected virtual DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() + protected virtual DiagnosticAnalyzer? GetCSharpDiagnosticAnalyzer() { return null; } @@ -24,7 +24,7 @@ protected virtual DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer() /// /// Get the Visual Basic analyzer being tested (C#) - to be implemented in non-abstract class /// - protected virtual DiagnosticAnalyzer GetBasicDiagnosticAnalyzer() + protected virtual DiagnosticAnalyzer? GetBasicDiagnosticAnalyzer() { return null; } @@ -84,7 +84,7 @@ protected void VerifyBasicDiagnostic(string[] sources, params DiagnosticResult[] /// The language of the classes represented by the source strings /// The analyzer to be run on the source code /// DiagnosticResults that should appear after the analyzer is run on the sources - private void VerifyDiagnostics(string[] sources, string language, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expected) + private void VerifyDiagnostics(string[] sources, string language, DiagnosticAnalyzer? analyzer, params DiagnosticResult[] expected) { var diagnostics = GetSortedDiagnostics(sources, language, analyzer); VerifyDiagnosticResults(diagnostics, analyzer, expected); @@ -100,7 +100,7 @@ private void VerifyDiagnostics(string[] sources, string language, DiagnosticAnal /// The Diagnostics found by the compiler after running the analyzer on the source code /// The analyzer that was being run on the sources /// Diagnostic Results that should have appeared in the code - private static void VerifyDiagnosticResults(IEnumerable actualResults, DiagnosticAnalyzer analyzer, params DiagnosticResult[] expectedResults) + private static void VerifyDiagnosticResults(IEnumerable actualResults, DiagnosticAnalyzer? analyzer, params DiagnosticResult[] expectedResults) { int expectedCount = expectedResults.Count(); int actualCount = actualResults.Count(); @@ -176,7 +176,7 @@ private static void VerifyDiagnosticResults(IEnumerable actualResult /// The diagnostic that was found in the code /// The Location of the Diagnostic found in the code /// The DiagnosticResultLocation that should have been found - private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagnostic diagnostic, Location actual, DiagnosticResultLocation expected) + private static void VerifyDiagnosticLocation(DiagnosticAnalyzer? analyzer, Diagnostic diagnostic, Location actual, DiagnosticResultLocation expected) { var actualSpan = actual.GetLineSpan(); @@ -217,15 +217,19 @@ private static void VerifyDiagnosticLocation(DiagnosticAnalyzer analyzer, Diagno /// The analyzer that this verifier tests /// The Diagnostics to be formatted /// The Diagnostics formatted as a string - private static string FormatDiagnostics(DiagnosticAnalyzer analyzer, params Diagnostic[] diagnostics) + private static string FormatDiagnostics(DiagnosticAnalyzer? analyzer, params Diagnostic[] diagnostics) { var builder = new StringBuilder(); for (int i = 0; i < diagnostics.Length; ++i) { builder.AppendLine("// " + diagnostics[i].ToString()); - var analyzerType = analyzer.GetType(); - var rules = analyzer.SupportedDiagnostics; + var analyzerType = analyzer?.GetType(); + if (analyzerType == null) + { + continue; + } + var rules = analyzer!.SupportedDiagnostics; foreach (var rule in rules) { diff --git a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers/JsiiOptionalAnalyzer.cs b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers/JsiiOptionalAnalyzer.cs index 957a093d44..7facb303d1 100644 --- a/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers/JsiiOptionalAnalyzer.cs +++ b/packages/@jsii/dotnet-analyzers/src/Amazon.JSII.Analyzers/JsiiOptionalAnalyzer.cs @@ -105,6 +105,10 @@ private static void AnalyzeNode(SyntaxNodeAnalysisContext context) /// true if the TypeInfo is related to a Jsii class, false otherwise private static bool IsJsiiClass(TypeInfo typeInfo) { + if (typeInfo.Type == null) + { + return false; + } var typeAttributes = typeInfo.Type.GetAttributes().ToArray(); return typeAttributes.Any(a => a.AttributeClass.Name == "JsiiClassAttribute"); } @@ -119,6 +123,10 @@ private static bool IsJsiiClass(TypeInfo typeInfo) /// true if the TypeInfo is related to a Jsii datatype, false otherwise private static bool IsJsiiDatatype(TypeInfo typeInfo) { + if (typeInfo.Type == null) + { + return false; + } var typeAttributes = typeInfo.Type.GetAttributes().ToArray(); return typeAttributes.Any(a => a.AttributeClass.Name == "JsiiByValueAttribute"); } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Amazon.JSII.JsonModel.UnitTests.csproj b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Amazon.JSII.JsonModel.UnitTests.csproj index bfa55bf1d6..03e37b0d36 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Amazon.JSII.JsonModel.UnitTests.csproj +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Amazon.JSII.JsonModel.UnitTests.csproj @@ -5,6 +5,9 @@ false Amazon.JSII.JsonModel.UnitTests Amazon.JSII.JsonModel.UnitTests + + enable + true diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs index 6779b2ef22..fcb7ca006e 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/AssemblyTests.cs @@ -107,7 +107,9 @@ public void ShouldThrowOnMissingName() { Assert.Throws(() => new Assembly ( +#pragma warning disable CS8625 name: null, +#pragma warning restore CS8625 description: "", homepage: "", repository: new Assembly.AssemblyRepository(type: "", url: ""), @@ -140,7 +142,9 @@ public void ShouldThrowOnMissingVersion() repository: new Assembly.AssemblyRepository(type: "", url: ""), author: new Person(name: "", roles: new string[] { }), fingerprint: "", +#pragma warning disable CS8625 version: null, +#pragma warning restore CS8625 license: "", targets: new AssemblyTargets(new AssemblyTargets.DotNetTarget( @namespace: "Dot.Net.Namespace", @@ -375,7 +379,7 @@ public void ShouldDeserializeAllMembers() Assert.Empty(actual.Types); Assert.Empty(actual.Dependencies); Assert.Empty(actual.Bundled); - Assert.Equal("hello", actual.Docs.Summary); + Assert.Equal("hello", actual.Docs?.Summary); } [Fact(DisplayName = Prefix + nameof(ShouldDeserializeAllMembersWithNoTypes))] @@ -411,7 +415,7 @@ public void ShouldDeserializeAllMembersWithNoTypes() Assert.Null(actual.Types); Assert.Empty(actual.Dependencies); Assert.Empty(actual.Bundled); - Assert.Equal("hello", actual.Docs.Summary); + Assert.Equal("hello", actual.Docs?.Summary); } @@ -455,19 +459,19 @@ public void ShouldDeserializeAllMembersWithDotNetTarget() Assert.Equal("jsii/0.9.0", actual.Schema, ignoreLineEndingDifferences: true); Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true); - AssemblyTargets.DotNetTarget dotNetTarget = actual.Targets.DotNet; + AssemblyTargets.DotNetTarget? dotNetTarget = actual.Targets?.DotNet; Assert.NotNull(dotNetTarget); - Assert.Equal("Dot.Net.Namespace", dotNetTarget.Namespace); - Assert.Equal("Dot.Net.PackageId", dotNetTarget.PackageId); - Assert.True(dotNetTarget.SignAssembly); - Assert.Equal("key.snk", dotNetTarget.AssemblyOriginatorKeyFile); - Assert.Equal("http://www.example.com/icon.png", dotNetTarget.IconUrl); + Assert.Equal("Dot.Net.Namespace", dotNetTarget?.Namespace); + Assert.Equal("Dot.Net.PackageId", dotNetTarget?.PackageId); + Assert.True(dotNetTarget?.SignAssembly); + Assert.Equal("key.snk", dotNetTarget?.AssemblyOriginatorKeyFile); + Assert.Equal("http://www.example.com/icon.png", dotNetTarget?.IconUrl); Assert.Equal("myVersion", actual.Version, ignoreLineEndingDifferences: true); Assert.Empty(actual.Types); Assert.Empty(actual.Dependencies); Assert.Empty(actual.Bundled); - Assert.Equal("hello", actual.Docs.Summary); + Assert.Equal("hello", actual.Docs?.Summary); } [Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingName))] diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/ClassTypeTests.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/ClassTypeTests.cs index e266fae302..5e25c3a8c2 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/ClassTypeTests.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/ClassTypeTests.cs @@ -1,4 +1,4 @@ -using Amazon.JSII.JsonModel.Spec; +using Amazon.JSII.JsonModel.Spec; using Newtonsoft.Json; using System; using System.Linq; @@ -56,7 +56,9 @@ public void ShouldThrowOnMissingFullyQualifiedName() { Assert.Throws(() => new ClassType ( +#pragma warning disable CS8625 fullyQualifiedName: null, +#pragma warning restore CS8625 assembly: "myModule", name: "myName", @namespace: "myNamespace", @@ -76,7 +78,9 @@ public void ShouldThrowOnMissingAssembly() Assert.Throws(() => new ClassType ( fullyQualifiedName: "myFqn", +#pragma warning disable CS8625 assembly: null, +#pragma warning restore CS8625 name: "myName", @namespace: "myNamespace", isAbstract: true, @@ -96,7 +100,9 @@ public void ShouldThrowOnMissingName() ( fullyQualifiedName: "myFqn", assembly: "myModule", +#pragma warning disable CS8625 name: null, +#pragma warning restore CS8625 @namespace: "myNamespace", isAbstract: true, docs: new Docs(), @@ -388,7 +394,7 @@ public void ShouldDeserializeAllMembers() Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true); Assert.Equal("myNamespace", actual.Namespace, ignoreLineEndingDifferences: true); Assert.Equal(TypeKind.Class, actual.Kind); - Assert.Equal("hello", actual.Docs.Summary); + Assert.Equal("hello", actual.Docs?.Summary); } [Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingFullyQualifiedName))] @@ -623,8 +629,8 @@ public void DeserializesAsyncMethod() ClassType actual = JsonConvert.DeserializeObject(json); - Assert.True(actual.Methods.Length == 1); - Assert.True(actual.Methods[0]?.IsAsync); + Assert.Equal(1, actual.Methods?.Length); + Assert.True(actual.Methods?[0]?.IsAsync); } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionKindTests.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionKindTests.cs index e1c058e6cb..84885bb1ed 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionKindTests.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionKindTests.cs @@ -1,4 +1,4 @@ -using Amazon.JSII.JsonModel.Spec; +using Amazon.JSII.JsonModel.Spec; using Newtonsoft.Json; using System; using Xunit; @@ -41,7 +41,9 @@ public void ShouldDeserialize(string kind, CollectionKind expected) [Fact(DisplayName = Prefix + nameof(ShouldThrowOnNull))] public void ShouldThrowOnNull() { +#pragma warning disable CS8625 Assert.Throws(() => JsonConvert.DeserializeObject(null)); +#pragma warning restore CS8625 } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionTypeReferenceTests.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionTypeReferenceTests.cs index 2800b66e7f..4a6450174d 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionTypeReferenceTests.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/CollectionTypeReferenceTests.cs @@ -1,4 +1,4 @@ -using Amazon.JSII.JsonModel.Spec; +using Amazon.JSII.JsonModel.Spec; using Newtonsoft.Json; using System; using Xunit; @@ -36,7 +36,9 @@ public void ShouldSerializeAllMembers() [Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingElementType))] public void ShouldThrowOnMissingElementType() { +#pragma warning disable CS8625 Assert.Throws(() => new CollectionTypeReference(CollectionKind.Array, null)); +#pragma warning restore CS8625 } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/EnumMemberTests.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/EnumMemberTests.cs index c3e43b6224..e56cca7a08 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/EnumMemberTests.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel.UnitTests/Spec/EnumMemberTests.cs @@ -1,4 +1,4 @@ -using Amazon.JSII.JsonModel.Spec; +using Amazon.JSII.JsonModel.Spec; using Newtonsoft.Json; using System; using Xunit; @@ -30,7 +30,9 @@ public void ShouldSerializeAllMembers() [Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingName))] public void ShouldThrowOnMissingName() { +#pragma warning disable CS8625 Assert.Throws(() => new EnumMember(null, new Docs())); +#pragma warning restore CS8625 } [Fact(DisplayName = Prefix + nameof(ShouldNotSerializeMissingDocs))] @@ -61,8 +63,8 @@ public void ShouldDeserializeAllMembers() EnumMember actual = JsonConvert.DeserializeObject(json); - Assert.Equal("myName", actual.Name, ignoreLineEndingDifferences: true); - Assert.Equal("hello", actual.Docs.Summary); + Assert.Equal("myName", actual?.Name, ignoreLineEndingDifferences: true); + Assert.Equal("hello", actual?.Docs?.Summary); } [Fact(DisplayName = Prefix + nameof(ShouldThrowOnMissingName))] diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj index 8e82179c1a..8c97657b68 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Amazon.JSII.JsonModel.csproj @@ -6,6 +6,9 @@ Amazon.JSII.JsonModel .NET JsonModel for JSII icon.png + + enable + true diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Callback.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Callback.cs index 278c6d6237..64edb813fc 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Callback.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Callback.cs @@ -10,10 +10,10 @@ public class Callback public Callback ( string callbackId, - string cookie = null, - InvokeRequest invoke = null, - GetRequest get = null, - SetRequest set = null + string? cookie = null, + InvokeRequest? invoke = null, + GetRequest? get = null, + SetRequest? set = null ) { CallbackId = callbackId ?? throw new ArgumentNullException(nameof(callbackId)); @@ -27,15 +27,15 @@ public Callback public string CallbackId { get; } [JsonProperty("cookie", NullValueHandling = NullValueHandling.Ignore)] - public string Cookie { get; } + public string? Cookie { get; } [JsonProperty("invoke", NullValueHandling = NullValueHandling.Ignore)] - public InvokeRequest Invoke { get; } + public InvokeRequest? Invoke { get; } [JsonProperty("get", NullValueHandling = NullValueHandling.Ignore)] - public GetRequest Get { get; } + public GetRequest? Get { get; } [JsonProperty("set", NullValueHandling = NullValueHandling.Ignore)] - public SetRequest Set { get; } + public SetRequest? Set { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Override.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Override.cs index acb2e71e99..bfa1ebcf7f 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Override.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Override.cs @@ -7,9 +7,9 @@ public class Override { public Override ( - string method = null, - string property = null, - string cookie = null + string? method = null, + string? property = null, + string? cookie = null ) { Method = method; @@ -18,12 +18,12 @@ public Override } [JsonProperty("method", NullValueHandling = NullValueHandling.Ignore)] - public string Method { get; } + public string? Method { get; } [JsonProperty("property", NullValueHandling = NullValueHandling.Ignore)] - public string Property { get; } + public string? Property { get; } [JsonProperty("cookie", NullValueHandling = NullValueHandling.Ignore)] - public string Cookie { get; } + public string? Cookie { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/BeginRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/BeginRequest.cs index e33fe6a284..c1dd77bacc 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/BeginRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/BeginRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class BeginRequest : IKernelRequest { - public BeginRequest(ObjectReference objectReference, string method, object[] arguments = null) + public BeginRequest(ObjectReference objectReference, string method, object?[]? arguments = null) { ObjectReference = objectReference ?? throw new ArgumentNullException(nameof(objectReference)); Method = method ?? throw new ArgumentNullException(nameof(method)); @@ -23,6 +23,6 @@ public BeginRequest(ObjectReference objectReference, string method, object[] arg public string Method { get; } [JsonProperty("args", NullValueHandling = NullValueHandling.Ignore)] - public object[] Arguments { get; } + public object?[]? Arguments { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CompleteRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CompleteRequest.cs index f9b13eb149..5cf84ffc0b 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CompleteRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CompleteRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class CompleteRequest : IKernelRequest { - public CompleteRequest(string callbackId, string error = null, object result = null) + public CompleteRequest(string callbackId, string? error = null, object? result = null) { CallbackId = callbackId ?? throw new ArgumentNullException(nameof(callbackId)); Error = error; @@ -20,9 +20,9 @@ public CompleteRequest(string callbackId, string error = null, object result = n public string CallbackId { get; } [JsonProperty("err", NullValueHandling = NullValueHandling.Ignore)] - public string Error { get; } + public string? Error { get; } [JsonProperty("result", NullValueHandling = NullValueHandling.Ignore)] - public object Result { get; } + public object? Result { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CreateRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CreateRequest.cs index f36ac4bae8..35b465af5e 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CreateRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/CreateRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class CreateRequest : IKernelRequest { - public CreateRequest(string fullyQualifiedName, object[] arguments = null, Override[] overrides = null, string[] interfaces = null) + public CreateRequest(string fullyQualifiedName, object?[]? arguments = null, Override[]? overrides = null, string[]? interfaces = null) { FullyQualifiedName = fullyQualifiedName ?? throw new ArgumentNullException(nameof(fullyQualifiedName)); Arguments = arguments; @@ -21,7 +21,7 @@ public CreateRequest(string fullyQualifiedName, object[] arguments = null, Overr public string FullyQualifiedName { get; } [JsonProperty("args", NullValueHandling = NullValueHandling.Ignore)] - public object[] Arguments { get; } + public object?[]? Arguments { get; } [JsonProperty("overrides", NullValueHandling = NullValueHandling.Ignore)] public Override[] Overrides { get; } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/InvokeRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/InvokeRequest.cs index aaf2f6698e..17c953ed29 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/InvokeRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/InvokeRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class InvokeRequest : IKernelRequest { - public InvokeRequest(ObjectReference objectReference, string method, object[] arguments = null) + public InvokeRequest(ObjectReference objectReference, string method, object?[]? arguments = null) { ObjectReference = objectReference ?? throw new ArgumentNullException(nameof(objectReference)); Method = method ?? throw new ArgumentNullException(nameof(method)); @@ -23,6 +23,6 @@ public InvokeRequest(ObjectReference objectReference, string method, object[] ar public string Method { get; } [JsonProperty("args", NullValueHandling = NullValueHandling.Ignore)] - public object[] Arguments { get; } + public object?[]? Arguments { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/SetRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/SetRequest.cs index 47ca9c31bd..a67162e77d 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/SetRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/SetRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class SetRequest : IKernelRequest { - public SetRequest(ObjectReference objectReference, string property, object value) + public SetRequest(ObjectReference objectReference, string property, object? value) { ObjectReference = objectReference ?? throw new ArgumentNullException(nameof(objectReference)); Property = property ?? throw new ArgumentNullException(nameof(property)); @@ -23,6 +23,6 @@ public SetRequest(ObjectReference objectReference, string property, object value public string Property { get; } [JsonProperty("value")] - public object Value { get; } + public object? Value { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticInvokeRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticInvokeRequest.cs index fb939a6c11..8a5785d6b6 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticInvokeRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticInvokeRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class StaticInvokeRequest : IKernelRequest { - public StaticInvokeRequest(string fullyQualifiedName, string method, object[] arguments = null) + public StaticInvokeRequest(string fullyQualifiedName, string method, object?[]? arguments = null) { FullyQualifiedName = fullyQualifiedName ?? throw new ArgumentNullException(nameof(fullyQualifiedName)); Method = method ?? throw new ArgumentNullException(nameof(method)); @@ -23,6 +23,6 @@ public StaticInvokeRequest(string fullyQualifiedName, string method, object[] ar public string Method { get; } [JsonProperty("args", NullValueHandling = NullValueHandling.Ignore)] - public object[] Arguments { get; } + public object?[]? Arguments { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticSetRequest.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticSetRequest.cs index 51b0991cb8..3291c4f8f6 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticSetRequest.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Request/StaticSetRequest.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Request [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class StaticSetRequest : IKernelRequest { - public StaticSetRequest(string fullyQualifiedName, string property, object value) + public StaticSetRequest(string fullyQualifiedName, string property, object? value) { FullyQualifiedName = fullyQualifiedName ?? throw new ArgumentNullException(nameof(fullyQualifiedName)); Property = property ?? throw new ArgumentNullException(nameof(property)); @@ -23,6 +23,6 @@ public StaticSetRequest(string fullyQualifiedName, string property, object value public string Property { get; } [JsonProperty("value")] - public object Value { get; } + public object? Value { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/ErrorResponse.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/ErrorResponse.cs index f7d56dd32e..c2369d8cb7 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/ErrorResponse.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/ErrorResponse.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Api.Response [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class ErrorResponse { - public ErrorResponse(string error, string stack = null) + public ErrorResponse(string error, string? stack = null) { Error = error ?? throw new ArgumentNullException(nameof(error)); Stack = stack; @@ -16,6 +16,6 @@ public ErrorResponse(string error, string stack = null) public string Error { get; } [JsonProperty("stack", NullValueHandling = NullValueHandling.Ignore)] - public string Stack { get; } + public string? Stack { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/GetResponse.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/GetResponse.cs index e0335e4b7f..e40f1ccc9d 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/GetResponse.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/GetResponse.cs @@ -5,12 +5,12 @@ namespace Amazon.JSII.JsonModel.Api.Response [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class GetResponse : IKernelResponse { - public GetResponse(object value) + public GetResponse(object? value) { Value = value; } [JsonProperty("value")] - public object Value { get; } + public object? Value { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/InvokeResponse.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/InvokeResponse.cs index acd3f9dae0..1661d80f74 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/InvokeResponse.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/InvokeResponse.cs @@ -5,12 +5,12 @@ namespace Amazon.JSII.JsonModel.Api.Response [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class InvokeResponse : IKernelResponse { - public InvokeResponse(object result = null) + public InvokeResponse(object? result = null) { Result = result; } [JsonProperty("result", NullValueHandling = NullValueHandling.Ignore)] - public object Result { get; } + public object? Result { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/NamingResponse.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/NamingResponse.cs index 339abc627d..144f4ddccd 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/NamingResponse.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Api/Response/NamingResponse.cs @@ -18,7 +18,7 @@ public NamingResponse(NamingData naming) [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class NamingData { - public NamingData(DotNetNaming dotnet, IDictionary others = null) + public NamingData(DotNetNaming dotnet, IDictionary? others = null) { DotNet = dotnet ?? throw new ArgumentNullException(nameof(dotnet)); } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs index 4a77f4ee16..26e8f778b9 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeConverter.cs @@ -20,12 +20,12 @@ public override bool CanConvert(System.Type objectType) return objectType.IsAssignableFrom(typeof(EnumType)) || objectType.IsAssignableFrom(typeof(ClassType)); } - public override object ReadJson(JsonReader reader, System.Type objectType, object existingValue, JsonSerializer serializer) + public override object? ReadJson(JsonReader reader, System.Type objectType, object? existingValue, JsonSerializer serializer) { throw new NotImplementedException(); } - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) { Spec.Type type = value as Spec.Type ?? throw new ArgumentException($"{value} is not a jsii Type", nameof(value)); diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeDictionaryConverter.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeDictionaryConverter.cs index 31bcaa5128..9176b8250f 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeDictionaryConverter.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/TypeDictionaryConverter.cs @@ -16,14 +16,14 @@ public override bool CanConvert(Type objectType) throw new NotImplementedException(); } - public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) + public override object? ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) { var untypedDictionary = JObject.Load(reader); return untypedDictionary.Properties().ToDictionary(p => p.Name, p => Util.ConvertToDerivedType(p.Value)); } - public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) { throw new NotImplementedException(); } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/Util.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/Util.cs index f86074efbe..e67d47d375 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/Util.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Converters/Util.cs @@ -21,9 +21,9 @@ internal static Spec.Type ConvertToDerivedType(JToken token) return kind switch { - TypeKind.Enum => (Spec.Type) token.ToObject(), - TypeKind.Class => token.ToObject(), - TypeKind.Interface => token.ToObject(), + TypeKind.Enum => (Spec.Type) token.ToObject()!, + TypeKind.Class => token.ToObject()!, + TypeKind.Interface => token.ToObject()!, _ => throw new ArgumentException($"Unknown kind {kind} on type {token.ToString(Formatting.Indented)}", nameof(token)) }; } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/JsonDictionaryBase.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/JsonDictionaryBase.cs index 9cf7e0ccf4..9a1a7c2d40 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/JsonDictionaryBase.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/JsonDictionaryBase.cs @@ -4,6 +4,7 @@ namespace Amazon.JSII.JsonModel { public abstract class JsonDictionaryBase : IDictionary + where TKey : notnull { private readonly IDictionary _members = new Dictionary(); diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs index bcb6bc7fa8..04651edfb9 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Assembly.cs @@ -34,13 +34,13 @@ public Assembly string fingerprint, string version, string license, - AssemblyTargets targets = null, - IDictionary dependencies = null, - Person[] contributors = null, - IDictionary bundled = null, - IDictionary types = null, - Docs docs = null, - Readme readme = null + AssemblyTargets? targets = null, + IDictionary? dependencies = null, + Person[]? contributors = null, + IDictionary? bundled = null, + IDictionary? types = null, + Docs? docs = null, + Readme? readme = null ): base(targets, dependencies) { Name = name ?? throw new ArgumentNullException(nameof(name)); @@ -86,19 +86,19 @@ public Assembly public string License { get; } [JsonProperty("contributors", NullValueHandling = NullValueHandling.Ignore)] - public Person[] Contributors { get; } + public Person[]? Contributors { get; } [JsonProperty("bundled", NullValueHandling = NullValueHandling.Ignore)] - public IDictionary Bundled { get; } + public IDictionary? Bundled { get; } [JsonProperty("types", ItemConverterType = typeof(TypeConverter))] [JsonConverter(typeof(TypeDictionaryConverter))] - public IDictionary Types { get; } + public IDictionary? Types { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } [JsonProperty("readme", NullValueHandling = NullValueHandling.Ignore)] - public Readme Readme { get; } + public Readme? Readme { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs index 9e9ad114f0..6d35fcf1d2 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/AssemblyTargets.cs @@ -7,7 +7,7 @@ namespace Amazon.JSII.JsonModel.Spec [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class AssemblyTargets { - public AssemblyTargets(DotNetTarget dotnet, IDictionary others = null) + public AssemblyTargets(DotNetTarget dotnet, IDictionary? others = null) { DotNet = dotnet ?? throw new ArgumentNullException(nameof(dotnet)); } @@ -22,11 +22,11 @@ public DotNetTarget ( string @namespace, string packageId, - string title = null, + string? title = null, bool signAssembly = false, - string assemblyOriginatorKeyFile = null, - string iconUrl = null, - string versionSuffix = null + string? assemblyOriginatorKeyFile = null, + string? iconUrl = null, + string? versionSuffix = null ) { Namespace = @namespace ?? throw new ArgumentNullException(nameof(@namespace)); @@ -51,19 +51,19 @@ public DotNetTarget public string PackageId { get; } [JsonProperty("title", NullValueHandling = NullValueHandling.Ignore)] - public string Title { get; } + public string? Title { get; } [JsonProperty("signAssembly", NullValueHandling = NullValueHandling.Ignore)] public bool SignAssembly { get; } [JsonProperty("assemblyOriginatorKeyFile", NullValueHandling = NullValueHandling.Ignore)] - public string AssemblyOriginatorKeyFile { get; } + public string? AssemblyOriginatorKeyFile { get; } [JsonProperty("iconUrl", NullValueHandling = NullValueHandling.Ignore)] - public string IconUrl { get; } + public string? IconUrl { get; } [JsonProperty("versionSuffix", NullValueHandling = NullValueHandling.Ignore)] - public string VersionSuffix { get; } + public string? VersionSuffix { get; } } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Callable.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Callable.cs index be517a161c..1a0b66a8db 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Callable.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Callable.cs @@ -7,11 +7,11 @@ public abstract class Callable : IDocumentable, IOverridable { protected Callable ( - Parameter[] parameters = null, + Parameter[]? parameters = null, bool isProtected = false, bool isVariadic = false, - string overrides = null, - Docs docs = null + string? overrides = null, + Docs? docs = null ) { Parameters = parameters; @@ -22,7 +22,7 @@ protected Callable } [JsonProperty("parameters", NullValueHandling = NullValueHandling.Ignore)] - public Parameter[] Parameters { get; } + public Parameter[]? Parameters { get; } [JsonProperty("protected", NullValueHandling = NullValueHandling.Ignore)] public bool IsProtected { get; } @@ -31,9 +31,9 @@ protected Callable public bool IsVariadic { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } [JsonProperty("overrides", NullValueHandling = NullValueHandling.Ignore)] - public string Overrides { get; } + public string? Overrides { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/ClassType.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/ClassType.cs index 3c9cd6a717..83e0679ad4 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/ClassType.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/ClassType.cs @@ -15,16 +15,16 @@ public ClassType // ClassType properties bool isAbstract = false, - string @namespace = null, + string? @namespace = null, // Type properties - Docs docs = null, + Docs? docs = null, // ClassType properties - string @base = null, - Initializer initializer = null, - Property[] properties = null, - Method[] methods = null, - string[] interfaces = null + string? @base = null, + Initializer? initializer = null, + Property[]? properties = null, + Method[]? methods = null, + string[]? interfaces = null ) : base ( @@ -49,18 +49,18 @@ public ClassType public bool IsAbstract { get; } [JsonProperty("base", NullValueHandling = NullValueHandling.Ignore)] - public string Base { get; } + public string? Base { get; } [JsonProperty("initializer", NullValueHandling = NullValueHandling.Ignore)] - public Initializer Initializer { get; } + public Initializer? Initializer { get; } [JsonProperty("properties", NullValueHandling = NullValueHandling.Ignore)] - public Property[] Properties { get; } + public Property[]? Properties { get; } [JsonProperty("methods", NullValueHandling = NullValueHandling.Ignore)] - public Method[] Methods { get; } + public Method[]? Methods { get; } [JsonProperty("interfaces", NullValueHandling = NullValueHandling.Ignore)] - public string[] Interfaces { get; } + public string[]? Interfaces { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs index db5e4927c7..27d0ffc313 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/DependencyRoot.cs @@ -7,8 +7,8 @@ public abstract class DependencyRoot { public DependencyRoot ( - AssemblyTargets targets = null, - IDictionary dependencies = null + AssemblyTargets? targets = null, + IDictionary? dependencies = null ) { Targets = targets; @@ -16,9 +16,9 @@ public DependencyRoot } [JsonProperty("dependencies", NullValueHandling = NullValueHandling.Ignore)] - public IDictionary Dependencies { get; } + public IDictionary? Dependencies { get; } [JsonProperty("targets")] - public AssemblyTargets Targets { get; } + public AssemblyTargets? Targets { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Docs.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Docs.cs index 1d020f8bdd..60a71aeaa5 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Docs.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Docs.cs @@ -8,16 +8,16 @@ public class Docs { public Docs ( - string summary = null, - string remarks = null, - string deprecated = null, - string returns = null, + string? summary = null, + string? remarks = null, + string? deprecated = null, + string? returns = null, Stability? stability = null, - string example = null, - string see = null, + string? example = null, + string? see = null, bool? subclassable = null, - string @default = null, - IDictionary custom = null + string? @default = null, + IDictionary? custom = null ) { Summary = summary; @@ -33,31 +33,31 @@ public Docs } [JsonProperty("summary", NullValueHandling = NullValueHandling.Ignore)] - public string Summary { get; } + public string? Summary { get; } [JsonProperty("remarks", NullValueHandling = NullValueHandling.Ignore)] - public string Remarks { get; } + public string? Remarks { get; } [JsonProperty("deprecated", NullValueHandling = NullValueHandling.Ignore)] - public string Deprecated { get; } + public string? Deprecated { get; } [JsonProperty("returns", NullValueHandling = NullValueHandling.Ignore)] - public string Returns { get; } + public string? Returns { get; } [JsonProperty("stability", NullValueHandling = NullValueHandling.Ignore)] public Stability? Stability { get; } [JsonProperty("example", NullValueHandling = NullValueHandling.Ignore)] - public string Example { get; } + public string? Example { get; } [JsonProperty("see", NullValueHandling = NullValueHandling.Ignore)] - public string See { get; } + public string? See { get; } [JsonProperty("subclassable", NullValueHandling = NullValueHandling.Ignore)] public bool? Subclassable { get; } [JsonProperty("default", NullValueHandling = NullValueHandling.Ignore)] - public string Default { get; } + public string? Default { get; } [JsonProperty("custom", NullValueHandling = NullValueHandling.Ignore)] public IDictionary Custom; diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumMember.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumMember.cs index b134d90483..aa446af3c2 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumMember.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumMember.cs @@ -6,7 +6,7 @@ namespace Amazon.JSII.JsonModel.Spec [JsonObject(MemberSerialization = MemberSerialization.OptIn)] public class EnumMember : IDocumentable { - public EnumMember(string name, Docs docs = null) + public EnumMember(string name, Docs? docs = null) { Name = name ?? throw new ArgumentNullException(nameof(name)); Docs = docs; @@ -16,6 +16,6 @@ public EnumMember(string name, Docs docs = null) public string Name { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumType.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumType.cs index 43798245bd..5bfa924c1e 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumType.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/EnumType.cs @@ -16,9 +16,9 @@ public EnumType // EnumType properties EnumMember[] members, - string @namespace = null, + string? @namespace = null, // Type properties - Docs docs = null + Docs? docs = null ) : base ( diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IDocumentable.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IDocumentable.cs index 81099ab756..bf1e39e22f 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IDocumentable.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IDocumentable.cs @@ -2,6 +2,6 @@ { public interface IDocumentable { - Docs Docs { get; } + Docs? Docs { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IOverridable.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IOverridable.cs index 448104d875..aedf6eee1a 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IOverridable.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/IOverridable.cs @@ -2,6 +2,6 @@ { public interface IOverridable { - string Overrides { get; } + string? Overrides { get; } } } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Initializer.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Initializer.cs index f537f631de..ffd001f4b6 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Initializer.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Initializer.cs @@ -7,11 +7,11 @@ public class Initializer : Callable { public Initializer ( - Parameter[] parameters = null, + Parameter[]? parameters = null, bool isProtected = false, bool isVariadic = false, - string overrides = null, - Docs docs = null + string? overrides = null, + Docs? docs = null ): base( parameters: parameters, isProtected: isProtected, diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/InterfaceType.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/InterfaceType.cs index 41e10338a9..05a6467316 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/InterfaceType.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/InterfaceType.cs @@ -11,15 +11,15 @@ public InterfaceType string fullyQualifiedName, string assembly, string name, - string @namespace = null, + string? @namespace = null, // Type properties - Docs docs = null, + Docs? docs = null, // InterfaceType properties - string[] interfaces = null, - Method[] methods = null, - Property[] properties = null, + string[]? interfaces = null, + Method[]? methods = null, + Property[]? properties = null, bool isDataType = false ) : base ( @@ -38,13 +38,13 @@ public InterfaceType } [JsonProperty("interfaces", NullValueHandling = NullValueHandling.Ignore)] - public string[] Interfaces { get; } + public string[]? Interfaces { get; } [JsonProperty("methods", NullValueHandling = NullValueHandling.Ignore)] - public Method[] Methods { get; } + public Method[]? Methods { get; } [JsonProperty("properties", NullValueHandling = NullValueHandling.Ignore)] - public Property[] Properties { get; } + public Property[]? Properties { get; } [JsonProperty("datatype", NullValueHandling = NullValueHandling.Ignore)] public bool IsDataType { get; } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Method.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Method.cs index b2f5f039c9..e83f0638ae 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Method.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Method.cs @@ -8,15 +8,15 @@ public class Method : Callable public Method ( string name, - OptionalValue returns = null, - Parameter[] parameters = null, + OptionalValue? returns = null, + Parameter[]? parameters = null, bool isAbstract = false, bool isAsync = false, bool isProtected = false, bool isVariadic = false, bool isStatic = false, - string overrides = null, - Docs docs = null + string? overrides = null, + Docs? docs = null ): base ( parameters: parameters, @@ -37,7 +37,7 @@ public Method public string Name { get; } [JsonProperty("returns", NullValueHandling = NullValueHandling.Ignore)] - public OptionalValue Returns { get; } + public OptionalValue? Returns { get; } [JsonProperty("abstract", NullValueHandling = NullValueHandling.Ignore)] public bool IsAbstract { get; } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs index 7ffec179ef..1754907357 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/PackageVersion.cs @@ -10,8 +10,8 @@ public class PackageVersion: DependencyRoot public PackageVersion ( string version, - AssemblyTargets targets = null, - IDictionary dependencies = null + AssemblyTargets? targets = null, + IDictionary? dependencies = null ): base(targets, dependencies) { Version = version ?? throw new ArgumentNullException(nameof(version)); diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Parameter.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Parameter.cs index 132dd5e925..d05c81280f 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Parameter.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Parameter.cs @@ -12,7 +12,7 @@ public Parameter TypeReference type, bool isOptional = false, bool isVariadic = false, - Docs docs = null + Docs? docs = null ): base(type: type, isOptional: isOptional) { Name = name ?? throw new ArgumentNullException(nameof(name)); @@ -27,6 +27,6 @@ public Parameter public bool IsVariadic { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs index d4dbaea00e..a710f4c677 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Person.cs @@ -10,8 +10,8 @@ public Person ( string name, string[] roles, - string email = null, - string url = null, + string? email = null, + string? url = null, bool isOrganization = false ) { @@ -29,10 +29,10 @@ public Person public string[] Roles { get; } [JsonProperty("email", NullValueHandling = NullValueHandling.Ignore)] - public string Email { get; } + public string? Email { get; } [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] - public string Url { get; } + public string? Url { get; } [JsonProperty("organization", NullValueHandling = NullValueHandling.Ignore)] public bool IsOrganization { get; } diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Property.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Property.cs index 0bd08fc087..73df010e2c 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Property.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Property.cs @@ -16,8 +16,8 @@ public Property bool isAbstract = false, bool isStatic = false, bool isConstant = false, - string overrides = null, - Docs docs = null + string? overrides = null, + Docs? docs = null ): base(type: type, isOptional: isOptional) { Name = name ?? throw new ArgumentNullException(nameof(name)); @@ -49,9 +49,9 @@ public Property public bool IsStatic { get; } [JsonProperty("overrides", NullValueHandling = NullValueHandling.Ignore)] - public string Overrides { get; } + public string? Overrides { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Type.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Type.cs index e4fcd2797f..3e5b1a1d86 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Type.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/Type.cs @@ -11,9 +11,9 @@ protected Type string fullyQualifiedName, string assembly, string name, - string @namespace, + string? @namespace, TypeKind kind, - Docs docs = null + Docs? docs = null ) { FullyQualifiedName = fullyQualifiedName ?? throw new ArgumentNullException(nameof(fullyQualifiedName)); @@ -34,13 +34,13 @@ protected Type public string Name { get; } [JsonProperty("namespace", NullValueHandling = NullValueHandling.Ignore)] - public string Namespace { get; } + public string? Namespace { get; } [JsonProperty("kind", DefaultValueHandling = DefaultValueHandling.Include)] public TypeKind Kind { get; } [JsonProperty("docs", NullValueHandling = NullValueHandling.Ignore)] - public Docs Docs { get; } + public Docs? Docs { get; } [JsonIgnore] public string QualifiedNamespace => this.Assembly + (this.Namespace != null ? $".{this.Namespace}" : ""); diff --git a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/TypeReference.cs b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/TypeReference.cs index 1e27ec877c..04da801a14 100644 --- a/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/TypeReference.cs +++ b/packages/@jsii/dotnet-jsonmodel/src/Amazon.JSII.JsonModel/Spec/TypeReference.cs @@ -7,10 +7,10 @@ public class TypeReference { public TypeReference ( - string fullyQualifiedName = null, + string? fullyQualifiedName = null, PrimitiveType? primitive = null, - CollectionTypeReference collection = null, - UnionTypeReference union = null + CollectionTypeReference? collection = null, + UnionTypeReference? union = null ) { FullyQualifiedName = fullyQualifiedName; @@ -20,15 +20,15 @@ public TypeReference } [JsonProperty("fqn", NullValueHandling = NullValueHandling.Ignore)] - public string FullyQualifiedName { get; } + public string? FullyQualifiedName { get; } [JsonProperty("primitive", NullValueHandling = NullValueHandling.Ignore)] public PrimitiveType? Primitive { get; } [JsonProperty("collection", NullValueHandling = NullValueHandling.Ignore)] - public CollectionTypeReference Collection { get; } + public CollectionTypeReference? Collection { get; } [JsonProperty("union", NullValueHandling = NullValueHandling.Ignore)] - public UnionTypeReference Union { get; } + public UnionTypeReference? Union { get; } } } \ No newline at end of file diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj index 294666587f..3bfefa0e37 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/Amazon.JSII.Runtime.IntegrationTests.csproj @@ -4,6 +4,9 @@ netcoreapp3.1 false + + enable + true diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs index 1109d2f3b5..49d8f1fbc2 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/ComplianceTests.cs @@ -61,7 +61,7 @@ public void PrimitiveTypes() // json types.JsonProperty = JObject.Parse(@"{ ""Foo"": { ""Bar"": 123 } }"); - Assert.Equal(123d, types.JsonProperty["Foo"]["Bar"].Value()); + Assert.Equal(123d, types.JsonProperty["Foo"]?["Bar"]?.Value()); } [Fact(DisplayName = Prefix + nameof(Dates))] @@ -508,7 +508,7 @@ public override string TheProperty class InterfaceWithProperties : DeputyBase, IInterfaceWithProperties { - string _x; + string? _x; public string ReadOnlyString => "READ_ONLY_STRING"; @@ -863,7 +863,9 @@ public void NullShouldBeTreatedAsUndefined() obj.GiveMeUndefinedInsideAnObject(new NullShouldBeTreatedAsUndefinedData { ThisShouldBeUndefined = null, +#pragma warning disable CS8625 ArrayWithThreeElementsAndUndefinedAsSecondArgument = new object[] {"hello", null, "world"} +#pragma warning restore CS8625 }); // property @@ -888,7 +890,9 @@ public void OptionalAndVariadicArgumentsTest() var variadicClassNoParams = new VariadicMethod(); // Array with null value in constructor params +#pragma warning disable CS8625 new VariadicMethod(null); +#pragma warning restore CS8625 // Array with one value in constructor params new VariadicMethod(1); @@ -897,7 +901,9 @@ public void OptionalAndVariadicArgumentsTest() new VariadicMethod(1, 2, 3, 4); // Variadic parameter with null passed +#pragma warning disable CS8625 variadicClassNoParams.AsArray(double.MinValue, null); +#pragma warning restore CS8625 // Variadic parameter with default value used variadicClassNoParams.AsArray(double.MinValue); @@ -1044,7 +1050,9 @@ private sealed class OverrideVariadicMethod : VariadicMethod { public override double[] AsArray(double first, params double[] others) { +#pragma warning disable CS8604 return base.AsArray(first + 1, others?.Select(n => n + 1).ToArray()); +#pragma warning restore CS8604 } } @@ -1216,7 +1224,7 @@ public override string TheProperty set => AnotherTheProperty = value; } - public string AnotherTheProperty { get; set; } + public string? AnotherTheProperty { get; set; } } class PureNativeFriendlyRandom : DeputyBase, IFriendlyRandomGenerator @@ -1289,7 +1297,7 @@ public void CanUseInterfaceSetters() [Fact(DisplayName = Prefix + nameof(StructsAreUndecoratedOntheWayToKernel))] public void StructsAreUndecoratedOntheWayToKernel() { - var json = JsonFormatter.Stringify(new StructB {RequiredString = "Bazinga!", OptionalBoolean = false}); + var json = JsonFormatter.Stringify(new StructB {RequiredString = "Bazinga!", OptionalBoolean = false})!; var actual = JObject.Parse(json); var expected = new JObject(); @@ -1408,7 +1416,7 @@ public void AbstractMembersAreCorrectlyHandled() private sealed class AbstractSuiteImpl : AbstractSuite { - private string _property; + private string _property = ""; public AbstractSuiteImpl() {} diff --git a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs index 2bd4f58b17..dcaf12b831 100644 --- a/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs +++ b/packages/@jsii/dotnet-runtime-test/test/Amazon.JSII.Runtime.IntegrationTests/XUnitLogger.cs @@ -40,7 +40,7 @@ public XUnitLogger(ITestOutputHelper output, string categoryName) public void Log(LogLevel logLevel, EventId eventId, TState state, Exception exception, Func formatter) { - _output.WriteLine($"[{_categoryName}] {state.ToString()}"); + _output.WriteLine($"[{_categoryName}] {state?.ToString()}"); } public IDisposable BeginScope(TState state) diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj index 2763dc88b9..288902e78b 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Amazon.JSII.Runtime.UnitTests.csproj @@ -6,6 +6,9 @@ false Amazon.JSII.Runtime.UnitTests + + enable + true diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/FrameworkToJsiiConverterTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/FrameworkToJsiiConverterTests.cs index 10848683df..7301164fe5 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/FrameworkToJsiiConverterTests.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/FrameworkToJsiiConverterTests.cs @@ -39,8 +39,8 @@ protected TestBase() IServiceProvider serviceProvider = serviceCollection.BuildServiceProvider(); ServiceContainer.ServiceProviderOverride = serviceProvider; - _typeCache.GetClassType("myClassFqn").Returns(typeof(TestClass)); - _typeCache.GetEnumType("myEnumFqn").Returns(typeof(TestEnum)); + _typeCache.TryGetClassType("myClassFqn").Returns(typeof(TestClass)); + _typeCache.TryGetEnumType("myEnumFqn").Returns(typeof(TestEnum)); } } @@ -51,7 +51,7 @@ public sealed class Void : TestBase [Fact(DisplayName = _Prefix + nameof(DoesNotConvert))] public void DoesNotConvert() { - bool success = _converter.TryConvert(null, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(null, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -60,7 +60,7 @@ public void DoesNotConvert() [Fact(DisplayName = _Prefix + nameof(ThrowsIfValueIsNotNull))] public void ThrowsIfValueIsNotNull() { - Assert.Throws("value", () => _converter.TryConvert(null, _referenceMap, "", out object actual)); + Assert.Throws("value", () => _converter.TryConvert(null, _referenceMap, "", out object? actual)); } } @@ -103,7 +103,7 @@ public void ConvertsPrimitiveValues(PrimitiveType primitive, object value, objec { var instance = new OptionalValue(new TypeReference(primitive: primitive), isOptional: isOptional); - bool success = _converter.TryConvert(instance, _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(expected, actual); @@ -115,7 +115,7 @@ public void ConvertsDateValues() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Date)); DateTime now = DateTime.Now; - bool success = _converter.TryConvert(instance, _referenceMap, now, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, now, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -139,7 +139,7 @@ public void ConvertsOptionalDateValues() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Date), isOptional: true); DateTime now = DateTime.Now; - bool success = _converter.TryConvert(instance, _referenceMap, now, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, now, out object? actual); Assert.True(success); Assert.IsType(actual); var expected = new JObject @@ -172,7 +172,7 @@ public void ConvertsJsonValues() )) ); - bool success = _converter.TryConvert(instance, _referenceMap, jObject, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, jObject, out object? actual); Assert.True(success); Assert.Same(jObject, actual); @@ -183,7 +183,7 @@ public void FailsOnNullBoolean() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Boolean)); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.False(success); } @@ -193,7 +193,7 @@ public void FailsOnNullNumber() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Number)); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.False(success); } @@ -203,7 +203,7 @@ public void ConvertsNullJson() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Json)); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -222,7 +222,7 @@ public void ConvertsClassReference() ByRefValue byRef = new ByRefValue("myClassFqn", "0001"); TestClass myClass = new TestClass(byRef); - bool success = _converter.TryConvert(instance, _referenceMap, myClass, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, myClass, out object? actual); Assert.True(success); Assert.Equal(JObject.FromObject(byRef), actual); @@ -236,7 +236,7 @@ public void ConvertsEnumValue() TestEnum myEnum = TestEnum.MyMember2; - bool success = _converter.TryConvert(instance, _referenceMap, myEnum, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, myEnum, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -252,7 +252,7 @@ public void ConvertsNullClassReference() { var instance = new OptionalValue(new TypeReference("myClassFqn")); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -263,7 +263,7 @@ public void DoesNotConvertNullNonOptionalEnumValue() { var instance = new OptionalValue(new TypeReference("myEnumFqn")); - bool success =_converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success =_converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.False(success); Assert.Null(actual); @@ -274,7 +274,7 @@ public void ConvertsNullOptionalEnumValue() { var instance = new OptionalValue(new TypeReference("myEnumFqn"), isOptional: true); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -300,7 +300,7 @@ public void ConvertsMap() { "myKey2", "myValue2" } }; - bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -335,7 +335,7 @@ public void RecursivelyConvertsMapElements() { "myKey2", new Dictionary { { "mySubKey2", "myValue2" } } }, }; - bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -365,13 +365,13 @@ public void ConvertsArray() "myValue2", }; - bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object? actual); Assert.True(success); Assert.IsType(actual); Assert.Collection ( - (JArray)actual, + (JArray)actual!, value => Assert.Equal("myValue1", value), value => Assert.Equal("myValue2", value) ); @@ -398,12 +398,12 @@ public void RecursivelyConvertsArrayElements() new [] { "myValue2" }, }; - bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object? actual); Assert.True(success); Assert.IsType(actual); Assert.Collection( - (JArray)actual, + (JArray)actual!, value => { Assert.IsType(value); @@ -445,7 +445,7 @@ public void RecursivelyConvertsMapElementsWithMapOfAny() // This will test the call to FrameworkToJsiiConverter.TryConvertCollectionElement() // In the case of a of a Map of Map of Any - bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkMap, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -492,7 +492,7 @@ public void RecursivelyConvertsMapElementsWithArrayOfAny() // This will test the call to FrameworkToJsiiConverter.TryConvertCollectionElement() // In the case of a of a Map of Array of Any - bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, frameworkArray, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -518,7 +518,7 @@ public void ConvertsNullMap() ) )); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -534,7 +534,7 @@ public void ConvertsNullArray() ) )); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -555,7 +555,7 @@ public void FailsIfNoTypeMatches() }) )); - bool success = _converter.TryConvert(instance, _referenceMap, true, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, true, out object? actual); Assert.False(success); Assert.Null(actual); @@ -570,7 +570,7 @@ public void ConvertsSimpleUnion() }) )); - bool success = _converter.TryConvert(instance, _referenceMap, "abc", out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, "abc", out object? actual); Assert.True(success); Assert.IsType(actual); @@ -587,7 +587,7 @@ public void ConvertsAsFirstMatchingType() }) )); - bool success = _converter.TryConvert(instance, _referenceMap, (ushort)7, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, (ushort)7, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -603,7 +603,7 @@ public void ConvertsNull() }) )); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -619,7 +619,7 @@ public void ConvertsNull() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); - bool success = _converter.TryConvert(instance, _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -633,7 +633,7 @@ public void ConvertsPrimitive(object value, object expected) { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); - bool success = _converter.TryConvert(instance, _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(expected, actual); @@ -645,7 +645,7 @@ public void ConvertsDate() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); DateTime now = DateTime.Now; - bool success = _converter.TryConvert(instance, _referenceMap, now, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, now, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -663,7 +663,7 @@ public void ConvertsJson() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); JObject value = new JObject(new JProperty("myKey", "myValue")); - bool success = _converter.TryConvert(instance, _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, value, out object? actual); Assert.True(success); Assert.Same(value, actual); @@ -678,11 +678,11 @@ public void ConvertsMap() { { "myKey", "myValue" } }; - bool success = _converter.TryConvert(instance, _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, value, out object? actual); Assert.True(success); Assert.IsType(actual); - Assert.Collection((IEnumerable>)actual, + Assert.Collection((IEnumerable>)actual!, kvp => { Assert.IsType(kvp.Value); @@ -704,11 +704,11 @@ public void ConvertsArray() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); string[] value = new[] { "myValue" }; - bool success = _converter.TryConvert(instance, _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, _referenceMap, value, out object? actual); Assert.True(success); Assert.IsType(actual); - Assert.Collection((IEnumerable)actual, + Assert.Collection((IEnumerable)actual!, element => Assert.Equal("myValue", element.Value(), ignoreLineEndingDifferences: true) ); } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/JsiiToFrameworkConverterTests.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/JsiiToFrameworkConverterTests.cs index b12ce2b979..01447eae8d 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/JsiiToFrameworkConverterTests.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.UnitTests/Deputy/Converters/JsiiToFrameworkConverterTests.cs @@ -49,7 +49,7 @@ public sealed class Void : TestBase [Fact(DisplayName = _Prefix + nameof(DoesNotConvert))] public void DoesNotConvert() { - bool success = _converter.TryConvert(null, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(null, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -58,7 +58,7 @@ public void DoesNotConvert() [Fact(DisplayName = _Prefix + nameof(ThrowsIfValueIsNotNull))] public void ThrowsIfValueIsNotNull() { - Assert.Throws("value", () => _converter.TryConvert(null, typeof(object), _referenceMap, "", out object actual)); + Assert.Throws("value", () => _converter.TryConvert(null, typeof(object), _referenceMap, "", out object? actual)); } } @@ -101,7 +101,7 @@ public void ConvertsPrimitiveValues(PrimitiveType primitive, object value, objec { var instance = new OptionalValue(new TypeReference(primitive: primitive), isOptional: isOptional); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(expected, actual); @@ -120,7 +120,7 @@ public void ConvertsDateValues() DateTime now = DateTime.Now; JObject value = new JObject(new JProperty("$jsii.date", now)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(now, actual); @@ -137,7 +137,7 @@ public void ConvertsOptionalDateValues() DateTime now = DateTime.Now; JObject value = new JObject(new JProperty("$jsii.date", now)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(now, actual); @@ -165,7 +165,7 @@ public void ConvertsJsonValues() )) ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, jObject, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, jObject, out object? actual); Assert.True(success); Assert.Same(jObject, actual); @@ -176,7 +176,7 @@ public void FailsOnNullBoolean() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Boolean)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.False(success); } @@ -186,7 +186,7 @@ public void FailsOnNullNumber() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Number)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.False(success); } @@ -196,7 +196,7 @@ public void ConvertsNullJson() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Json)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -209,7 +209,10 @@ public sealed class FullyQualifiedName : TestBase public FullyQualifiedName() { + _typeCache.TryGetClassType("myClassFqn").Returns(typeof(TestClass)); _typeCache.GetClassType("myClassFqn").Returns(typeof(TestClass)); + + _typeCache.TryGetEnumType("myEnumFqn").Returns(typeof(TestEnum)); _typeCache.GetEnumType("myEnumFqn").Returns(typeof(TestEnum)); } @@ -224,7 +227,7 @@ public void ConvertsClassReference() .GetOrCreateNativeReference(Arg.Is(v => v.Value == "myClassFqn@0001")) .Returns(testClass); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, byRef, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, byRef, out object? actual); Assert.True(success); Assert.Same(actual, testClass); @@ -238,7 +241,7 @@ public void ConvertsEnumValue() var instance = new OptionalValue(new TypeReference("myEnumFqn")); JObject enumValue = new JObject(new JProperty("$jsii.enum", "myEnumFqn/MyMember1")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, enumValue, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, enumValue, out object? actual); Assert.True(success); Assert.Equal(TestEnum.MyMember1, actual); @@ -249,7 +252,7 @@ public void ConvertsNullClassReference() { var instance = new OptionalValue(new TypeReference("myClassFqn")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -260,7 +263,7 @@ public void DoesNotConvertNullNonOptionalEnumValue() { var instance = new OptionalValue(new TypeReference("myEnumFqn")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.False(success); Assert.Null(actual); @@ -271,7 +274,7 @@ public void ConvertsNullOptionalEnumValue() { var instance = new OptionalValue(new TypeReference("myEnumFqn"), isOptional: true); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -313,11 +316,11 @@ public void ConvertsMap() new JProperty("myKey2", "myValue2") ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsAssignableFrom>(actual); - Assert.Collection((IDictionary)actual, + Assert.Collection((IDictionary)actual!, kvp => { Assert.Equal("myKey1", kvp.Key, ignoreLineEndingDifferences: true); @@ -353,11 +356,11 @@ public void RecursivelyConvertsMapElements() )) ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsAssignableFrom>>(actual); - Assert.Collection((IDictionary>)actual, + Assert.Collection((IDictionary>)actual!, kvp => { Assert.Equal("myKey1", kvp.Key, ignoreLineEndingDifferences: true); @@ -397,11 +400,11 @@ public void ConvertsArray() new JValue("myValue2") ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsType(actual); - Assert.Collection((string[])actual, + Assert.Collection((string[])actual!, element => Assert.Equal("myValue1", element, ignoreLineEndingDifferences: true), element => Assert.Equal("myValue2", element, ignoreLineEndingDifferences: true) ); @@ -425,11 +428,11 @@ public void RecursivelyConvertsArrayElements() new JArray(new JValue("myValue2")) ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsType(actual); - Assert.Collection((string[][])actual, + Assert.Collection((string[][])actual!, element => Assert.Collection(element, subElement => Assert.Equal("myValue1", subElement, ignoreLineEndingDifferences: true) ), @@ -448,7 +451,7 @@ public void ConvertsNullMap() ) )); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -463,7 +466,7 @@ public void ConvertsNullArray() ) )); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -485,7 +488,7 @@ public void FailsIfNoTypeMatches() )); JValue value = new JValue(true); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.False(success); Assert.Null(actual); @@ -501,7 +504,7 @@ public void ConvertsSimpleUnion() )); JValue value = new JValue("abc"); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal("abc", actual); @@ -518,7 +521,7 @@ public void ConvertsAsFirstMatchingType() )); JValue value = new JValue((ushort)7); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsType(actual); @@ -534,7 +537,7 @@ public void ConvertsNull() }) )); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -550,7 +553,7 @@ public void ConvertsNull() { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, null, out object? actual); Assert.True(success); Assert.Null(actual); @@ -564,7 +567,7 @@ public void ConvertsPrimitive(object value, object expected) { var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, new JValue(value), out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, new JValue(value), out object? actual); Assert.True(success); Assert.Equal(expected, actual); @@ -580,7 +583,7 @@ public void ConvertsDate() new JProperty("$jsii.date", now) ); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.Equal(now, actual); @@ -594,11 +597,11 @@ public void ConvertsJson() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); JObject value = new JObject(new JProperty("myKey", "myValue")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); - Assert.IsAssignableFrom>(actual); - Assert.Collection((IDictionary)actual, + Assert.IsAssignableFrom>(actual); + Assert.Collection((IDictionary)actual!, kvp => { Assert.Equal("myKey", kvp.Key, ignoreLineEndingDifferences: true); @@ -615,11 +618,11 @@ public void ConvertsMap() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); JObject value = new JObject(new JProperty("myKey", "myValue")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsAssignableFrom>(actual); - Assert.Collection((IDictionary)actual, + Assert.Collection((IDictionary)actual!, kvp => { Assert.Equal("myKey", kvp.Key, ignoreLineEndingDifferences: true); @@ -634,11 +637,11 @@ public void ConvertsArray() var instance = new OptionalValue(new TypeReference(primitive: PrimitiveType.Any)); JArray value = new JArray(new JValue("myValue")); - bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object actual); + bool success = _converter.TryConvert(instance, typeof(object), _referenceMap, value, out object? actual); Assert.True(success); Assert.IsAssignableFrom(actual); - Assert.Collection((object[])actual, + Assert.Collection((object[])actual!, element => Assert.Equal("myValue", element) ); } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.sln b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.sln index 4b5ac42437..72e69b8540 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.sln +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime.sln @@ -14,8 +14,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "UnitTests", "UnitTests", "{ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Amazon.JSII.Runtime.UnitTests", "Amazon.JSII.Runtime.UnitTests\Amazon.JSII.Runtime.UnitTests.csproj", "{96CC0C0B-1D90-448F-9BFC-07CE93D2CE29}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Amazon.JSII.Runtime.IntegrationTests", "..\..\@jsii/dotnet-runtime-test\test\Amazon.JSII.Runtime.IntegrationTests\Amazon.JSII.Runtime.IntegrationTests.csproj", "{7BD15A18-BE3A-4729-9B8C-570BF214C4CE}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -30,10 +28,6 @@ Global {96CC0C0B-1D90-448F-9BFC-07CE93D2CE29}.Debug|Any CPU.Build.0 = Debug|Any CPU {96CC0C0B-1D90-448F-9BFC-07CE93D2CE29}.Release|Any CPU.ActiveCfg = Release|Any CPU {96CC0C0B-1D90-448F-9BFC-07CE93D2CE29}.Release|Any CPU.Build.0 = Release|Any CPU - {7BD15A18-BE3A-4729-9B8C-570BF214C4CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {7BD15A18-BE3A-4729-9B8C-570BF214C4CE}.Debug|Any CPU.Build.0 = Debug|Any CPU - {7BD15A18-BE3A-4729-9B8C-570BF214C4CE}.Release|Any CPU.ActiveCfg = Release|Any CPU - {7BD15A18-BE3A-4729-9B8C-570BF214C4CE}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj index 32dff55d07..597621b5a2 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Amazon.JSII.Runtime.csproj @@ -6,6 +6,9 @@ Amazon.JSII.Runtime .NET Runtime for JSII icon.png + + enable + true diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/AssemblyInfo.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/AssemblyInfo.cs index 5275ee0d67..66eb8f6e0d 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/AssemblyInfo.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/AssemblyInfo.cs @@ -2,4 +2,4 @@ [assembly:InternalsVisibleTo("Amazon.JSII.Runtime.IntegrationTests")] [assembly:InternalsVisibleTo("Amazon.JSII.Runtime.UnitTests")] -[assembly:InternalsVisibleTo("DynamicProxyGenAssembly2")] \ No newline at end of file +[assembly:InternalsVisibleTo("DynamicProxyGenAssembly2")] diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs index c2414ec131..eb0b2d4af2 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/CallbackExtensions.cs @@ -16,17 +16,17 @@ namespace Amazon.JSII.Runtime { internal static class CallbackExtensions { - public static object InvokeCallback(this Callback callback, IReferenceMap referenceMap, IFrameworkToJsiiConverter converter, out string error) + public static object? InvokeCallback(this Callback callback, IReferenceMap referenceMap, IFrameworkToJsiiConverter converter, out string? error) { try { - CallbackResult frameworkResult = callback.InvokeCallbackCore(referenceMap); + CallbackResult? frameworkResult = callback.InvokeCallbackCore(referenceMap); converter.TryConvert( frameworkResult, referenceMap, frameworkResult?.Value, - out object result + out object? result ); error = null; @@ -46,7 +46,7 @@ out object result } } - static CallbackResult InvokeCallbackCore(this Callback callback, IReferenceMap referenceMap) + static CallbackResult? InvokeCallbackCore(this Callback callback, IReferenceMap referenceMap) { if (callback.Invoke != null) { @@ -67,7 +67,7 @@ static CallbackResult InvokeCallbackCore(this Callback callback, IReferenceMap r throw new ArgumentException("Callback does not specificy a method, getter, or setter to invoke"); } - private static CallbackResult InvokeMethod(InvokeRequest request, IReferenceMap referenceMap) + private static CallbackResult? InvokeMethod(InvokeRequest request, IReferenceMap referenceMap) { request = request ?? throw new ArgumentNullException(nameof(request)); var deputy = referenceMap.GetOrCreateNativeReference(request.ObjectReference); @@ -79,24 +79,24 @@ private static CallbackResult InvokeMethod(InvokeRequest request, IReferenceMap throw new InvalidOperationException($"Received callback for {deputy.GetType().Name}.{request.Method} method, but this method does not exist"); } - var attribute = methodInfo.GetAttribute(); + var attribute = methodInfo.GetAttribute()!; var parameters = methodInfo.GetParameters(); var converter = ServiceContainer.ServiceProvider.GetRequiredService(); - var rehydratedArgs = Enumerable.Range(0, request.Arguments.Length) + var rehydratedArgs = Enumerable.Range(0, request.Arguments?.Length ?? 0) .Select(n => { var paramIndex = n >= parameters.Length ? parameters.Length - 1 : n; var requiredType = parameters[paramIndex].ParameterType; - if (!converter.TryConvert(attribute.Parameters[paramIndex], requiredType, referenceMap, request.Arguments[n], out var value)) + if (!converter.TryConvert(attribute.Parameters[paramIndex], requiredType, referenceMap, request.Arguments![n], out var value)) { - throw new JsiiException($"Unable to convert {request.Arguments[n]} to {requiredType.Name}"); + throw new JsiiException($"Unable to convert {request.Arguments![n]} to {requiredType.Name}"); } if (attribute.Parameters[paramIndex].IsVariadic) { - var array = Array.CreateInstance(value.GetType(), 1); + var array = Array.CreateInstance(value?.GetType() ?? requiredType, 1); array.SetValue(value, 0); value = array; } @@ -120,12 +120,12 @@ private static CallbackResult InvokeMethod(InvokeRequest request, IReferenceMap if (n == parameters.Length - 1 && rehydratedArgs.Length > parameters.Length) { var allArgs = rehydratedArgs.TakeLast(rehydratedArgs.Length - parameters.Length + 1); - var array = Array.CreateInstance(parameters[parameters.Length - 1].ParameterType.GetElementType(), - allArgs.Select(list => (list as Array).Length).Sum()); + var array = Array.CreateInstance(parameters[parameters.Length - 1].ParameterType.GetElementType()!, + allArgs.Select(list => (list as Array)!.Length).Sum()); var idx = 0; foreach (var list in allArgs) { - foreach (var item in list as Array) + foreach (var item in (list as Array)!) { array.SetValue(item, idx); idx += 1; @@ -153,7 +153,7 @@ private static CallbackResult InvokeGetter(GetRequest request, IReferenceMap ref throw new InvalidOperationException($"Received callback for {deputy.GetType().Name}.{request.Property} getter, but this property does not exist"); } - var attribute = propertyInfo.GetAttribute(); + var attribute = propertyInfo.GetAttribute()!; var methodInfo = propertyInfo.GetMethod; if (methodInfo == null) @@ -188,7 +188,7 @@ private static void InvokeSetter(SetRequest request, IReferenceMap referenceMap) * This is a temporary workaround / hack to solve an immediate problem, but does not completely solve the * problem to it's full extent. See https://github.com/aws/jsii/issues/404 for more information. */ - private static object FromKernel(object obj, IReferenceMap referenceMap) + private static object? FromKernel(object? obj, IReferenceMap referenceMap) { if (!(obj is JObject jObject)) return obj; var prop = jObject.Property("$jsii.byref"); @@ -201,16 +201,16 @@ private static object FromKernel(object obj, IReferenceMap referenceMap) if (jObject.ContainsKey("$jsii.map")) { - jObject = (JObject)jObject.Property("$jsii.map").Value; + jObject = (JObject)jObject.Property("$jsii.map")!.Value; } /* - * Turning all outstanding JObjects to IDictionary (recursively), as the code generator - * will have emitted IDictionary for maps of string to . Not doing so would - * result in an ArgumentError for not being able to convert JObject to IDictionary. - */ - var dict = jObject.ToObject>(); - var mapped = new Dictionary(dict.Count); + * Turning all outstanding JObjects to IDictionary (recursively), as the code generator + * will have emitted IDictionary for maps of string to . Not doing so would + * result in an ArgumentError for not being able to convert JObject to IDictionary. + */ + var dict = jObject.ToObject>()!; + var mapped = new Dictionary(dict.Count); foreach (var key in dict.Keys) { var value = dict[key]; @@ -229,14 +229,14 @@ private static object FromKernel(object obj, IReferenceMap referenceMap) internal sealed class CallbackResult : OptionalValue { - public CallbackResult(IOptionalValue optionalValue, object value) - : this(optionalValue?.Type, optionalValue?.IsOptional ?? false, value) {} + public CallbackResult(IOptionalValue optionalValue, object? value) + : this(optionalValue.Type, optionalValue.IsOptional, value) {} - private CallbackResult(TypeReference type, bool isOptional, object value): base(type, isOptional) + private CallbackResult(TypeReference type, bool isOptional, object? value): base(type, isOptional) { Value = value; } - public object Value { get; } + public object? Value { get; } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/ByRefValue.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/ByRefValue.cs index 18598fc1a2..6db67aea5f 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/ByRefValue.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/ByRefValue.cs @@ -10,7 +10,7 @@ namespace Amazon.JSII.Runtime.Deputy public sealed class ByRefValue { [JsonConstructor] - internal ByRefValue(string value, string[] interfaces = null, bool isProxy = false) + internal ByRefValue(string value, string[]? interfaces = null, bool isProxy = false) { Value = value ?? throw new ArgumentNullException(nameof(value)); Interfaces = interfaces ?? new string[]{}; @@ -27,12 +27,12 @@ internal ByRefValue(string value, string[] interfaces = null, bool isProxy = fal IsProxy = isProxy; } - internal ByRefValue(string fullyQualifiedName, string id, string[] interfaces = null) + internal ByRefValue(string fullyQualifiedName, string id, string[]? interfaces = null) : this($"{fullyQualifiedName}@{id}", fullyQualifiedName, id, interfaces, false) { } - internal ByRefValue(string value, string fullyQualifiedName, string id, string[] interfaces, bool isProxy) + internal ByRefValue(string value, string fullyQualifiedName, string id, string[]? interfaces, bool isProxy) { Value = value ?? throw new ArgumentNullException(nameof(value)); FullyQualifiedName = fullyQualifiedName ?? throw new ArgumentNullException(nameof(value)); diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs index 30013ddaae..c1996bb996 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/DeputyBase.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.DependencyInjection; using System; using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; @@ -22,7 +23,7 @@ public abstract class DeputyBase : IConvertible /// protected sealed class DeputyProps { - public DeputyProps(object[] arguments = null) + public DeputyProps(object[]? arguments = null) { Arguments = arguments ?? new object[] { }; } @@ -33,7 +34,7 @@ public DeputyProps(object[] arguments = null) private const BindingFlags StaticMemberFlags = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; private const BindingFlags InstanceMemberFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; - protected DeputyBase(DeputyProps props = null) + protected DeputyBase(DeputyProps? props = null) { var type = GetType(); @@ -51,7 +52,7 @@ protected DeputyBase(DeputyProps props = null) GetInterfaces() ); - Reference = new ByRefValue(response["$jsii.byref"] as string); + Reference = new ByRefValue((response["$jsii.byref"] as string)!); var referenceMap = serviceProvider.GetRequiredService(); referenceMap.AddNativeReference(Reference, this, true); @@ -72,7 +73,7 @@ IEnumerable GetMethodOverrides() if ((inheritedAttribute != null && uninheritedAttribute == null) || uninheritedAttribute?.IsOverride == true) { - yield return new Override(method: (inheritedAttribute ?? uninheritedAttribute).Name); + yield return new Override(method: (inheritedAttribute ?? uninheritedAttribute)!.Name); } } } @@ -89,7 +90,7 @@ IEnumerable GetPropertyOverrides() if ((inheritedAttribute != null && uninheritedAttribute == null) || uninheritedAttribute?.IsOverride == true) { - yield return new Override(property: (inheritedAttribute ?? uninheritedAttribute).Name); + yield return new Override(property: (inheritedAttribute ?? uninheritedAttribute)!.Name); } } } @@ -99,7 +100,7 @@ string[] GetInterfaces() return type.GetInterfaces() .Select(iface => iface.GetCustomAttribute()) .Where(jsiiIface => jsiiIface != null) - .Select(jsiiIface => jsiiIface.FullyQualifiedName) + .Select(jsiiIface => jsiiIface!.FullyQualifiedName) .ToArray(); } } @@ -118,12 +119,13 @@ protected DeputyBase(ByRefValue reference) #region GetProperty - protected static T GetStaticProperty(System.Type type, [CallerMemberName] string propertyName = null) + [return: MaybeNull] + protected static T GetStaticProperty(System.Type type, [CallerMemberName] string? propertyName = null) { type = type ?? throw new ArgumentNullException(nameof(type)); propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); - var classAttribute = ReflectionUtils.GetClassAttribute(type); + var classAttribute = ReflectionUtils.GetClassAttribute(type)!; var propertyAttribute = GetStaticPropertyAttribute(type, propertyName); return GetPropertyCore( @@ -132,7 +134,8 @@ protected static T GetStaticProperty(System.Type type, [CallerMemberName] str ); } - protected T GetInstanceProperty([CallerMemberName] string propertyName = null) + [return: MaybeNull] + protected T GetInstanceProperty([CallerMemberName] string? propertyName = null) { propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); @@ -144,6 +147,7 @@ protected T GetInstanceProperty([CallerMemberName] string propertyName = null ); } + [return: MaybeNull] private static T GetPropertyCore(JsiiPropertyAttribute propertyAttribute, Func getFunc) { var serviceProvider = ServiceContainer.ServiceProvider; @@ -153,24 +157,24 @@ private static T GetPropertyCore(JsiiPropertyAttribute propertyAttribute, Fun var converter = serviceProvider.GetRequiredService(); var referenceMap = serviceProvider.GetRequiredService(); - if (!converter.TryConvert(propertyAttribute, typeof(T), referenceMap, response.Value, out object frameworkValue)) + if (!converter.TryConvert(propertyAttribute, typeof(T), referenceMap, response.Value, out object? frameworkValue)) { throw new ArgumentException($"Could not convert value '{response.Value}' for property '{propertyAttribute.Name}'", nameof(getFunc)); } - return (T)frameworkValue; + return (T)frameworkValue!; } #endregion #region SetProperty - protected static void SetStaticProperty(System.Type type, T value, [CallerMemberName] string propertyName = null) + protected static void SetStaticProperty(System.Type type, T value, [CallerMemberName] string? propertyName = null) { type = type ?? throw new ArgumentNullException(nameof(type)); propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); - var classAttribute = ReflectionUtils.GetClassAttribute(type); + var classAttribute = ReflectionUtils.GetClassAttribute(type)!; var propertyAttribute = GetStaticPropertyAttribute(type, propertyName); SetPropertyCore( @@ -180,7 +184,7 @@ protected static void SetStaticProperty(System.Type type, T value, [CallerMem ); } - protected void SetInstanceProperty(T value, [CallerMemberName] string propertyName = null) + protected void SetInstanceProperty(T value, [CallerMemberName] string? propertyName = null) { propertyName = propertyName ?? throw new ArgumentNullException(nameof(propertyName)); @@ -193,12 +197,12 @@ protected void SetInstanceProperty(T value, [CallerMemberName] string propert ); } - private static void SetPropertyCore(T value, JsiiPropertyAttribute propertyAttribute, Action setAction) + private static void SetPropertyCore(T value, JsiiPropertyAttribute propertyAttribute, Action setAction) { var serviceProvider = ServiceContainer.ServiceProvider; var converter = serviceProvider.GetRequiredService(); var referenceMap = serviceProvider.GetRequiredService(); - if (!converter.TryConvert(propertyAttribute, referenceMap, value, out object jsiiValue)) + if (!converter.TryConvert(propertyAttribute, referenceMap, value, out object? jsiiValue)) { throw new ArgumentException($"Could not set property '{propertyAttribute.Name}' to '{value}'", nameof(value)); } @@ -211,20 +215,21 @@ private static void SetPropertyCore(T value, JsiiPropertyAttribute propertyAt #region InvokeMethod - protected static void InvokeStaticVoidMethod(System.Type type, System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = null) + protected static void InvokeStaticVoidMethod(System.Type type, System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = "") { InvokeStaticMethod(type, parameterTypes, arguments, methodName); } - protected void InvokeInstanceVoidMethod(System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = null) + protected void InvokeInstanceVoidMethod(System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = "") { InvokeInstanceMethod(parameterTypes, arguments, methodName); } - - protected static T InvokeStaticMethod(System.Type type, System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = null) + + [return: MaybeNull] + protected static T InvokeStaticMethod(System.Type type, System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = "") { var methodAttribute = GetStaticMethodAttribute(type, methodName, parameterTypes); - var classAttribute = ReflectionUtils.GetClassAttribute(type); + var classAttribute = ReflectionUtils.GetClassAttribute(type)!; return InvokeMethodCore( methodAttribute, @@ -238,7 +243,8 @@ protected static T InvokeStaticMethod(System.Type type, System.Type[] paramet ); } - protected T InvokeInstanceMethod(System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = null) + [return: MaybeNull] + protected T InvokeInstanceMethod(System.Type[] parameterTypes, object[] arguments, [CallerMemberName] string methodName = "") { var methodAttribute = GetInstanceMethodAttribute(methodName, parameterTypes); @@ -258,11 +264,12 @@ protected T InvokeInstanceMethod(System.Type[] parameterTypes, object[] argum ); } + [return: MaybeNull] private static T InvokeMethodCore( JsiiMethodAttribute methodAttribute, - object[] arguments, - Func beginFunc, - Func invokeFunc + object?[] arguments, + Func beginFunc, + Func invokeFunc ) { var serviceProvider = ServiceContainer.ServiceProvider; @@ -271,14 +278,14 @@ Func invokeFunc var referenceMap = serviceProvider.GetRequiredService(); var result = GetResult(); - if (!converter.TryConvert(methodAttribute.Returns, typeof(T), referenceMap, result, out object frameworkValue)) + if (!converter.TryConvert(methodAttribute.Returns, typeof(T), referenceMap, result, out object? frameworkValue)) { throw new ArgumentException($"Could not convert result '{result}' for method '{methodAttribute.Name}'", nameof(result)); } - return (T)frameworkValue; + return (T)frameworkValue!; - object GetResult() + object? GetResult() { var args = ConvertArguments(methodAttribute.Parameters, arguments); @@ -322,13 +329,13 @@ private static void InvokeCallbacks() #region ConvertArguments - private static object[] ConvertArguments(Parameter[] parameters, params object[] arguments) + private static object?[] ConvertArguments(Parameter[] parameters, params object?[] arguments) { var serviceProvider = ServiceContainer.ServiceProvider; if ((parameters == null || parameters.Length == 0) && (arguments == null || arguments.Length == 0)) { - return new object[] { }; + return new object?[] { }; } if (parameters == null || arguments == null || parameters.Length != arguments.Length) @@ -336,7 +343,7 @@ private static object[] ConvertArguments(Parameter[] parameters, params object[] throw new ArgumentException("Arguments do not match method parameters", nameof(arguments)); } - var cleanedArgs = new List(arguments); + var cleanedArgs = new List(arguments); var cleanedParams = new List(parameters); // Handling variadic parameters (null array, empty array, one value array, n values array..) @@ -371,7 +378,7 @@ private static object[] ConvertArguments(Parameter[] parameters, params object[] return cleanedParams.Zip(cleanedArgs, (parameter, frameworkArgument) => { - if (!converter.TryConvert(parameter, referenceMap, frameworkArgument, out object jsiiArgument)) + if (!converter.TryConvert(parameter, referenceMap, frameworkArgument, out object? jsiiArgument)) { throw new ArgumentException($"Could not convert argument '{frameworkArgument}' to Jsii", nameof(arguments)); } @@ -460,7 +467,7 @@ TypeCode IConvertible.GetTypeCode() return TypeCode.Object; } - object IConvertible.ToType(System.Type conversionType, IFormatProvider provider) + object IConvertible.ToType(System.Type conversionType, IFormatProvider? provider) { if (Proxies.ContainsKey(conversionType)) { @@ -469,13 +476,12 @@ object IConvertible.ToType(System.Type conversionType, IFormatProvider provider) if (ToTypeCore(out var converted)) { - Proxies[conversionType] = converted; - return converted; + return Proxies[conversionType] = converted!; } throw new InvalidCastException($"Unable to cast {this.GetType().FullName} into {conversionType.FullName}"); - bool ToTypeCore(out object result) + bool ToTypeCore(out object? result) { if (conversionType.IsInstanceOfType(this)) { @@ -522,7 +528,7 @@ bool ToTypeCore(out object result) result = constructorInfo.Invoke(new object[]{ Reference.ForProxy() }); return true; - bool TryFindSupportedInterface(string declaredFqn, string[] availableFqns, ITypeCache types, out string foundFqn) + bool TryFindSupportedInterface(string declaredFqn, string[] availableFqns, ITypeCache types, out string? foundFqn) { var declaredType = types.GetInterfaceType(declaredFqn); @@ -544,77 +550,77 @@ bool TryFindSupportedInterface(string declaredFqn, string[] availableFqns, IType #region Impossible Conversions - bool IConvertible.ToBoolean(IFormatProvider provider) + bool IConvertible.ToBoolean(IFormatProvider? provider) { throw new InvalidCastException(); } - byte IConvertible.ToByte(IFormatProvider provider) + byte IConvertible.ToByte(IFormatProvider? provider) { throw new InvalidCastException(); } - char IConvertible.ToChar(IFormatProvider provider) + char IConvertible.ToChar(IFormatProvider? provider) { throw new InvalidCastException(); } - DateTime IConvertible.ToDateTime(IFormatProvider provider) + DateTime IConvertible.ToDateTime(IFormatProvider? provider) { throw new InvalidCastException(); } - decimal IConvertible.ToDecimal(IFormatProvider provider) + decimal IConvertible.ToDecimal(IFormatProvider? provider) { throw new InvalidCastException(); } - double IConvertible.ToDouble(IFormatProvider provider) + double IConvertible.ToDouble(IFormatProvider? provider) { throw new InvalidCastException(); } - short IConvertible.ToInt16(IFormatProvider provider) + short IConvertible.ToInt16(IFormatProvider? provider) { throw new InvalidCastException(); } - int IConvertible.ToInt32(IFormatProvider provider) + int IConvertible.ToInt32(IFormatProvider? provider) { throw new InvalidCastException(); } - long IConvertible.ToInt64(IFormatProvider provider) + long IConvertible.ToInt64(IFormatProvider? provider) { throw new InvalidCastException(); } - sbyte IConvertible.ToSByte(IFormatProvider provider) + sbyte IConvertible.ToSByte(IFormatProvider? provider) { throw new InvalidCastException(); } - float IConvertible.ToSingle(IFormatProvider provider) + float IConvertible.ToSingle(IFormatProvider? provider) { throw new InvalidCastException(); } - string IConvertible.ToString(IFormatProvider provider) + string IConvertible.ToString(IFormatProvider? provider) { throw new InvalidCastException(); } - ushort IConvertible.ToUInt16(IFormatProvider provider) + ushort IConvertible.ToUInt16(IFormatProvider? provider) { throw new InvalidCastException(); } - uint IConvertible.ToUInt32(IFormatProvider provider) + uint IConvertible.ToUInt32(IFormatProvider? provider) { throw new InvalidCastException(); } - ulong IConvertible.ToUInt64(IFormatProvider provider) + ulong IConvertible.ToUInt64(IFormatProvider? provider) { throw new InvalidCastException(); } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiClassAttribute.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiClassAttribute.cs index 16e4ced60d..1777a95588 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiClassAttribute.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiClassAttribute.cs @@ -7,7 +7,7 @@ namespace Amazon.JSII.Runtime.Deputy [AttributeUsage(AttributeTargets.Class, Inherited = false)] public sealed class JsiiClassAttribute : JsiiTypeAttributeBase { - public JsiiClassAttribute(System.Type nativeType, string fullyQualifiedName, string parametersJson = null) + public JsiiClassAttribute(System.Type nativeType, string fullyQualifiedName, string? parametersJson = null) : base(nativeType, fullyQualifiedName) { Parameters = parametersJson == null diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiMethodAttribute.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiMethodAttribute.cs index 98babd6d04..57556ad9f0 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiMethodAttribute.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiMethodAttribute.cs @@ -9,8 +9,8 @@ public sealed class JsiiMethodAttribute : Attribute { public JsiiMethodAttribute( string name, - string returnsJson = null, - string parametersJson = null, + string? returnsJson = null, + string? parametersJson = null, bool isAsync = false, bool isOverride = false) { @@ -27,7 +27,7 @@ public JsiiMethodAttribute( public string Name { get; } - public OptionalValue Returns { get; } + public OptionalValue? Returns { get; } public Parameter[] Parameters { get; } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiTypeAttributeBase.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiTypeAttributeBase.cs index e744630149..867760e569 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiTypeAttributeBase.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Deputy/JsiiTypeAttributeBase.cs @@ -47,8 +47,7 @@ private static void Load(Assembly assembly) var tarballResourceName = assembly.GetManifestResourceNames().FirstOrDefault(name => name.EndsWith(".tgz")); if (tarballResourceName == null) { - throw new JsiiException("Cannot find embedded tarball resource in assembly " + assembly.GetName(), - null); + throw new JsiiException("Cannot find embedded tarball resource in assembly " + assembly.GetName(), null); } IServiceProvider serviceProvider = ServiceContainer.ServiceProvider; diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/JsiiException.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/JsiiException.cs index ea0428b59a..12726d501e 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/JsiiException.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/JsiiException.cs @@ -5,18 +5,18 @@ namespace Amazon.JSII.Runtime { public sealed class JsiiException : Exception { - public ErrorResponse ErrorResponse { get; } + public ErrorResponse? ErrorResponse { get; } internal JsiiException(string message) : base(message) { } - internal JsiiException(string message, Exception innerException) + internal JsiiException(string message, Exception? innerException) : base(message, innerException) { } - internal JsiiException(ErrorResponse response, Exception innerException) + internal JsiiException(ErrorResponse response, Exception? innerException) : base(response.Error, innerException) { ErrorResponse = response; diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/ReflectionUtils.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/ReflectionUtils.cs index eb66671553..1755e72baa 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/ReflectionUtils.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/ReflectionUtils.cs @@ -66,7 +66,7 @@ public static PropertyInfo GetIndexer(Type type) return type.GetProperties().FirstOrDefault(p => p.GetIndexParameters().Any()); } - public static JsiiClassAttribute GetClassAttribute(Type type) + public static JsiiClassAttribute? GetClassAttribute(Type? type) { if (type == null) { @@ -86,7 +86,7 @@ public static JsiiClassAttribute GetClassAttribute(Type type) /// The attribute type that is desired /// The attribute if one was found, or null [return: MaybeNull] - internal static T GetAttribute(this MethodInfo method, bool inherit = true) where T : Attribute + internal static T? GetAttribute(this MethodInfo method, bool inherit = true) where T : notnull, Attribute { var directAttribute = method.GetCustomAttribute(inherit); if (directAttribute != null || !inherit) return directAttribute; @@ -118,7 +118,7 @@ internal static T GetAttribute(this MethodInfo method, bool inherit = true) w /// The attribute type that is desired /// The attribute if one was found, or null [return: MaybeNull] - internal static T GetAttribute(this PropertyInfo property, bool inherit = true) where T : Attribute + internal static T? GetAttribute(this PropertyInfo property, bool inherit = true) where T : notnull, Attribute { var directAttribute = property.GetCustomAttribute(inherit); if (directAttribute != null || !inherit) return directAttribute; diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs index 29da65b3d2..972965dc10 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Client.cs @@ -100,26 +100,26 @@ TResponse ReceiveResponse() TResponse TryDeserialize(string responseJson) where TResponse : class, IKernelResponse { - JObject responseObject = (JObject)JsonConvert.DeserializeObject(responseJson); + JObject responseObject = (JObject)JsonConvert.DeserializeObject(responseJson)!; if (responseObject.ContainsKey("error")) { - ErrorResponse errorResponse = responseObject.ToObject(); + ErrorResponse errorResponse = responseObject.ToObject()!; throw new JsiiException(errorResponse, null); } if (typeof(TResponse).IsAssignableFrom(typeof(HelloResponse))) { - return responseObject.ToObject(); + return responseObject.ToObject()!; } if (responseObject.ContainsKey("callback")) { - CallbackResponse callbackResponse = responseObject.ToObject(); + CallbackResponse callbackResponse = responseObject.ToObject()!; Callback callback = callbackResponse.Callback; - object result = callback.InvokeCallback(_referenceMap, _frameworkToJsiiConverter, out string error); + object? result = callback.InvokeCallback(_referenceMap, _frameworkToJsiiConverter, out string? error); return Send(new SynchronousCompleteRequest ( @@ -135,7 +135,7 @@ TResponse TryDeserialize(string responseJson) where TResponse : class if (responseObject.ContainsKey("ok")) { - OkResponse okResponse = responseObject.ToObject>(); + OkResponse okResponse = responseObject.ToObject>()!; return okResponse.Ok; } @@ -175,7 +175,7 @@ public LoadResponse Load(LoadRequest request) return Send(request); } - public CreateResponse Create(string fullyQualifiedName, object[] arguments = null, Override[] overrides = null, string[] interfaces = null) + public CreateResponse Create(string fullyQualifiedName, object?[]? arguments = null, Override[]? overrides = null, string[]? interfaces = null) { return Create(new CreateRequest(fullyQualifiedName, arguments, overrides, interfaces)); } @@ -215,7 +215,7 @@ public GetResponse StaticGet(StaticGetRequest request) return Send(request); } - public SetResponse Set(ObjectReference objectReference, string property, object value) + public SetResponse Set(ObjectReference objectReference, string property, object? value) { return Set(new SetRequest(objectReference, property, value)); } @@ -225,7 +225,7 @@ public SetResponse Set(SetRequest request) return Send(request); } - public SetResponse StaticSet(string fullyQualifiedName, string property, object value) + public SetResponse StaticSet(string fullyQualifiedName, string property, object? value) { return StaticSet(new StaticSetRequest(fullyQualifiedName, property, value)); } @@ -235,7 +235,7 @@ public SetResponse StaticSet(StaticSetRequest request) return Send(request); } - public InvokeResponse Invoke(ObjectReference objectReference, string method, object[] arguments = null) + public InvokeResponse Invoke(ObjectReference objectReference, string method, object?[]? arguments = null) { return Invoke(new InvokeRequest(objectReference, method, arguments)); } @@ -245,7 +245,7 @@ public InvokeResponse Invoke(InvokeRequest request) return Send(request); } - public InvokeResponse StaticInvoke(string fullyQualifiedName, string method, object[] arguments = null) + public InvokeResponse StaticInvoke(string fullyQualifiedName, string method, object?[]? arguments = null) { return StaticInvoke(new StaticInvokeRequest(fullyQualifiedName, method, arguments)); } @@ -255,7 +255,7 @@ public InvokeResponse StaticInvoke(StaticInvokeRequest request) return Send(request); } - public BeginResponse Begin(ObjectReference objectReference, string method, object[] arguments = null) + public BeginResponse Begin(ObjectReference objectReference, string method, object?[]? arguments = null) { return Begin(new BeginRequest(objectReference, method, arguments)); } @@ -285,7 +285,7 @@ public CallbacksResponse Callbacks(CallbacksRequest request) return Send(request); } - public CompleteResponse Complete(string callbackId, string error = null, object result = null) + public CompleteResponse Complete(string callbackId, string? error = null, object? result = null) { return Complete(new CompleteRequest(callbackId, error, result)); } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/FrameworkToJsiiConverter.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/FrameworkToJsiiConverter.cs index e0a53e60f6..77ae1d3d40 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/FrameworkToJsiiConverter.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/FrameworkToJsiiConverter.cs @@ -15,12 +15,12 @@ public FrameworkToJsiiConverter(ITypeCache types) : base(types) { } - public bool TryConvert(IOptionalValue optionalValue, IReferenceMap referenceMap, object value, out object result) + public bool TryConvert(IOptionalValue? optionalValue, IReferenceMap referenceMap, object? value, out object? result) { return TryConvert(optionalValue, typeof(object), referenceMap, value, out result); } - protected override bool TryConvertVoid(object value, out object result) + protected override bool TryConvertVoid(object? value, out object? result) { if (value != null) { @@ -31,7 +31,7 @@ protected override bool TryConvertVoid(object value, out object result) return true; } - protected override bool TryConvertClass(Type type, IReferenceMap referenceMap, object value, out object result) + protected override bool TryConvertClass(Type type, IReferenceMap referenceMap, object? value, out object? result) { if (value == null) { @@ -51,7 +51,7 @@ protected override bool TryConvertClass(Type type, IReferenceMap referenceMap, o var data = new JObject(); foreach (var prop in value.GetType().GetProperties()) { - var jsiiProperty = (JsiiPropertyAttribute) prop.GetCustomAttribute(typeof(JsiiPropertyAttribute), true); + var jsiiProperty = (JsiiPropertyAttribute?) prop.GetCustomAttribute(typeof(JsiiPropertyAttribute), true); if (jsiiProperty == null) { continue; @@ -86,8 +86,7 @@ protected override bool TryConvertClass(Type type, IReferenceMap referenceMap, o return false; } - protected override bool TryConvertEnum(object value, bool isOptional, string fullyQualifiedName, - out object result) + protected override bool TryConvertEnum(object? value, bool isOptional, string fullyQualifiedName, out object? result) { if (value == null) { @@ -96,7 +95,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful } Type valueType = value.GetType(); - JsiiEnumAttribute attribute = value.GetType().GetCustomAttribute(); + JsiiEnumAttribute? attribute = value.GetType().GetCustomAttribute(); if (attribute == null || attribute.FullyQualifiedName != fullyQualifiedName) { @@ -104,7 +103,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful return false; } - string valueName = Enum.GetName(valueType, value); + string? valueName = Enum.GetName(valueType, value); FieldInfo fieldInfo = valueType.GetFields().FirstOrDefault(field => field.Name == valueName); if (fieldInfo == null) @@ -113,7 +112,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful return false; } - JsiiEnumMemberAttribute memberAttribute = fieldInfo.GetCustomAttribute(); + JsiiEnumMemberAttribute? memberAttribute = fieldInfo.GetCustomAttribute(); if (memberAttribute == null) { result = null; @@ -124,7 +123,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful return true; } - protected override bool TryConvertBoolean(object value, bool isOptional, out object result) + protected override bool TryConvertBoolean(object? value, bool isOptional, out object? result) { if (value == null) { @@ -134,7 +133,7 @@ protected override bool TryConvertBoolean(object value, bool isOptional, out obj if (value.GetType().IsAssignableFrom(typeof(bool))) { - result = value; + result = (bool)value; return true; } @@ -142,7 +141,7 @@ protected override bool TryConvertBoolean(object value, bool isOptional, out obj return false; } - protected override bool TryConvertDate(object value, bool isOptional, out object result) + protected override bool TryConvertDate(object? value, bool isOptional, out object? result) { if (value == null) { @@ -160,7 +159,7 @@ protected override bool TryConvertDate(object value, bool isOptional, out object return false; } - protected override bool TryConvertJson(object value, out object result) + protected override bool TryConvertJson(object? value, out object? result) { if (value == null) { @@ -178,7 +177,7 @@ protected override bool TryConvertJson(object value, out object result) return false; } - protected override bool TryConvertNumber(object value, bool isOptional, out object result) + protected override bool TryConvertNumber(object? value, bool isOptional, out object? result) { if (value == null) { @@ -196,7 +195,7 @@ protected override bool TryConvertNumber(object value, bool isOptional, out obje return false; } - protected override bool TryConvertString(object value, out object result) + protected override bool TryConvertString(object? value, out object? result) { if (value == null) { @@ -214,8 +213,7 @@ protected override bool TryConvertString(object value, out object result) return false; } - protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementType, object value, - out object result) + protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementType, object? value, out object? result) { if (value == null) { @@ -232,9 +230,9 @@ protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReferenc Array array = (Array) value; JArray resultArray = new JArray(); - foreach (object element in array) + foreach (object? element in array) { - if (!TryConvertCollectionElement(element, referenceMap, elementType, out object convertedElement)) + if (!TryConvertCollectionElement(element, referenceMap, elementType, out object? convertedElement)) { result = null; return false; @@ -247,8 +245,7 @@ protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReferenc return true; } - protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementType, object value, - out object result) + protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementType, object? value, out object? result) { if (value == null) { @@ -256,7 +253,7 @@ protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference return true; } - Type valueType = value.GetType(); + Type valueType = value.GetType()!; Type dictionaryInterface = valueType.GetInterfaces() .FirstOrDefault(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IDictionary<,>)); @@ -267,15 +264,15 @@ protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference return false; } - IEnumerable keys = (IEnumerable) valueType.GetProperty("Keys").GetValue(value); + IEnumerable keys = (IEnumerable) valueType.GetProperty("Keys")!.GetValue(value)!; PropertyInfo indexer = ReflectionUtils.GetIndexer(valueType); JObject resultObject = new JObject(); foreach (string key in keys) { - object element = indexer.GetValue(value, new object[] {key}); + object? element = indexer.GetValue(value, new object[] {key}); - if (!TryConvertCollectionElement(element, referenceMap, elementType, out object convertedElement)) + if (!TryConvertCollectionElement(element, referenceMap, elementType, out object? convertedElement)) { result = null; return false; @@ -297,13 +294,12 @@ protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference /// The TypeReference of the element, as seen by Jsii /// out: the converted element /// True if the conversion was successful, false otherwise - private bool TryConvertCollectionElement(object element, IReferenceMap referenceMap, TypeReference elementType, - out object convertedElement) + private bool TryConvertCollectionElement(object? element, IReferenceMap referenceMap, TypeReference elementType, out object? convertedElement) { if (element is IDictionary || element is object[]) { var objectType = InferType(referenceMap, element); - var nestedType = elementType.Primitive == PrimitiveType.Any ? elementType : objectType.Collection.ElementType; + var nestedType = elementType.Primitive == PrimitiveType.Any ? elementType : objectType.Collection?.ElementType; switch (objectType.Collection?.Kind) { case CollectionKind.Map: @@ -313,15 +309,13 @@ private bool TryConvertCollectionElement(object element, IReferenceMap reference // So we can directly convert to another map here, and forgo the type hierarchy // induced by elementType // See https://github.com/aws/aws-cdk/issues/2496 - return TryConvertMap(referenceMap, nestedType, element, - out convertedElement); + return TryConvertMap(referenceMap, nestedType!, element, out convertedElement); case CollectionKind.Array: // The [object] could be another array. (ie Tags) // https://github.com/aws/aws-cdk/issues/3244 - return TryConvertArray(referenceMap, nestedType, element, - out convertedElement); + return TryConvertArray(referenceMap, nestedType!, element, out convertedElement); default: - return TryConvert(elementType, typeof(object), referenceMap, element, out convertedElement); + return TryConvert(elementType!, typeof(object), referenceMap, element, out convertedElement); } } else @@ -341,19 +335,19 @@ TypeReference InferType(IReferenceMap referenceMap, Type type) { type = type ?? throw new ArgumentNullException(nameof(type)); - JsiiClassAttribute classAttribute = ReflectionUtils.GetClassAttribute(type); + var classAttribute = ReflectionUtils.GetClassAttribute(type); if (classAttribute != null) { return new TypeReference(classAttribute.FullyQualifiedName); } - JsiiEnumAttribute enumAttribute = type.GetCustomAttribute(); + var enumAttribute = type.GetCustomAttribute(); if (enumAttribute != null) { return new TypeReference(enumAttribute.FullyQualifiedName); } - JsiiByValueAttribute structAttribute = type.GetCustomAttribute(); + var structAttribute = type.GetCustomAttribute(); if (structAttribute != null) { return new TypeReference(structAttribute.FullyQualifiedName); @@ -393,7 +387,7 @@ TypeReference InferType(IReferenceMap referenceMap, Type type) kind: CollectionKind.Array, elementType: typeof(Object) == type.GetElementType() ? new TypeReference(primitive: PrimitiveType.Any) - : InferType(referenceMap, type.GetElementType()) + : InferType(referenceMap, type.GetElementType()!) ) ); } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IFrameworkToJsiiConverter.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IFrameworkToJsiiConverter.cs index 948fd7185c..94a0b6e62d 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IFrameworkToJsiiConverter.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IFrameworkToJsiiConverter.cs @@ -4,6 +4,6 @@ namespace Amazon.JSII.Runtime.Services.Converters { internal interface IFrameworkToJsiiConverter { - bool TryConvert(IOptionalValue optionalValue, IReferenceMap referenceMap, object value, out object result); + bool TryConvert(IOptionalValue? optionalValue, IReferenceMap referenceMap, object? value, out object? result); } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IJsiiToFrameworkConverter.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IJsiiToFrameworkConverter.cs index 9955f35897..445198c48e 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IJsiiToFrameworkConverter.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/IJsiiToFrameworkConverter.cs @@ -4,6 +4,6 @@ namespace Amazon.JSII.Runtime.Services.Converters { internal interface IJsiiToFrameworkConverter { - bool TryConvert(IOptionalValue optionalValue, System.Type type, IReferenceMap referenceMap, object value, out object result); + bool TryConvert(IOptionalValue? optionalValue, System.Type type, IReferenceMap referenceMap, object? value, out object? result); } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/JsiiToFrameworkConverter.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/JsiiToFrameworkConverter.cs index 797f07ef1f..d2ab57cc47 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/JsiiToFrameworkConverter.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/JsiiToFrameworkConverter.cs @@ -13,7 +13,7 @@ public JsiiToFrameworkConverter(ITypeCache types) : base(types) { } - protected override bool TryConvertVoid(object value, out object result) + protected override bool TryConvertVoid(object? value, out object? result) { if (value != null && (value as JToken)?.Type != JTokenType.Null) { @@ -25,7 +25,7 @@ protected override bool TryConvertVoid(object value, out object result) } - protected override bool TryConvertClass(System.Type type, IReferenceMap referenceMap, object value, out object result) + protected override bool TryConvertClass(System.Type type, IReferenceMap referenceMap, object? value, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -35,7 +35,7 @@ protected override bool TryConvertClass(System.Type type, IReferenceMap referenc if (value is JObject jsonValue && jsonValue.ContainsKey("$jsii.byref")) { - ByRefValue byRefValue = jsonValue.ToObject(); + ByRefValue byRefValue = jsonValue.ToObject()!; result = referenceMap.GetOrCreateNativeReference(byRefValue); @@ -51,7 +51,7 @@ protected override bool TryConvertClass(System.Type type, IReferenceMap referenc return false; } - protected override bool TryConvertEnum(object value, bool isOptional, string fullyQualifiedName, out object result) + protected override bool TryConvertEnum(object? value, bool isOptional, string fullyQualifiedName, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -61,7 +61,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful if (value is JObject jsonValue && jsonValue.ContainsKey("$jsii.enum")) { - EnumValue enumValue = jsonValue.ToObject(); + EnumValue enumValue = jsonValue.ToObject()!; if (enumValue.FullyQualifiedName == fullyQualifiedName) { System.Type enumType = _types.GetEnumType(fullyQualifiedName); @@ -76,7 +76,7 @@ protected override bool TryConvertEnum(object value, bool isOptional, string ful return false; } - protected override bool TryConvertBoolean(object value, bool isOptional, out object result) + protected override bool TryConvertBoolean(object? value, bool isOptional, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -86,7 +86,7 @@ protected override bool TryConvertBoolean(object value, bool isOptional, out obj if (value.GetType().IsAssignableFrom(typeof(bool))) { - result = value; + result = (bool)value; return true; } @@ -100,7 +100,7 @@ protected override bool TryConvertBoolean(object value, bool isOptional, out obj return false; } - protected override bool TryConvertDate(object value, bool isOptional, out object result) + protected override bool TryConvertDate(object? value, bool isOptional, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -110,7 +110,7 @@ protected override bool TryConvertDate(object value, bool isOptional, out object if (value is JObject jsonValue && jsonValue.ContainsKey("$jsii.date")) { - result = jsonValue.ToObject().DateTime; + result = jsonValue.ToObject()!.DateTime; return true; } @@ -118,7 +118,7 @@ protected override bool TryConvertDate(object value, bool isOptional, out object return false; } - protected override bool TryConvertJson(object value, out object result) + protected override bool TryConvertJson(object? value, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -136,7 +136,7 @@ protected override bool TryConvertJson(object value, out object result) return false; } - protected override bool TryConvertNumber(object value, bool isOptional, out object result) + protected override bool TryConvertNumber(object? value, bool isOptional, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -165,7 +165,7 @@ protected override bool TryConvertNumber(object value, bool isOptional, out obje return false; } - protected override bool TryConvertString(object value, out object result) + protected override bool TryConvertString(object? value, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -189,7 +189,7 @@ protected override bool TryConvertString(object value, out object result) return false; } - protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementTypeInstance, object value, out object result) + protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementTypeInstance, object? value, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -204,7 +204,7 @@ protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReferenc for (int i = 0; i < array.Count; i++) { - if (!TryConvert(elementTypeInstance, elementType, referenceMap, array[i], out object convertedElement)) + if (!TryConvert(elementTypeInstance, elementType, referenceMap, array[i], out object? convertedElement)) { throw new ArgumentException("Could not convert all elements of array", nameof(value)); } @@ -220,7 +220,7 @@ protected override bool TryConvertArray(IReferenceMap referenceMap, TypeReferenc return false; } - protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementTypeInstance, object value, out object result) + protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementTypeInstance, object? value, out object? result) { if (value == null || (value as JToken)?.Type == JTokenType.Null) { @@ -233,18 +233,18 @@ protected override bool TryConvertMap(IReferenceMap referenceMap, TypeReference var elementType = _types.GetFrameworkType(elementTypeInstance, false); var dictionaryType = typeof(Dictionary<,>).MakeGenericType(typeof(string), elementType); - var dictionaryConstructor = dictionaryType.GetConstructor(new System.Type[] { }); - var dictionaryAddMethod = dictionaryType.GetMethod("Add", new [] { typeof(string), elementType }); + var dictionaryConstructor = dictionaryType.GetConstructor(new System.Type[] { })!; + var dictionaryAddMethod = dictionaryType.GetMethod("Add", new [] { typeof(string), elementType })!; var dictionary = dictionaryConstructor.Invoke(new object[] { }); if (jsonObject.ContainsKey("$jsii.map")) { - jsonObject = (JObject)jsonObject["$jsii.map"]; + jsonObject = (JObject)jsonObject["$jsii.map"]!; } foreach (JProperty property in jsonObject.Properties()) { - if (!TryConvert(elementTypeInstance, elementType, referenceMap, property.Value, out object convertedElement)) + if (!TryConvert(elementTypeInstance, elementType, referenceMap, property.Value, out object? convertedElement)) { throw new ArgumentException("Could not convert all elements of map", nameof(value)); } @@ -276,11 +276,11 @@ protected override TypeReference InferType(IReferenceMap referenceMap, object va } if (jObject.ContainsKey("$jsii.enum")) { - return new TypeReference(jObject.ToObject().FullyQualifiedName); + return new TypeReference(jObject.ToObject()!.FullyQualifiedName); } if (jObject.ContainsKey("$jsii.byref")) { - return new TypeReference(jObject.ToObject().FullyQualifiedName); + return new TypeReference(jObject.ToObject()!.FullyQualifiedName); } // At this point, we can't distinguish between a PrimitiveType.Json and a CollectionKind.Map, diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/ValueConverter.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/ValueConverter.cs index 57efca75a1..a53406a755 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/ValueConverter.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/Converters/ValueConverter.cs @@ -13,12 +13,12 @@ protected ValueConverter(ITypeCache types) _types = types ?? throw new ArgumentNullException(nameof(types)); } - protected bool TryConvert(TypeReference typeReference, System.Type type, IReferenceMap referenceMap, object value, out object result) + protected bool TryConvert(TypeReference typeReference, System.Type type, IReferenceMap referenceMap, object? value, out object? result) { return TryConvert(new OptionalValue(typeReference), type, referenceMap, value, out result); } - public bool TryConvert(IOptionalValue optionalValue, System.Type type, IReferenceMap referenceMap, object value, out object result) + public bool TryConvert(IOptionalValue? optionalValue, System.Type type, IReferenceMap referenceMap, object? value, out object? result) { if (optionalValue == null) { @@ -61,29 +61,29 @@ protected bool IsNumeric(System.Type type) typeof(double).IsAssignableFrom(type); } - protected abstract bool TryConvertVoid(object value, out object result); + protected abstract bool TryConvertVoid(object? value, out object? result); - protected abstract bool TryConvertClass(System.Type type, IReferenceMap referenceMap, object value, out object result); + protected abstract bool TryConvertClass(System.Type type, IReferenceMap referenceMap, object? value, out object? result); - protected abstract bool TryConvertEnum(object value, bool isOptional, string fullyQualifiedName, out object result); + protected abstract bool TryConvertEnum(object? value, bool isOptional, string fullyQualifiedName, out object? result); - protected abstract bool TryConvertBoolean(object value, bool isOptional, out object result); + protected abstract bool TryConvertBoolean(object? value, bool isOptional, out object? result); - protected abstract bool TryConvertDate(object value, bool isOptional, out object result); + protected abstract bool TryConvertDate(object? value, bool isOptional, out object? result); - protected abstract bool TryConvertJson(object value, out object result); + protected abstract bool TryConvertJson(object? value, out object? result); - protected abstract bool TryConvertNumber(object value, bool isOptional, out object result); + protected abstract bool TryConvertNumber(object? value, bool isOptional, out object? result); - protected abstract bool TryConvertString(object value, out object result); + protected abstract bool TryConvertString(object? value, out object? result); - protected abstract bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementType, object value, out object result); + protected abstract bool TryConvertArray(IReferenceMap referenceMap, TypeReference elementType, object? value, out object? result); - protected abstract bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementType, object value, out object result); + protected abstract bool TryConvertMap(IReferenceMap referenceMap, TypeReference elementType, object? value, out object? result); protected abstract TypeReference InferType(IReferenceMap referenceMap, object value); - object ConvertAny(System.Type type, IReferenceMap referenceMap, object value) + object? ConvertAny(System.Type type, IReferenceMap referenceMap, object? value) { if (value == null) { @@ -91,7 +91,7 @@ object ConvertAny(System.Type type, IReferenceMap referenceMap, object value) } TypeReference reference = InferType(referenceMap, value); - if (TryConvert(reference, type, referenceMap, value, out object result)) + if (TryConvert(reference, type, referenceMap, value, out object? result)) { return result; } @@ -99,14 +99,14 @@ object ConvertAny(System.Type type, IReferenceMap referenceMap, object value) throw new ArgumentException($"Could not convert value '{value}' with unrecognized type", nameof(value)); } - bool TryConvertCustomType(System.Type type, IReferenceMap referenceMap, object value, bool isOptional, string fullyQualifiedName, out object result) + bool TryConvertCustomType(System.Type type, IReferenceMap referenceMap, object? value, bool isOptional, string fullyQualifiedName, out object? result) { if (IsReferenceType()) { return TryConvertClass(type, referenceMap, value, out result); } - if (_types.GetEnumType(fullyQualifiedName) != null) + if (_types.TryGetEnumType(fullyQualifiedName) != null) { return TryConvertEnum(value, isOptional, fullyQualifiedName, out result); } @@ -117,13 +117,13 @@ bool TryConvertCustomType(System.Type type, IReferenceMap referenceMap, object v bool IsReferenceType() { return - _types.GetClassType(fullyQualifiedName) != null || - _types.GetInterfaceType(fullyQualifiedName) != null || - _types.GetProxyType(fullyQualifiedName) != null; + _types.TryGetClassType(fullyQualifiedName) != null || + _types.TryGetInterfaceType(fullyQualifiedName) != null || + _types.TryGetProxyType(fullyQualifiedName) != null; } } - bool TryConvertPrimitive(System.Type type, IReferenceMap referenceMap, object value, bool isOptional, PrimitiveType primitiveType, out object result) + bool TryConvertPrimitive(System.Type type, IReferenceMap referenceMap, object? value, bool isOptional, PrimitiveType primitiveType, out object? result) { switch (primitiveType) { @@ -151,7 +151,7 @@ bool TryConvertPrimitive(System.Type type, IReferenceMap referenceMap, object va } } - bool TryConvertCollection(IReferenceMap referenceMap, object value, bool isOptional, CollectionTypeReference collectionType, out object result) + bool TryConvertCollection(IReferenceMap referenceMap, object? value, bool isOptional, CollectionTypeReference collectionType, out object? result) { switch (collectionType.Kind) { @@ -164,7 +164,7 @@ bool TryConvertCollection(IReferenceMap referenceMap, object value, bool isOptio } } - bool TryConvertUnion(System.Type type, IReferenceMap referenceMap, object value, bool isOptional, UnionTypeReference unionType, out object result) + bool TryConvertUnion(System.Type type, IReferenceMap referenceMap, object? value, bool isOptional, UnionTypeReference unionType, out object? result) { foreach (var candidateType in unionType.Types) { diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IClient.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IClient.cs index 1ba3cbe055..c596e778b5 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IClient.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IClient.cs @@ -14,7 +14,7 @@ internal interface IClient LoadResponse Load(LoadRequest request); - CreateResponse Create(string fullyQualifiedName, object[] arguments = null, Override[] overrides = null, string[] interfaces = null); + CreateResponse Create(string fullyQualifiedName, object?[]? arguments = null, Override[]? overrides = null, string[]? interfaces = null); CreateResponse Create(CreateRequest request); @@ -30,23 +30,23 @@ internal interface IClient GetResponse StaticGet(StaticGetRequest request); - SetResponse Set(ObjectReference objectReference, string property, object value); + SetResponse Set(ObjectReference objectReference, string property, object? value); SetResponse Set(SetRequest request); - SetResponse StaticSet(string fullyQualifiedName, string property, object value); + SetResponse StaticSet(string fullyQualifiedName, string property, object? value); SetResponse StaticSet(StaticSetRequest request); - InvokeResponse Invoke(ObjectReference objectReference, string method, object[] arguments = null); + InvokeResponse Invoke(ObjectReference objectReference, string method, object?[]? arguments = null); InvokeResponse Invoke(InvokeRequest request); - InvokeResponse StaticInvoke(string fullyQualifiedName, string method, object[] arguments = null); + InvokeResponse StaticInvoke(string fullyQualifiedName, string method, object?[]? arguments = null); InvokeResponse StaticInvoke(StaticInvokeRequest request); - BeginResponse Begin(ObjectReference objectReference, string method, object[] arguments = null); + BeginResponse Begin(ObjectReference objectReference, string method, object?[]? arguments = null); BeginResponse Begin(BeginRequest request); @@ -58,7 +58,7 @@ internal interface IClient CallbacksResponse Callbacks(CallbacksRequest request); - CompleteResponse Complete(string callbackId, string error = null, object result = null); + CompleteResponse Complete(string callbackId, string? error = null, object? result = null); CompleteResponse Complete(CompleteRequest request); diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IJsiiRuntimeProvider.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IJsiiRuntimeProvider.cs index 42cdd4104a..3181900d38 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IJsiiRuntimeProvider.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IJsiiRuntimeProvider.cs @@ -2,6 +2,6 @@ { internal interface IJsiiRuntimeProvider { - string JsiiRuntimePath { get; } + string? JsiiRuntimePath { get; } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IResourceExtractor.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IResourceExtractor.cs index 5db416dcc8..ec06b385d3 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IResourceExtractor.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/IResourceExtractor.cs @@ -5,6 +5,6 @@ namespace Amazon.JSII.Runtime.Services { internal interface IResourceExtractor : IDisposable { - string ExtractResource(Assembly assembly, string resourceName, string bag = "default", string fileName = null); + string ExtractResource(Assembly assembly, string resourceName, string bag = "default", string? fileName = null); } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ITypeCache.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ITypeCache.cs index 551bd56870..53c2dcf8a9 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ITypeCache.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ITypeCache.cs @@ -1,18 +1,41 @@ using Amazon.JSII.JsonModel.Spec; -using Type = System.Type; namespace Amazon.JSII.Runtime.Services { internal interface ITypeCache { - Type GetClassType(string fullyQualifiedName); + System.Type? TryGetClassType(string fullyQualifiedName); - Type GetEnumType(string fullyQualifiedName); + System.Type? TryGetEnumType(string fullyQualifiedName); - Type GetInterfaceType(string fullyQualifiedName); + System.Type? TryGetInterfaceType(string fullyQualifiedName); - Type GetProxyType(string fullyQualifiedName); + System.Type? TryGetProxyType(string fullyQualifiedName); + + System.Type GetClassType(string fullyQualifiedName) + { + return TryGetClassType(fullyQualifiedName) + ?? throw new JsiiException($"Unable to find class for jsii FQN \"{fullyQualifiedName}\""); + } - Type GetFrameworkType(TypeReference reference, bool isOptional); + System.Type GetEnumType(string fullyQualifiedName) + { + return TryGetEnumType(fullyQualifiedName) + ?? throw new JsiiException($"Unable to find enum for jsii FQN \"{fullyQualifiedName}\""); + } + + System.Type GetInterfaceType(string fullyQualifiedName) + { + return TryGetInterfaceType(fullyQualifiedName) + ?? throw new JsiiException($"Unable to find interface for jsii FQN \"{fullyQualifiedName}\""); + } + + System.Type GetProxyType(string fullyQualifiedName) + { + return TryGetProxyType(fullyQualifiedName) + ?? throw new JsiiException($"Unable to find proxy type for jsii FQN \"{fullyQualifiedName}\""); + } + + System.Type GetFrameworkType(TypeReference reference, bool isOptional); } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs index 853379c0ca..49338810d8 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/JsiiRuntimeProvider.cs @@ -24,6 +24,6 @@ public JsiiRuntimeProvider(IResourceExtractor resourceExtractor) } } - public string JsiiRuntimePath { get; } + public string? JsiiRuntimePath { get; } } } diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ReferenceMap.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ReferenceMap.cs index 90ffc33be7..120d7c7200 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ReferenceMap.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ReferenceMap.cs @@ -30,7 +30,7 @@ public void AddNativeReference(ByRefValue reference, DeputyBase nativeReference, public DeputyBase GetOrCreateNativeReference(ObjectReference reference) { - return GetOrCreateNativeReference(new ByRefValue(reference["$jsii.byref"] as string)); + return GetOrCreateNativeReference(new ByRefValue((reference["$jsii.byref"] as string)!)); } public DeputyBase GetOrCreateNativeReference(ByRefValue byRefValue) @@ -64,7 +64,7 @@ ConstructorInfo GetByRefConstructor() } BindingFlags constructorFlags = BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; - ConstructorInfo constructorInfo = type.GetConstructor(constructorFlags, null, new[] {typeof(ByRefValue)}, null); + ConstructorInfo? constructorInfo = type.GetConstructor(constructorFlags, null, new[] {typeof(ByRefValue)}, null); if (constructorInfo == null) { throw new JsiiException($"Could not find constructor to initialize {type.FullName} with a {typeof(ByRefValue).FullName}"); diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs index 060b0d5e7c..2263f914aa 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ResourceExtractor.cs @@ -16,10 +16,9 @@ public ResourceExtractor(IFileSystem fileSystem) _fileSystem = fileSystem; } - public string ExtractResource(Assembly assembly, string resourceName, string bag, string fileName) + public string ExtractResource(Assembly assembly, string resourceName, string bag, string? fileName) { - string workingDirectory = null; - if (!_bags.TryGetValue(bag, out workingDirectory)) + if (!_bags.TryGetValue(bag, out var workingDirectory)) { workingDirectory = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); _fileSystem.Directory.CreateDirectory(workingDirectory); @@ -28,8 +27,8 @@ public string ExtractResource(Assembly assembly, string resourceName, string bag var outputPath = Path.Combine(workingDirectory, fileName ?? resourceName); using (var output = _fileSystem.File.Create(outputPath)) - using (var stream = assembly.GetManifestResourceStream(resourceName)) { + using var stream = assembly.GetManifestResourceStream(resourceName); if (stream == null) { throw new JsiiException("Cannot find embedded resource: " + resourceName + " in assembly " + assembly.GetName(), null); diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs index e934d5f330..42e74f7bee 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/ServiceContainer.cs @@ -7,18 +7,18 @@ namespace Amazon.JSII.Runtime.Services { - internal static class ServiceContainer + public static class ServiceContainer { private static readonly Lazy _serviceProvider = new Lazy( () => BuildServiceProvider(), LazyThreadSafetyMode.ExecutionAndPublication ); - public static IServiceProvider ServiceProviderOverride { get; set; } + public static IServiceProvider? ServiceProviderOverride { get; set; } - public static IServiceProvider ServiceProvider => ServiceProviderOverride ?? _serviceProvider.Value; + internal static IServiceProvider ServiceProvider => ServiceProviderOverride ?? _serviceProvider.Value; - public static IServiceProvider BuildServiceProvider(ILoggerFactory loggerFactoryOverride = null) + public static IServiceProvider BuildServiceProvider(ILoggerFactory? loggerFactoryOverride = null) { IServiceCollection serviceCollection = new ServiceCollection(); diff --git a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/TypeCache.cs b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/TypeCache.cs index d495d65145..e7f6e2c168 100644 --- a/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/TypeCache.cs +++ b/packages/@jsii/dotnet-runtime/src/Amazon.JSII.Runtime/Services/TypeCache.cs @@ -29,48 +29,43 @@ public TypeCache(ILoggerFactory loggerFactory) _types = new Dictionary(); } - public Type GetClassType(string fullyQualifiedName) + public Type? TryGetClassType(string fullyQualifiedName) { - return GetType(fullyQualifiedName); + return TryGetType(fullyQualifiedName); } - public Type GetEnumType(string fullyQualifiedName) + public Type? TryGetEnumType(string fullyQualifiedName) { - return GetType(fullyQualifiedName); + return TryGetType(fullyQualifiedName); } - public Type GetInterfaceType(string fullyQualifiedName) + public Type? TryGetInterfaceType(string fullyQualifiedName) { - return GetType(fullyQualifiedName); + return TryGetType(fullyQualifiedName); } - public Type GetProxyType(string fullyQualifiedName) + public Type? TryGetProxyType(string fullyQualifiedName) { - return GetType(fullyQualifiedName + ProxySuffix); + return TryGetType(fullyQualifiedName + ProxySuffix); } - public Type GetFrameworkType(IOptionalValue instance) - { - return GetFrameworkType(instance?.Type, instance?.IsOptional ?? false); - } - public Type GetFrameworkType(TypeReference typeReference, bool isOptional) { if (typeReference.FullyQualifiedName != null) { - Type classType = GetClassType(typeReference.FullyQualifiedName); + var classType = TryGetClassType(typeReference.FullyQualifiedName); if (classType != null) { return classType; } - Type enumType = GetEnumType(typeReference.FullyQualifiedName); + var enumType = TryGetEnumType(typeReference.FullyQualifiedName); if (enumType != null) { return MakeNullableIfOptional(enumType); } - Type interfaceType = GetInterfaceType(typeReference.FullyQualifiedName); + var interfaceType = TryGetInterfaceType(typeReference.FullyQualifiedName); if (interfaceType != null) { return interfaceType; @@ -128,14 +123,14 @@ Type MakeNullableIfOptional(Type type) } } - Type GetType(string fullyQualifiedName) where T : JsiiTypeAttributeBase + private Type? TryGetType(string fullyQualifiedName) where T : JsiiTypeAttributeBase { if (fullyQualifiedName == "Object") { return typeof(AnonymousObject); } - Type type = null; + Type? type = null; lock (_lock) { @@ -147,9 +142,7 @@ Type GetType(string fullyQualifiedName) where T : JsiiTypeAttributeBase } } - return type?.GetCustomAttribute() == null ? - null : - type; + return type?.GetCustomAttribute() == null ? null : type; } void Refresh() @@ -158,9 +151,9 @@ void Refresh() Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly assembly in assemblies) { - if (!_assemblies.Contains(assembly.FullName)) + if (!_assemblies.Contains(assembly.FullName!)) { - _assemblies.Add(assembly.FullName); + _assemblies.Add(assembly.FullName!); CacheTypes(assembly); } } @@ -192,7 +185,7 @@ void CacheTypes(Assembly assembly) } } - IEnumerable GetTypes(Assembly assembly) + IEnumerable? GetTypes(Assembly assembly) { try { @@ -201,9 +194,12 @@ IEnumerable GetTypes(Assembly assembly) catch (ReflectionTypeLoadException e) { _logger.LogWarning("ReflectionTypeLoadException while searching for JSII types. Loader exceptions:"); - foreach (Exception loaderException in e.LoaderExceptions) + foreach (Exception? loaderException in e.LoaderExceptions ?? new Exception?[] {}) { - _logger.LogWarning(loaderException.ToString()); + if (loaderException != null) + { + _logger.LogWarning(loaderException.ToString()); + } } return e.Types; diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts index 346e1157bc..5fc04d583e 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnetgenerator.ts @@ -186,8 +186,8 @@ export class DotNetGenerator extends Generator { } // Specifying that a type is nullable is only required for primitive value types - const isOptionalPrimitive = this.isOptionalPrimitive(prop) ? '?' : ''; - this.code.openBlock(`${propType}${isOptionalPrimitive} ${propName}`); + const isOptional = prop.optional ? '?' : ''; + this.code.openBlock(`${propType}${isOptional} ${propName}`); if (prop.optional) { this.code.openBlock('get'); @@ -265,7 +265,8 @@ export class DotNetGenerator extends Generator { // Abstract classes have protected constructors. const visibility = cls.abstract ? 'protected' : 'public'; - this.code.openBlock(`${visibility} ${className}(${parametersDefinition}): base(new DeputyProps(new object[]{${parametersBase}}))`); + const hasOptional = initializer.parameters?.find(param => param.optional) != null ? '?' : ''; + this.code.openBlock(`${visibility} ${className}(${parametersDefinition}): base(new DeputyProps(new object${hasOptional}[]{${parametersBase}}))`); this.code.closeBlock(); this.code.line(); } @@ -397,7 +398,8 @@ export class DotNetGenerator extends Generator { } const access = this.renderAccessLevel(method); const methodName = this.nameutils.convertMethodName(method.name); - const signature = `${returnType} ${methodName}(${this.renderMethodParameters(method)})`; + const isOptional = method.returns && method.returns.optional ? '?' : ''; + const signature = `${returnType}${isOptional} ${methodName}(${this.renderMethodParameters(method)})`; this.dotnetDocGenerator.emitDocs(method); this.dotnetRuntimeGenerator.emitAttributesForMethod(cls, method/*, emitForProxyOrDatatype*/); @@ -478,7 +480,7 @@ export class DotNetGenerator extends Generator { let type = this.typeresolver.toDotNetType(p.type); if (p.optional) { optionalKeyword = ' = null'; - if (this.isOptionalPrimitive(p)) { + if (p.optional) { optionalPrimitive = '?'; } @@ -493,27 +495,6 @@ export class DotNetGenerator extends Generator { return params.join(', '); } - private isOptionalPrimitive(optionalValue: spec.OptionalValue | undefined): boolean { - if (!optionalValue || !optionalValue.optional) { - return false; - } - - // If the optional type is an enum then we need to flag it as ? - const typeref = optionalValue.type as spec.NamedTypeReference; - let isOptionalEnum = false; - if (typeref && typeref.fqn) { - const type = this.findType(typeref.fqn); - isOptionalEnum = type.kind === spec.TypeKind.Enum; - } - - return (spec.isPrimitiveTypeReference(optionalValue.type) - // In .NET, string or object is a reference type, and can be nullable - && optionalValue.type.primitive !== spec.PrimitiveType.String - && optionalValue.type.primitive !== spec.PrimitiveType.Any - && optionalValue.type.primitive !== spec.PrimitiveType.Json) // Json is not a primitive in .NET - || isOptionalEnum; - } - /** * Emits an interface proxy for an interface or an abstract class. */ @@ -558,6 +539,13 @@ export class DotNetGenerator extends Generator { const namespace = ifc.namespace ? `${this.assembly.targets!.dotnet!.namespace}.${ifc.namespace}` : this.assembly.targets!.dotnet!.namespace; const isNested = this.isNested(ifc); this.openFileIfNeeded(name, namespace, isNested); + + if (ifc.properties?.find(prop => !prop.optional) != null) { + // We don't want to be annoyed by the lack of initialization of non-nullable fields in this case. + this.code.line('#pragma warning disable CS8618'); + this.code.line(); + } + this.dotnetDocGenerator.emitDocs(ifc); const suffix = `: ${this.typeresolver.toNativeFqn(ifc.fqn)}`; this.dotnetRuntimeGenerator.emitAttributesForInterfaceDatatype(ifc); @@ -687,8 +675,8 @@ export class DotNetGenerator extends Generator { } const propTypeFQN = this.typeresolver.toDotNetType(prop.type); - const isOptionalPrimitive = this.isOptionalPrimitive(prop) ? '?' : ''; - const statement = `${access} ${isAbstractKeyword}${isVirtualKeyWord}${isOverrideKeyWord}${staticKeyWord}${propTypeFQN}${isOptionalPrimitive} ${propName}`; + const isOptional = prop.optional ? '?' : ''; + const statement = `${access} ${isAbstractKeyword}${isVirtualKeyWord}${isOverrideKeyWord}${staticKeyWord}${propTypeFQN}${isOptional} ${propName}`; this.code.openBlock(statement); // Emit getters @@ -696,9 +684,9 @@ export class DotNetGenerator extends Generator { this.code.line('get;'); } else { if (prop.static) { - this.code.line(`get => GetStaticProperty<${propTypeFQN}>(typeof(${className}));`); + this.code.line(`get => GetStaticProperty<${propTypeFQN}${isOptional}>(typeof(${className}));`); } else { - this.code.line(`get => GetInstanceProperty<${propTypeFQN}${isOptionalPrimitive}>();`); + this.code.line(`get => GetInstanceProperty<${propTypeFQN}${isOptional}>();`); } } @@ -770,6 +758,11 @@ export class DotNetGenerator extends Generator { this.code.line('using Amazon.JSII.Runtime.Deputy;'); this.code.line(); } + + // Suppress warnings about missing XMLDoc, Obsolete inconsistencies + this.code.line('#pragma warning disable CS0672,CS0809,CS1591'); + this.code.line(); + this.code.openBlock(`namespace ${namespace}`); } diff --git a/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts index cd5274edc7..9602875394 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/dotnetruntimegenerator.ts @@ -142,7 +142,7 @@ export class DotNetRuntimeGenerator { const isStatic = method.static ? 'Static' : 'Instance'; const returns = method.returns ? '' : 'Void'; const invokeMethodName = method.returns ? `return Invoke${isStatic}${returns}Method` : `Invoke${isStatic}${returns}Method`; - const returnType = method.returns ? `<${this.typeresolver.toDotNetType(method.returns.type)}>` : ''; + const returnType = method.returns ? `<${this.typeresolver.toDotNetType(method.returns.type)}${method.returns.optional ? '?' : ''}>` : ''; const typeofStatement = method.static ? `typeof(${className}), ` : ''; const paramTypes = new Array(); const params = new Array(); @@ -152,7 +152,8 @@ export class DotNetRuntimeGenerator { params.push(this.nameutils.convertParameterName(param.name)); } } - return `${invokeMethodName}${returnType}(${typeofStatement}new System.Type[]{${paramTypes.join(', ')}}, new object[]{${params.join(', ')}});`; + const hasOptional = method.parameters?.find(param => param.optional) != null ? '?' : ''; + return `${invokeMethodName}${returnType}(${typeofStatement}new System.Type[]{${paramTypes.join(', ')}}, new object${hasOptional}[]{${params.join(', ')}});`; } /** diff --git a/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts b/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts index e372267753..c4897971df 100644 --- a/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts +++ b/packages/jsii-pacmak/lib/targets/dotnet/filegenerator.ts @@ -85,6 +85,7 @@ export class FileGenerator { propertyGroup.ele('GeneratePackageOnBuild', 'true'); propertyGroup.ele('IncludeSymbols', 'true'); propertyGroup.ele('IncludeSource', 'true'); + propertyGroup.ele('Nullable', 'enable'); propertyGroup.ele('SymbolPackageFormat', 'snupkg'); propertyGroup.ele('TargetFramework', TARGET_FRAMEWORK); diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj index 6f9c453990..0943deac72 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId.csproj @@ -17,6 +17,7 @@ true true true + enable snupkg netcoreapp3.1 diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs index 3a4b4dace1..8b04d8e412 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterface.cs @@ -1,5 +1,7 @@ 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")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs index af20ecc140..b184490c98 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiTypeProxy(nativeType: typeof(IVeryBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base-of-base.IVeryBaseInterface")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs index d0af7ce17b..6d05b140ea 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/IVeryBaseProps.cs @@ -1,5 +1,7 @@ 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")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs index 5cd3ec3cb0..b9f95337e7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Internal/DependencyResolution/Anchor.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace.Internal.DependencyResolution { public sealed class Anchor diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs index ad53ae43e2..5581095168 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/Very.cs @@ -1,5 +1,7 @@ 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.Very), fullyQualifiedName: "@scope/jsii-calc-base-of-base.Very")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs index e3129f5e31..156e210c43 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBaseProps.cs @@ -1,7 +1,11 @@ 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 { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs index cf0420f2c6..96efe8a55e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base-of-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BaseOfBasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseOfBaseNamespace/VeryBasePropsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseOfBaseNamespace { [JsiiTypeProxy(nativeType: typeof(IVeryBaseProps), fullyQualifiedName: "@scope/jsii-calc-base-of-base.VeryBaseProps")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj index eb1589d629..b7c9c7416b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId.csproj @@ -17,6 +17,7 @@ true true true + enable snupkg netcoreapp3.1 diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs index 637c1b11fb..7c246b6788 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Base.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { /// A base class. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs index d8b531c3a6..2e16c03730 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProps.cs @@ -1,7 +1,11 @@ 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 { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs index 72db0f04ec..87883eb6b8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BasePropsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiTypeProxy(nativeType: typeof(IBaseProps), fullyQualifiedName: "@scope/jsii-calc-base.BaseProps")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProxy.cs index 31c2ab627b..d55a255ce7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/BaseProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { /// A base class. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs index b54ad05208..133a9026ca 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterface.cs @@ -1,5 +1,7 @@ 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")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterfaceProxy.cs index 150cd77906..34023d96d3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace { [JsiiTypeProxy(nativeType: typeof(IBaseInterface), fullyQualifiedName: "@scope/jsii-calc-base.IBaseInterface")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs index 802b27ca7b..7bfd86579c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/IBaseProps.cs @@ -1,5 +1,7 @@ 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")] diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs index 4a5728b15d..c15eade3ea 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-base/dotnet/Amazon.JSII.Tests.CalculatorPackageId.BasePackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseNamespace/Internal/DependencyResolution/Anchor.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.BaseNamespace.Internal.DependencyResolution { public sealed class Anchor diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj index dd99e4f551..b5ad472bbd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId.csproj @@ -17,6 +17,7 @@ true true true + enable snupkg netcoreapp3.1 diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs index 276c164875..d8fe0d6101 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/EnumFromScopedModule.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Check that enums from \@scoped packages can be references. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublable.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublable.cs index 5b8b253052..0b72de37a3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublable.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublable.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// The general contract for a concrete number. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublableProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublableProxy.cs index df1834c494..0397f3d6a6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublableProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IDoublableProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// The general contract for a concrete number. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendly.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendly.cs index 7b848e564b..3d6a4a1dc2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendly.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendly.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Applies to classes that are considered friendly. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs index a0f0eb8aa7..f326f6bec1 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IFriendlyProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Applies to classes that are considered friendly. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs index 51a80a1ce2..bbcfb4b507 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IMyFirstStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is the first struct we have created in jsii. @@ -38,7 +40,7 @@ string Astring [JsiiProperty(name: "firstOptional", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string[] FirstOptional + string[]? FirstOptional { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs index e241e750da..e34ad6d126 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IStructWithOnlyOptionals.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. @@ -17,7 +19,7 @@ public interface IStructWithOnlyOptionals [JsiiProperty(name: "optional1", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [System.Obsolete()] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Optional1 + string? Optional1 { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterface.cs index fc1984444f..f7f1d12c86 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Interface that inherits from packages 2 levels up the tree. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterfaceProxy.cs index b765e76646..1387748f36 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/IThreeLevelsInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Interface that inherits from packages 2 levels up the tree. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Internal/DependencyResolution/Anchor.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Internal/DependencyResolution/Anchor.cs index 19be6786f5..a69be45550 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Internal/DependencyResolution/Anchor.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Internal/DependencyResolution/Anchor.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.Internal.DependencyResolution { public sealed class Anchor diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs index 013e29ff19..5e32c5bd76 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { + #pragma warning disable CS8618 + /// This is the first struct we have created in jsii. /// /// Stability: Deprecated @@ -39,7 +43,7 @@ public string Astring [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true, isOverride: true)] [System.Obsolete()] - public string[] FirstOptional + public string[]? FirstOptional { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs index bb39ad7c5d..4ce1eab9f0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/MyFirstStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is the first struct we have created in jsii. @@ -42,9 +44,9 @@ public string Astring [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true)] [System.Obsolete()] - public string[] FirstOptional + public string[]? FirstOptional { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs index 12955c638a..00456a3b2a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Number.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Represents a concrete number. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs index 3ba20f90ae..e8ec34fbab 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Operation.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Represents an operation on values. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/OperationProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/OperationProxy.cs index 9714b432c8..961231dd4e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/OperationProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/OperationProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Represents an operation on values. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs index ab30935098..6c98d38d00 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionals.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. @@ -16,7 +18,7 @@ public class StructWithOnlyOptionals : Amazon.JSII.Tests.CalculatorNamespace.Lib [JsiiOptional] [JsiiProperty(name: "optional1", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] [System.Obsolete()] - public string Optional1 + public string? Optional1 { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs index 895adc0ca9..71da5a9773 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/StructWithOnlyOptionalsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// This is a struct with only optional properties. @@ -21,9 +23,9 @@ private StructWithOnlyOptionalsProxy(ByRefValue reference): base(reference) [JsiiOptional] [JsiiProperty(name: "optional1", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [System.Obsolete()] - public string Optional1 + public string? Optional1 { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/ValueProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/ValueProxy.cs index e8a7fbd579..8f028413aa 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/ValueProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/ValueProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Abstract class which represents a numeric value. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs index f8660293b8..959732b439 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc-lib/dotnet/Amazon.JSII.Tests.CalculatorPackageId.LibPackageId/Amazon/JSII/Tests/CalculatorNamespace/LibNamespace/Value_.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.LibNamespace { /// Abstract class which represents a numeric value. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj index 59cc8277b1..db8a01df9f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon.JSII.Tests.CalculatorPackageId.csproj @@ -19,6 +19,7 @@ true true true + enable snupkg netcoreapp3.1 diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClass.cs index 524e4f2289..674cac8f98 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs index 28560ad4be..04bb8920c1 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBase.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBaseProxy.cs index 68a14e9efc..12666dca56 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBaseProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassBaseProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassProxy.cs index f14b13bcf6..16218d84ec 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassReturner.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassReturner.cs index 5c85d0210d..c6b090cfca 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassReturner.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractClassReturner.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuite.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuite.cs index 9ae43399f5..265cc49202 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuite.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuite.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuiteProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuiteProxy.cs index f934369f95..40d7a376e7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuiteProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AbstractSuiteProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs index 79c938160b..21afd52304 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Add.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "+" binary operation. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs index 86744ecdfa..2c19f2ae0f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypes.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs index c3b8cb2167..f02269efed 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllTypesEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs index 305f206242..bc997d179b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AllowedMethodNames.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AmbiguousParameters.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AmbiguousParameters.cs index 06841034f5..7d8a8b3dee 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AmbiguousParameters.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AmbiguousParameters.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnonymousImplementationProvider.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnonymousImplementationProvider.cs index 149f838e6c..30b741eff4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnonymousImplementationProvider.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AnonymousImplementationProvider.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs index 1c7db20090..111842b88f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AsyncVirtualMethods.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.cs index 1fa12a6269..8014391671 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/AugmentableClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseJsii976.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseJsii976.cs index f70be89ab5..ddab3c0b59 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseJsii976.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BaseJsii976.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Bell.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Bell.cs index 760329b9f8..1422b6b179 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Bell.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Bell.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs index e41074fa5f..628e779eb5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperation.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Represents an operation with two operands. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperationProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperationProxy.cs index 666dba4f56..7873bec4fd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperationProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/BinaryOperationProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Represents an operation with two operands. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs index 3389d4448d..448c28e32f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Calculator.cs @@ -1,5 +1,7 @@ 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. @@ -33,7 +35,7 @@ public class Calculator : Amazon.JSII.Tests.CalculatorNamespace.composition.Comp /// /// Stability: Experimental /// - public Calculator(Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps props = null): base(new DeputyProps(new object[]{props})) + public Calculator(Amazon.JSII.Tests.CalculatorNamespace.ICalculatorProps? props = null): base(new DeputyProps(new object?[]{props})) { } @@ -160,9 +162,9 @@ public virtual double? MaxValue /// [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 + public virtual object? UnionProperty { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs index 4f18fcb317..d1c874f084 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorProps.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs index 611dc8d779..f4add959f6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/CalculatorPropsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs index 77875ccd54..1c27bda562 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982Proxy.cs index 6e7062a181..e54993d05a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ChildStruct982Proxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs index adcfc33e88..1e95857ca2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsTheInternalInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsThePrivateInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsThePrivateInterface.cs index 84631cb92f..d96eeb2564 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsThePrivateInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassThatImplementsThePrivateInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollections.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollections.cs index 85f341ef12..1253a83880 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollections.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithCollections.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithDocs.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithDocs.cs index c8b31cf664..04b2fc29e1 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithDocs.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithDocs.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// This class has docs. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithJavaReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithJavaReservedWords.cs index 87c5ce0395..32d8bf514c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithJavaReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithJavaReservedWords.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithMutableObjectLiteralProperty.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithMutableObjectLiteralProperty.cs index c9f1519d50..75655eff04 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithMutableObjectLiteralProperty.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithMutableObjectLiteralProperty.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithPrivateConstructorAndAutomaticProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithPrivateConstructorAndAutomaticProperties.cs index 07b73e19f3..09263ba3f4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithPrivateConstructorAndAutomaticProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ClassWithPrivateConstructorAndAutomaticProperties.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs index ec73b34ece..a74b653a5a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJackson.cs @@ -1,5 +1,7 @@ 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. @@ -48,9 +50,9 @@ public static Amazon.JSII.Tests.CalculatorNamespace.IConfusingToJacksonStruct Ma /// [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 + public virtual object? UnionProperty { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs index 10abe95267..931605685f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public class ConfusingToJacksonStruct : Amazon.JSII.Tests.CalculatorNamespace.IC /// [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, isOverride: true)] - public object UnionProperty + public object? UnionProperty { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStructProxy.cs index d1a6ac84bc..49c24131e4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConfusingToJacksonStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -17,9 +19,9 @@ private ConfusingToJacksonStructProxy(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 + public object? UnionProperty { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs index 1f0a8552af..33d0c74c81 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConstructorPassesThisOut.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Constructors.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Constructors.cs index 4f35fb273d..55e7618385 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Constructors.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Constructors.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumePureInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumePureInterface.cs index 97bfd04e32..409d7b7445 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumePureInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumePureInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumerCanRingBell.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumerCanRingBell.cs index ad62072985..693e45d5e3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumerCanRingBell.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumerCanRingBell.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Test calling back to consumers that implement interfaces. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumersOfThisCrazyTypeSystem.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumersOfThisCrazyTypeSystem.cs index f7c36255a2..ce7c6630f5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumersOfThisCrazyTypeSystem.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ConsumersOfThisCrazyTypeSystem.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DataRenderer.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DataRenderer.cs index e3c19d311b..6710b1a168 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DataRenderer.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DataRenderer.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies proper type handling through dynamic overrides. @@ -34,9 +36,9 @@ protected DataRenderer(DeputyProps props): base(props) /// Stability: Experimental /// [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) + 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}); + return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.IMyFirstStruct)}, new object?[]{data}); } /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DefaultedConstructorArgument.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DefaultedConstructorArgument.cs index d4614255af..09c247d989 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DefaultedConstructorArgument.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DefaultedConstructorArgument.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -11,7 +13,7 @@ public class DefaultedConstructorArgument : DeputyBase /// /// Stability: Experimental /// - public DefaultedConstructorArgument(double? arg1 = null, string arg2 = null, System.DateTime? arg3 = null): base(new DeputyProps(new object[]{arg1, arg2, arg3})) + public DefaultedConstructorArgument(double? arg1 = null, string? arg2 = null, System.DateTime? arg3 = null): base(new DeputyProps(new object?[]{arg1, arg2, arg3})) { } @@ -52,9 +54,9 @@ public virtual System.DateTime Arg3 /// [JsiiOptional] [JsiiProperty(name: "arg2", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public virtual string Arg2 + public virtual string? Arg2 { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Demonstrate982.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Demonstrate982.cs index bf0a1bf80a..58462c9962 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Demonstrate982.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Demonstrate982.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// 1. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedClass.cs index e5770aeab5..755679743a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public class DeprecatedClass : DeputyBase /// Stability: Deprecated /// [System.Obsolete("this constructor is \"just\" okay")] - public DeprecatedClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object[]{readonlyString, mutableNumber})) + public DeprecatedClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object?[]{readonlyString, mutableNumber})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedEnum.cs index 0d57ca7254..bac1794583 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStruct.cs index b590d6341c..41bdd5203a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Deprecated /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStructProxy.cs index 3430a545df..e09c590c3d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DeprecatedStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs index 90c816bed5..a4bdb00ecd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Base.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs index 6b87db82aa..a15eaf9776 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedClassHasNoProperties/Derived.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.DerivedClassHasNoProperties { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs index a6aa8476ed..3ebd040b64 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStruct.cs @@ -1,7 +1,11 @@ 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. /// /// Stability: Experimental @@ -46,7 +50,7 @@ public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiOptional] [JsiiProperty(name: "anotherOptional", typeJson: "{\"collection\":{\"elementtype\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"},\"kind\":\"map\"}}", isOptional: true, isOverride: true)] - public System.Collections.Generic.IDictionary AnotherOptional + public System.Collections.Generic.IDictionary? AnotherOptional { get; set; @@ -57,7 +61,7 @@ public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiOptional] [JsiiProperty(name: "optionalAny", typeJson: "{\"primitive\":\"any\"}", isOptional: true, isOverride: true)] - public object OptionalAny + public object? OptionalAny { get; set; @@ -68,7 +72,7 @@ public object OptionalAny /// [JsiiOptional] [JsiiProperty(name: "optionalArray", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true, isOverride: true)] - public string[] OptionalArray + public string[]? OptionalArray { get; set; @@ -104,7 +108,7 @@ public string Astring [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true, isOverride: true)] [System.Obsolete()] - public string[] FirstOptional + public string[]? FirstOptional { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs index 17c07fc5b2..d73f819aa6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DerivedStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. @@ -47,9 +49,9 @@ public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiOptional] [JsiiProperty(name: "anotherOptional", typeJson: "{\"collection\":{\"elementtype\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"},\"kind\":\"map\"}}", isOptional: true)] - public System.Collections.Generic.IDictionary AnotherOptional + public System.Collections.Generic.IDictionary? AnotherOptional { - get => GetInstanceProperty>(); + get => GetInstanceProperty?>(); } /// @@ -57,9 +59,9 @@ public Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiOptional] [JsiiProperty(name: "optionalAny", typeJson: "{\"primitive\":\"any\"}", isOptional: true)] - public object OptionalAny + public object? OptionalAny { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// @@ -67,9 +69,9 @@ public object OptionalAny /// [JsiiOptional] [JsiiProperty(name: "optionalArray", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true)] - public string[] OptionalArray + public string[]? OptionalArray { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// An awesome number value. @@ -100,9 +102,9 @@ public string Astring [JsiiOptional] [JsiiProperty(name: "firstOptional", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true)] [System.Obsolete()] - public string[] FirstOptional + public string[]? FirstOptional { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs index f06d4a5dd9..18964efa05 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStructProxy.cs index cb694c3901..2d3b621874 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceBaseLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs index a11d5300a4..e436e3e1e0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStructProxy.cs index d5aec41da5..aa831688a5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceFirstMidLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs index 04469c4586..ef8d735f16 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStructProxy.cs index d07476ac11..ff88d769b6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceSecondMidLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs index 96812b9dbe..16435c8c60 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStructProxy.cs index 722c91515e..b4c89fc547 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DiamondInheritanceTopLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs index 47c8dfae9b..bef36a3fc8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DisappointingCollectionSource.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotOverridePrivates.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotOverridePrivates.cs index 4a6b9a1619..84599175cf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotOverridePrivates.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotOverridePrivates.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotRecognizeAnyAsOptional.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotRecognizeAnyAsOptional.cs index 94d20bdf93..bd4f50f852 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotRecognizeAnyAsOptional.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoNotRecognizeAnyAsOptional.cs @@ -1,5 +1,7 @@ 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. @@ -31,9 +33,9 @@ protected DoNotRecognizeAnyAsOptional(DeputyProps props): base(props) /// Stability: Experimental /// [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) + 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}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(object), typeof(object), typeof(string)}, new object?[]{requiredAny, optionalAny, optionalString}); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DocumentedClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DocumentedClass.cs index 260a7e88c4..39b9d51f4d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DocumentedClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DocumentedClass.cs @@ -1,5 +1,7 @@ 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. @@ -42,9 +44,9 @@ protected DocumentedClass(DeputyProps props): base(props) /// Stability: Stable /// [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) + 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}); + return InvokeInstanceMethod(new System.Type[]{typeof(Amazon.JSII.Tests.CalculatorNamespace.IGreetee)}, new object?[]{greetee}); } /// Say ¡Hola! diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontComplainAboutVariadicAfterOptional.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontComplainAboutVariadicAfterOptional.cs index be2ee3b1ef..5255be3e1a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontComplainAboutVariadicAfterOptional.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DontComplainAboutVariadicAfterOptional.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -30,9 +32,9 @@ protected DontComplainAboutVariadicAfterOptional(DeputyProps props): base(props) /// Stability: Experimental /// [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) + public virtual string OptionalAndVariadic(string? optional = null, params string[] things) { - return InvokeInstanceMethod(new System.Type[]{typeof(string), typeof(string[])}, new object[]{optional, things}); + return InvokeInstanceMethod(new System.Type[]{typeof(string), typeof(string[])}, new object?[]{optional, things}); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs index 82ae0afd51..1e53d66e69 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/DoubleTrouble.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs index 9b21036954..11304b8937 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EnumDispenser.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValues.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValues.cs index be83a8585e..247f3df086 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValues.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValues.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptions.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptions.cs index 80a30492b6..210da73b00 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptions.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptions.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public class EraseUndefinedHashValuesOptions : Amazon.JSII.Tests.CalculatorNames /// [JsiiOptional] [JsiiProperty(name: "option1", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Option1 + public string? Option1 { get; set; @@ -24,7 +26,7 @@ public string Option1 /// [JsiiOptional] [JsiiProperty(name: "option2", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Option2 + public string? Option2 { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptionsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptionsProxy.cs index 45e68deb50..b052171dcb 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptionsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/EraseUndefinedHashValuesOptionsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -17,9 +19,9 @@ private EraseUndefinedHashValuesOptionsProxy(ByRefValue reference): base(referen /// [JsiiOptional] [JsiiProperty(name: "option1", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Option1 + public string? Option1 { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// @@ -27,9 +29,9 @@ public string Option1 /// [JsiiOptional] [JsiiProperty(name: "option2", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Option2 + public string? Option2 { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs index 20e5f1b6b7..c3637f9d89 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -11,7 +13,7 @@ public class ExperimentalClass : DeputyBase /// /// Stability: Experimental /// - public ExperimentalClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object[]{readonlyString, mutableNumber})) + public ExperimentalClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object?[]{readonlyString, mutableNumber})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalEnum.cs index ac50f78650..044ca3163c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStruct.cs index 5ea5555fcf..ce67d8764d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStructProxy.cs index 2508916528..d0d4e8c78e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExperimentalStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs index 312ae16ae5..12ba96ce45 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExportedBaseClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs index 8a81dff018..e421064e24 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterface.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs index f83ab48e6f..b59b2a688d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ExtendsInternalInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs index a45828c341..9eac9f7240 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GiveMeStructs.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Greetee.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Greetee.cs index 3c63f7927e..48d1f46546 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Greetee.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Greetee.cs @@ -1,5 +1,7 @@ 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. @@ -17,7 +19,7 @@ public class Greetee : Amazon.JSII.Tests.CalculatorNamespace.IGreetee /// [JsiiOptional] [JsiiProperty(name: "name", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Name + public string? Name { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreeteeProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreeteeProxy.cs index 3c1711cde4..063f33cc48 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreeteeProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreeteeProxy.cs @@ -1,5 +1,7 @@ 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. @@ -21,9 +23,9 @@ private GreeteeProxy(ByRefValue reference): base(reference) /// [JsiiOptional] [JsiiProperty(name: "name", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Name + public string? Name { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs index 28962a90c4..27f15e61fc 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/GreetingAugmenter.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs index be845d617a..b05ab50ed2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProvider.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProviderProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProviderProxy.cs index 29164a05cd..024b37f5d4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProviderProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymousImplementationProviderProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMe.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMe.cs index bb57693202..e597158e5b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMe.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMe.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMeProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMeProxy.cs index 8201d7918d..8332a597ee 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMeProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnonymouslyImplementMeProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterface.cs index 294583f6de..a9e6e70208 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterfaceProxy.cs index 37b3b5935b..c8cc9365ae 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IAnotherPublicInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs index c6eabd434b..8d9660f909 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBell.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellProxy.cs index 697ee5da37..c97675e990 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRinger.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRinger.cs index 3d89d0f50f..c3ce3e7eee 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRinger.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRinger.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as an interface. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRingerProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRingerProxy.cs index a7eba696ac..58c94edc91 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRingerProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IBellRingerProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as an interface. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs index 6812f712ff..7b6036eadd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ICalculatorProps.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Properties for Calculator. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IChildStruct982.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IChildStruct982.cs index e71ee3c61e..547a089a6d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IChildStruct982.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IChildStruct982.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRinger.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRinger.cs index e7cbb48a40..30046d2fe7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRinger.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRinger.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as a calss. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRingerProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRingerProxy.cs index 8f707f2ab2..2070d3934b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRingerProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConcreteBellRingerProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Takes the object parameter as a calss. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConfusingToJacksonStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConfusingToJacksonStruct.cs index 0ddf8b7f99..6f977dec15 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConfusingToJacksonStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IConfusingToJacksonStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ 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 + object? UnionProperty { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterface.cs index 66e888e626..cf3eec3a0b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterfaceProxy.cs index 030ce0ba41..3088276b2b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedStruct.cs index 4842431de9..9ac07e113a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDeprecatedStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs index fe004db909..d13374e934 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDerivedStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// A struct which derives from another struct. @@ -43,7 +45,7 @@ Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiProperty(name: "anotherOptional", typeJson: "{\"collection\":{\"elementtype\":{\"fqn\":\"@scope/jsii-calc-lib.Value\"},\"kind\":\"map\"}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - System.Collections.Generic.IDictionary AnotherOptional + System.Collections.Generic.IDictionary? AnotherOptional { get { @@ -56,7 +58,7 @@ Amazon.JSII.Tests.CalculatorNamespace.DoubleTrouble NonPrimitive /// [JsiiProperty(name: "optionalAny", typeJson: "{\"primitive\":\"any\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - object OptionalAny + object? OptionalAny { get { @@ -69,7 +71,7 @@ object OptionalAny /// [JsiiProperty(name: "optionalArray", typeJson: "{\"collection\":{\"elementtype\":{\"primitive\":\"string\"},\"kind\":\"array\"}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string[] OptionalArray + string[]? OptionalArray { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceBaseLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceBaseLevelStruct.cs index 43c47c13ea..593ddc3b2f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceBaseLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceBaseLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceFirstMidLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceFirstMidLevelStruct.cs index 13b7120e17..122e1e2e8c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceFirstMidLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceFirstMidLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceSecondMidLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceSecondMidLevelStruct.cs index 91ed352429..b7d5765c88 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceSecondMidLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceSecondMidLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceTopLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceTopLevelStruct.cs index e909fd3baf..4db183c2f0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceTopLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IDiamondInheritanceTopLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IEraseUndefinedHashValuesOptions.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IEraseUndefinedHashValuesOptions.cs index 266ece09d4..9e531f3fc3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IEraseUndefinedHashValuesOptions.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IEraseUndefinedHashValuesOptions.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public interface IEraseUndefinedHashValuesOptions /// [JsiiProperty(name: "option1", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Option1 + string? Option1 { get { @@ -26,7 +28,7 @@ string Option1 /// [JsiiProperty(name: "option2", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Option2 + string? Option2 { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterface.cs index 5f48059b90..6490862fd1 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterfaceProxy.cs index 2df86afcb8..0116a80ac4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalStruct.cs index 04d12d6a2f..b7e3ead730 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExperimentalStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs index 62e4d75e41..4d4acef34c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsInternalInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs index 0f177ba108..bfa38ca241 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs index e4ceba57a3..1487123ed0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IExtendsPrivateInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlier.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlier.cs index 50183c849f..044cfa5b85 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlier.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlier.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even friendlier classes can implement this interface. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs index 7330db6082..f72d7a18f8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlierProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Even friendlier classes can implement this interface. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGenerator.cs index a5f1e23c3c..46688ac5cf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGenerator.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs index 2352898c01..d3fec56a59 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IFriendlyRandomGeneratorProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IGreetee.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IGreetee.cs index 25f78abe78..dd4e12710b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IGreetee.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IGreetee.cs @@ -1,5 +1,7 @@ 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. @@ -17,7 +19,7 @@ public interface IGreetee /// [JsiiProperty(name: "name", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Name + string? Name { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs index ab7ddc0a7c..20d87af703 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IImplictBaseOfBase.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClass.cs index b0e9d38d75..31fb8626cd 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// awslabs/jsii#220 Abstract return type. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClassProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClassProxy.cs index 355a47b46c..a0a1c599dc 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClassProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceImplementedByAbstractClassProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// awslabs/jsii#220 Abstract return type. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataType.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataType.cs index 301bc39b75..2ed4afd7aa 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataType.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataType.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataTypeProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataTypeProxy.cs index 7a4a152e78..8d94bf4959 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataTypeProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceThatShouldNotBeADataTypeProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternal.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternal.cs index f74c787c3e..53ffdd4132 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternal.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternal.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternalProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternalProxy.cs index 9b51cfb548..7fd3e24542 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternalProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithInternalProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethods.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethods.cs index 608074f43b..e3f276336c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethods.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethods.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethodsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethodsProxy.cs index a57c69cf25..e995d959d3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethodsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithMethodsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArguments.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArguments.cs index ac65db0a89..b5dffd51a6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArguments.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArguments.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArgumentsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArgumentsProxy.cs index 6b326d5b8b..6646913a80 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArgumentsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithOptionalMethodArgumentsProxy.cs @@ -1,5 +1,7 @@ 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. @@ -19,7 +21,7 @@ private IInterfaceWithOptionalMethodArgumentsProxy(ByRefValue reference): base(r [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}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(string), typeof(double)}, new object?[]{arg1, arg2}); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs index 30520db25e..294f1202d9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithProperties.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs index 7629bc5d4a..bc3a8dd689 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtension.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs index 1d4626880f..7925b7b394 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesExtensionProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs index 32a95d0970..4e38afd9d6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IInterfaceWithPropertiesProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417Derived.cs index 91d165e84c..7e0e6c7eca 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417Derived.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs index 32e2592ad1..7802c21a47 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417DerivedProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBase.cs index 9e3d733e8e..c5681e0a2b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBase.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs index 509e58d593..01a7b4700f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJSII417PublicBaseOfBaseProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External.cs index 1d7a27a165..de1260883b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2.cs index d23533f34c..2eaeb8cba4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2Proxy.cs index 78fa370692..a1c3449a59 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487External2Proxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487ExternalProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487ExternalProxy.cs index 547ac20d1e..6d6488ae8f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487ExternalProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii487ExternalProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496.cs index e07b82801a..06d683366f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496Proxy.cs index 49ac3c012d..bc1adf5c06 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IJsii496Proxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILoadBalancedFargateServiceProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILoadBalancedFargateServiceProps.cs index 9728767975..13e935d855 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILoadBalancedFargateServiceProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ILoadBalancedFargateServiceProps.cs @@ -1,5 +1,7 @@ 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. @@ -44,7 +46,7 @@ public interface ILoadBalancedFargateServiceProps /// [JsiiProperty(name: "cpu", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Cpu + string? Cpu { get { @@ -75,7 +77,7 @@ string Cpu /// [JsiiProperty(name: "memoryMiB", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string MemoryMiB + string? MemoryMiB { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteral.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteral.cs index 2a8301554c..4a4a0ef2ec 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteral.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteral.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteralProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteralProxy.cs index 0ef26aa743..d40ea185a4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteralProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IMutableObjectLiteralProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INestedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INestedStruct.cs index 1b9868ea66..0a9b2170b4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INestedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INestedStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterface.cs index 4a452f6cb4..74382048e8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs index 6c350e2559..9aef3b93df 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INonInternalInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INullShouldBeTreatedAsUndefinedData.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INullShouldBeTreatedAsUndefinedData.cs index eef3c86446..e2961d22da 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INullShouldBeTreatedAsUndefinedData.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/INullShouldBeTreatedAsUndefinedData.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -22,7 +24,7 @@ object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument /// [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\"primitive\":\"any\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - object ThisShouldBeUndefined + object? ThisShouldBeUndefined { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithProperty.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithProperty.cs index b105d6364f..2851ffe3cf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithProperty.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithProperty.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithPropertyProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithPropertyProxy.cs index e683500855..f56faa6f35 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithPropertyProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IObjectWithPropertyProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalStruct.cs index 82e57f5170..f843be2012 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IOptionalStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public interface IOptionalStruct /// [JsiiProperty(name: "field", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Field + string? Field { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParentStruct982.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParentStruct982.cs index 80b64f215e..6cb0e65e6d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParentStruct982.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IParentStruct982.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// https://github.com/aws/jsii/issues/982. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplemented.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplemented.cs index be57ceea23..e90b1a7344 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplemented.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplemented.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplementedProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplementedProxy.cs index 6a130fdc21..5b545a9197 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplementedProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPrivatelyImplementedProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface.cs index 9e650726c9..a90f2de934 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2.cs index 5eeb08951c..42fb8a9d20 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2Proxy.cs index 3a4667d226..ca9ec52744 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterface2Proxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterfaceProxy.cs index 6f4d13f7d8..b0a9c3a4d8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IPublicInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGenerator.cs index a26cb0b71a..da60f4ccc3 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGenerator.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Generates random numbers. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs index 6f168e15ae..3a9106cfc6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRandomNumberGeneratorProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Generates random numbers. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976.cs index 0562d9cf38..451472dc8f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976Proxy.cs index c10d2a69b6..e0e1417885 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnJsii976Proxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs index 22324f1056..58caa1a521 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumber.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumberProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumberProxy.cs index 08fa1da2c8..d5d7968841 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumberProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IReturnsNumberProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRootStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRootStruct.cs index ca4e293dc1..ab6087c2a4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRootStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IRootStruct.cs @@ -1,5 +1,7 @@ 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. @@ -27,7 +29,7 @@ string StringProp /// [JsiiProperty(name: "nestedStruct", typeJson: "{\"fqn\":\"jsii-calc.NestedStruct\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - Amazon.JSII.Tests.CalculatorNamespace.INestedStruct NestedStruct + Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISecondLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISecondLevelStruct.cs index def51f289f..9a04203a0a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISecondLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISecondLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -24,7 +26,7 @@ string DeeperRequiredProp /// [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string DeeperOptionalProp + string? DeeperOptionalProp { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISmellyStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISmellyStruct.cs index c35449f7b8..6098aa4d6d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISmellyStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISmellyStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterface.cs index daab41125c..1cf2da11af 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterfaceProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterfaceProxy.cs index f58b05c5ab..74f9263890 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterfaceProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableInterfaceProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableStruct.cs index 7ba0a5679e..9ffedb742b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStableStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructA.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructA.cs index e4a2c129c0..82fc21e9dc 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructA.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructA.cs @@ -1,5 +1,7 @@ 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. @@ -36,7 +38,7 @@ string RequiredString /// [JsiiProperty(name: "optionalString", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string OptionalString + string? OptionalString { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructB.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructB.cs index e933532715..0f8b980847 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructB.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructB.cs @@ -1,5 +1,7 @@ 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. @@ -36,7 +38,7 @@ string RequiredString /// [JsiiProperty(name: "optionalStructA", typeJson: "{\"fqn\":\"jsii-calc.StructA\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - Amazon.JSII.Tests.CalculatorNamespace.IStructA OptionalStructA + Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructParameterType.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructParameterType.cs index fc2852ed55..0add06f85c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructParameterType.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructParameterType.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegate.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegate.cs index b9eca34d6c..33fc919397 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegate.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegate.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegateProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegateProxy.cs index dcd63d18b2..60a2535e65 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegateProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructReturningDelegateProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithJavaReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithJavaReservedWords.cs index dfdb646b55..626cc39b76 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithJavaReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IStructWithJavaReservedWords.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -22,7 +24,7 @@ string Default /// [JsiiProperty(name: "assert", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Assert + string? Assert { get { @@ -35,7 +37,7 @@ string Assert /// [JsiiProperty(name: "result", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Result + string? Result { get { @@ -48,7 +50,7 @@ string Result /// [JsiiProperty(name: "that", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string That + string? That { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISupportsNiceJavaBuilderProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISupportsNiceJavaBuilderProps.cs index c129f21d10..7ab379d0ed 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISupportsNiceJavaBuilderProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ISupportsNiceJavaBuilderProps.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -26,7 +28,7 @@ double Bar /// [JsiiProperty(name: "id", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Id + string? Id { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ITopLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ITopLevelStruct.cs index ae2469c116..de85a44c62 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ITopLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ITopLevelStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -34,7 +36,7 @@ object SecondLevel /// [JsiiProperty(name: "optional", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - string Optional + string? Optional { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs index 6012f871ff..1dfd5102f4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/IUnionProperties.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -22,7 +24,7 @@ object Bar /// [JsiiProperty(name: "foo", typeJson: "{\"union\":{\"types\":[{\"primitive\":\"string\"},{\"primitive\":\"number\"}]}}", isOptional: true)] [Amazon.JSII.Runtime.Deputy.JsiiOptional] - object Foo + object? Foo { get { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementInternalInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementInternalInterface.cs index 35462620ae..6598fd1979 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementInternalInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementInternalInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Implementation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Implementation.cs index c7d37ddf0c..2af0448b4f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Implementation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Implementation.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternal.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternal.cs index 4b768ae536..e0c9d93e4d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternal.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternal.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternalSubclass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternalSubclass.cs index 70e93887c8..530305ecb8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternalSubclass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsInterfaceWithInternalSubclass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsPrivateInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsPrivateInterface.cs index f17b266678..c8363c6b4d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsPrivateInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplementsPrivateInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs index 3cb8f5cd87..c71598f91b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBase.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs index e17bd21850..9fbd7b9fd1 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ImplictBaseOfBaseProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs index 66c1cd5a84..754b6b065b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InbetweenClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceCollections.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceCollections.cs index 6879b570b2..c913a9de18 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceCollections.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceCollections.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Foo.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Foo.cs index 542cd5dd7e..3e34aa2f00 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Foo.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Foo.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { /// @@ -31,9 +33,9 @@ protected Foo(DeputyProps props): base(props) /// [JsiiOptional] [JsiiProperty(name: "bar", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public virtual string Bar + public virtual string? Bar { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Hello.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Hello.cs index 8737866d07..01f793a673 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Hello.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/Hello.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/HelloProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/HelloProxy.cs index adce003037..99836531c8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/HelloProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/HelloProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs index 98668e5f95..ea8cc39ce2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceIncludesClasses/IHello.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceIncludesClasses { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/Hello.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/Hello.cs index f43d7a8381..d0f4347ac5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/Hello.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/Hello.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/HelloProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/HelloProxy.cs index d770fb3346..ff0c6f5ade 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/HelloProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/HelloProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs index 45ee331892..b467b87743 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfaceInNamespaceOnlyInterface/IHello.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.InterfaceInNamespaceOnlyInterface { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfacesMaker.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfacesMaker.cs index 0fa2f1f6c0..95a4a6315f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfacesMaker.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/InterfacesMaker.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Internal/DependencyResolution/Anchor.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Internal/DependencyResolution/Anchor.cs index b446d0e4ed..ca88d3bfab 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Internal/DependencyResolution/Anchor.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Internal/DependencyResolution/Anchor.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace.Internal.DependencyResolution { public sealed class Anchor diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417Derived.cs index 6f5374d788..e70c3cd65d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417Derived.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417PublicBaseOfBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417PublicBaseOfBase.cs index 3de8813060..bb7a64cdb0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417PublicBaseOfBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSII417PublicBaseOfBase.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs index 3e7a4b7f08..5d89e6b9b0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralForInterface.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs index 72610833d4..ab79a78349 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNative.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs index 3ca439e143..c263a06802 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JSObjectLiteralToNativeClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs index eafe321392..df59a2e6a9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JavaReservedWords.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii487Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii487Derived.cs index dc4a364240..aa7d3d8b0b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii487Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii487Derived.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii496Derived.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii496Derived.cs index 4670fd7055..416f9ac50e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii496Derived.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Jsii496Derived.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent_.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent_.cs index f7b40c87ca..d01b95db87 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent_.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsiiAgent_.cs @@ -1,5 +1,7 @@ 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. @@ -33,9 +35,9 @@ protected JsiiAgent_(DeputyProps props): base(props) /// [JsiiOptional] [JsiiProperty(name: "jsiiAgent", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public static string JsiiAgent + public static string? JsiiAgent { - get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent_)); + get => GetStaticProperty(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsiiAgent_)); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsonFormatter.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsonFormatter.cs index 0bbf861b7c..ea1591c1ab 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsonFormatter.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/JsonFormatter.cs @@ -1,5 +1,7 @@ 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. @@ -146,9 +148,9 @@ public static object AnyZero() /// Stability: Experimental /// [JsiiMethod(name: "stringify", returnsJson: "{\"optional\":true,\"type\":{\"primitive\":\"string\"}}", parametersJson: "[{\"name\":\"value\",\"optional\":true,\"type\":{\"primitive\":\"any\"}}]")] - public static string Stringify(object @value = null) + public static string? Stringify(object? @value = null) { - return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{typeof(object)}, new object[]{@value}); + return InvokeStaticMethod(typeof(Amazon.JSII.Tests.CalculatorNamespace.JsonFormatter), new System.Type[]{typeof(object)}, new object?[]{@value}); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServiceProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServiceProps.cs index 402f0da473..1d6eda47cb 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServiceProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServiceProps.cs @@ -1,5 +1,7 @@ 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. @@ -42,7 +44,7 @@ public double? ContainerPort /// [JsiiOptional] [JsiiProperty(name: "cpu", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Cpu + public string? Cpu { get; set; @@ -71,7 +73,7 @@ public string Cpu /// [JsiiOptional] [JsiiProperty(name: "memoryMiB", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string MemoryMiB + public string? MemoryMiB { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServicePropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServicePropsProxy.cs index 7528ae5b09..157359c801 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServicePropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/LoadBalancedFargateServicePropsProxy.cs @@ -1,5 +1,7 @@ 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. @@ -45,9 +47,9 @@ public double? ContainerPort /// [JsiiOptional] [JsiiProperty(name: "cpu", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Cpu + public string? Cpu { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// The amount (in MiB) of memory used by the task. @@ -73,9 +75,9 @@ public string Cpu /// [JsiiOptional] [JsiiProperty(name: "memoryMiB", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string MemoryMiB + public string? MemoryMiB { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// Determines whether the Application Load Balancer will be internet-facing. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs index 7a4148d59e..cd995d1ad8 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/MethodNamedProperty.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs index 839d18804e..60bdc6bd9e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Multiply.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// The "*" binary operation. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NamespaceDoc.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NamespaceDoc.cs index c5dc91e91a..f70481049f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NamespaceDoc.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NamespaceDoc.cs @@ -1,3 +1,5 @@ +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs index e880d38651..65270cc992 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Negate.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// The negation operation ("-value"). diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStruct.cs index 271fa97798..a0ae6d4c83 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStructProxy.cs index 72c0bdee60..e19f2ab74e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NestedStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs index 2d2feb9109..2c6addda10 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NodeStandardLibrary.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefined.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefined.cs index 86f81790bb..f4a238d7fe 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefined.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefined.cs @@ -1,5 +1,7 @@ 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". @@ -12,7 +14,7 @@ public class NullShouldBeTreatedAsUndefined : DeputyBase /// /// Stability: Experimental /// - public NullShouldBeTreatedAsUndefined(string param1, object optional = null): base(new DeputyProps(new object[]{param1, optional})) + public NullShouldBeTreatedAsUndefined(string param1, object? optional = null): base(new DeputyProps(new object?[]{param1, optional})) { } @@ -34,9 +36,9 @@ protected NullShouldBeTreatedAsUndefined(DeputyProps props): base(props) /// Stability: Experimental /// [JsiiMethod(name: "giveMeUndefined", parametersJson: "[{\"name\":\"value\",\"optional\":true,\"type\":{\"primitive\":\"any\"}}]")] - public virtual void GiveMeUndefined(object @value = null) + public virtual void GiveMeUndefined(object? @value = null) { - InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object[]{@value}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object?[]{@value}); } /// @@ -62,9 +64,9 @@ public virtual void VerifyPropertyIsUndefined() /// [JsiiOptional] [JsiiProperty(name: "changeMeToUndefined", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public virtual string ChangeMeToUndefined + public virtual string? ChangeMeToUndefined { - get => GetInstanceProperty(); + get => GetInstanceProperty(); set => SetInstanceProperty(value); } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedData.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedData.cs index 4dce7694af..7bf97343ff 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedData.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedData.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -23,7 +27,7 @@ public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument /// [JsiiOptional] [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\"primitive\":\"any\"}", isOptional: true, isOverride: true)] - public object ThisShouldBeUndefined + public object? ThisShouldBeUndefined { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedDataProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedDataProxy.cs index 69f418b458..196225af4a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedDataProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NullShouldBeTreatedAsUndefinedDataProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -26,9 +28,9 @@ public object[] ArrayWithThreeElementsAndUndefinedAsSecondArgument /// [JsiiOptional] [JsiiProperty(name: "thisShouldBeUndefined", typeJson: "{\"primitive\":\"any\"}", isOptional: true)] - public object ThisShouldBeUndefined + public object? ThisShouldBeUndefined { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs index 31c92ef241..574e60fb11 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/NumberGenerator.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs index a4956f9708..7e08cf4e69 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectRefsInCollections.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectWithPropertyProvider.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectWithPropertyProvider.cs index 3cef110f8b..32e1cc2176 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectWithPropertyProvider.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ObjectWithPropertyProvider.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Old.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Old.cs index e189e45b17..a1b2d15a4b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Old.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Old.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Old class. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalArgumentInvoker.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalArgumentInvoker.cs index 7ac694a687..71a808bded 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalArgumentInvoker.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalArgumentInvoker.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalConstructorArgument.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalConstructorArgument.cs index 42894bc518..c2af050109 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalConstructorArgument.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalConstructorArgument.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -11,7 +13,7 @@ public class OptionalConstructorArgument : DeputyBase /// /// Stability: Experimental /// - public OptionalConstructorArgument(double arg1, string arg2, System.DateTime? arg3 = null): base(new DeputyProps(new object[]{arg1, arg2, arg3})) + public OptionalConstructorArgument(double arg1, string arg2, System.DateTime? arg3 = null): base(new DeputyProps(new object?[]{arg1, arg2, arg3})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStruct.cs index 9246ac05b9..a734f19e6a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStruct.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -13,7 +15,7 @@ public class OptionalStruct : Amazon.JSII.Tests.CalculatorNamespace.IOptionalStr /// [JsiiOptional] [JsiiProperty(name: "field", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Field + public string? Field { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructConsumer.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructConsumer.cs index 4b7ea61585..a6d80e094c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructConsumer.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructConsumer.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -11,7 +13,7 @@ public class OptionalStructConsumer : DeputyBase /// /// Stability: Experimental /// - public OptionalStructConsumer(Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct optionalStruct = null): base(new DeputyProps(new object[]{optionalStruct})) + public OptionalStructConsumer(Amazon.JSII.Tests.CalculatorNamespace.IOptionalStruct? optionalStruct = null): base(new DeputyProps(new object?[]{optionalStruct})) { } @@ -43,9 +45,9 @@ public virtual bool ParameterWasUndefined /// [JsiiOptional] [JsiiProperty(name: "fieldValue", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public virtual string FieldValue + public virtual string? FieldValue { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructProxy.cs index cda6d325f5..ea0c9fa351 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OptionalStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -17,9 +19,9 @@ private OptionalStructProxy(ByRefValue reference): base(reference) /// [JsiiOptional] [JsiiProperty(name: "field", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Field + public string? Field { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs index 0ac4fe997e..e86b9610d5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverridableProtectedMember.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs index f8e90f3ac7..35434cc6d5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/OverrideReturnsObject.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982.cs index 4c104191f5..85afd15639 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982.cs @@ -1,7 +1,11 @@ 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. /// /// Stability: Experimental diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982Proxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982Proxy.cs index 4a86d415f5..275ef7c034 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982Proxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ParentStruct982Proxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// https://github.com/aws/jsii/issues/982. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs index 46698fcb49..87ede7b7a4 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumer.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumerProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumerProxy.cs index ac0b29eb9c..721a24c93a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumerProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PartiallyInitializedThisConsumerProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs index be8f9d3f48..566aaa57e6 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Polymorphism.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs index 54e68e70e5..fe37ebe7b0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Power.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// The power operation. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PropertyNamedProperty.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PropertyNamedProperty.cs index 2ab873a0d9..bd5f0b289f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PropertyNamedProperty.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PropertyNamedProperty.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PublicClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PublicClass.cs index 87fad9174d..93eba8a103 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PublicClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PublicClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonReservedWords.cs index fe69305d34..ac65bd5f4c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/PythonReservedWords.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs index 999f5f750c..6ad440ee3c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReferenceEnumFromScopedPackage.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// See awslabs/jsii#138. @@ -31,9 +33,9 @@ protected ReferenceEnumFromScopedPackage(DeputyProps props): base(props) /// Stability: Experimental /// [JsiiMethod(name: "loadFoo", returnsJson: "{\"optional\":true,\"type\":{\"fqn\":\"@scope/jsii-calc-lib.EnumFromScopedModule\"}}")] - public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule LoadFoo() + public virtual Amazon.JSII.Tests.CalculatorNamespace.LibNamespace.EnumFromScopedModule? LoadFoo() { - return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); + return InvokeInstanceMethod(new System.Type[]{}, new object[]{}); } /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsPrivateImplementationOfInterface.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsPrivateImplementationOfInterface.cs index 304a848520..2dcb05a14e 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsPrivateImplementationOfInterface.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/ReturnsPrivateImplementationOfInterface.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStruct.cs index 11243847d0..68f3a11453 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStruct.cs @@ -1,7 +1,11 @@ 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 @@ -28,7 +32,7 @@ public string StringProp /// [JsiiOptional] [JsiiProperty(name: "nestedStruct", typeJson: "{\"fqn\":\"jsii-calc.NestedStruct\"}", isOptional: true, isOverride: true)] - public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct NestedStruct + public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructProxy.cs index 4d16713896..35c3c57f12 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructProxy.cs @@ -1,5 +1,7 @@ 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. @@ -31,9 +33,9 @@ public string StringProp /// [JsiiOptional] [JsiiProperty(name: "nestedStruct", typeJson: "{\"fqn\":\"jsii-calc.NestedStruct\"}", isOptional: true)] - public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct NestedStruct + public Amazon.JSII.Tests.CalculatorNamespace.INestedStruct? NestedStruct { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs index 6abecf9924..f560779442 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RootStructValidator.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs index a94f531df4..cbc8ad3849 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/RuntimeTypeChecking.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -30,18 +32,18 @@ protected RuntimeTypeChecking(DeputyProps props): base(props) /// Stability: Experimental /// [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) + 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}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(double), typeof(string), typeof(System.DateTime)}, new object?[]{arg1, arg2, arg3}); } /// /// Stability: Experimental /// [JsiiMethod(name: "methodWithOptionalAnyArgument", parametersJson: "[{\"name\":\"arg\",\"optional\":true,\"type\":{\"primitive\":\"any\"}}]")] - public virtual void MethodWithOptionalAnyArgument(object arg = null) + public virtual void MethodWithOptionalAnyArgument(object? arg = null) { - InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object[]{arg}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(object)}, new object?[]{arg}); } /// Used to verify verification of number of method arguments. @@ -51,7 +53,7 @@ public virtual void MethodWithOptionalAnyArgument(object arg = null) [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}); + InvokeInstanceVoidMethod(new System.Type[]{typeof(double), typeof(string), typeof(System.DateTime)}, new object?[]{arg1, arg2, arg3}); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStruct.cs index 7300c691eb..18f6fa479d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -25,7 +29,7 @@ public string DeeperRequiredProp /// [JsiiOptional] [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string DeeperOptionalProp + public string? DeeperOptionalProp { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStructProxy.cs index 26c649a638..45f51b425f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SecondLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -28,9 +30,9 @@ public string DeeperRequiredProp /// [JsiiOptional] [JsiiProperty(name: "deeperOptionalProp", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string DeeperOptionalProp + public string? DeeperOptionalProp { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs index a98043db6b..0cbbc600a7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingleInstanceTwoTypes.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonInt.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonInt.cs index 740a769462..172df42f94 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonInt.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonInt.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that singleton enums are handled correctly. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonIntEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonIntEnum.cs index 0124e83768..255d9ad793 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonIntEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonIntEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonString.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonString.cs index 60fbde086e..0443985851 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonString.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonString.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Verifies that singleton enums are handled correctly. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonStringEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonStringEnum.cs index b55692e29d..5e9afb5734 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonStringEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SingletonStringEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStruct.cs index 6b1c45c64d..3e01f5c21d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStructProxy.cs index ac7771ae58..e11ad625ea 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SmellyStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs index 027b56eb04..c9c17b6804 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SomeTypeJsii976.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableClass.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableClass.cs index c7acef75c4..02354c12df 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableClass.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableClass.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -11,7 +13,7 @@ public class StableClass : DeputyBase /// /// Stability: Stable /// - public StableClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object[]{readonlyString, mutableNumber})) + public StableClass(string readonlyString, double? mutableNumber = null): base(new DeputyProps(new object?[]{readonlyString, mutableNumber})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableEnum.cs index 126d89d220..464d91e8be 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStruct.cs index a060ff89a8..2c91c36aaf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Stable /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStructProxy.cs index 3c87738f36..db9e5f1e19 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StableStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs index 8e9c27e9d0..d803de2769 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StaticContext.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs index 0ab8962456..fabaa43e58 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Statics.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs index 280e8326a6..4c7851da65 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StringEnum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StripInternal.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StripInternal.cs index a82b9ffa7f..e1b17595e7 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StripInternal.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StripInternal.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs index a4d1d7f89a..a689765a1d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructA.cs @@ -1,7 +1,11 @@ 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. /// /// Stability: Experimental @@ -35,7 +39,7 @@ public double? OptionalNumber /// [JsiiOptional] [JsiiProperty(name: "optionalString", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string OptionalString + public string? OptionalString { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructAProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructAProxy.cs index 7742ba3131..dfccd35da5 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructAProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructAProxy.cs @@ -1,5 +1,7 @@ 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. @@ -37,9 +39,9 @@ public double? OptionalNumber /// [JsiiOptional] [JsiiProperty(name: "optionalString", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string OptionalString + public string? OptionalString { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs index 589a204f70..5e3288721b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructB.cs @@ -1,7 +1,11 @@ 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. /// /// Stability: Experimental @@ -35,7 +39,7 @@ public bool? OptionalBoolean /// [JsiiOptional] [JsiiProperty(name: "optionalStructA", typeJson: "{\"fqn\":\"jsii-calc.StructA\"}", isOptional: true, isOverride: true)] - public Amazon.JSII.Tests.CalculatorNamespace.IStructA OptionalStructA + public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructBProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructBProxy.cs index b76baf4d8b..fbeb80c2fe 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructBProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructBProxy.cs @@ -1,5 +1,7 @@ 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. @@ -37,9 +39,9 @@ public bool? OptionalBoolean /// [JsiiOptional] [JsiiProperty(name: "optionalStructA", typeJson: "{\"fqn\":\"jsii-calc.StructA\"}", isOptional: true)] - public Amazon.JSII.Tests.CalculatorNamespace.IStructA OptionalStructA + public Amazon.JSII.Tests.CalculatorNamespace.IStructA? OptionalStructA { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterType.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterType.cs index c1b8aab88f..498e8ebb67 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterType.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterType.cs @@ -1,7 +1,11 @@ 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 diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterTypeProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterTypeProxy.cs index d9939df08e..25ffff86b0 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterTypeProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructParameterTypeProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs index 3548183d09..0d7de5953d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructPassing.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// Just because we can. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs index fc09513726..550aa1ab46 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructUnionConsumer.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWords.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWords.cs index 5908b67305..ae29361d74 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWords.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWords.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -23,7 +27,7 @@ public string Default /// [JsiiOptional] [JsiiProperty(name: "assert", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Assert + public string? Assert { get; set; @@ -34,7 +38,7 @@ public string Assert /// [JsiiOptional] [JsiiProperty(name: "result", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Result + public string? Result { get; set; @@ -45,7 +49,7 @@ public string Result /// [JsiiOptional] [JsiiProperty(name: "that", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string That + public string? That { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWordsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWordsProxy.cs index 040a7bc4f1..82d29eef13 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWordsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/StructWithJavaReservedWordsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -26,9 +28,9 @@ public string Default /// [JsiiOptional] [JsiiProperty(name: "assert", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Assert + public string? Assert { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// @@ -36,9 +38,9 @@ public string Assert /// [JsiiOptional] [JsiiProperty(name: "result", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Result + public string? Result { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } /// @@ -46,9 +48,9 @@ public string Result /// [JsiiOptional] [JsiiProperty(name: "that", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string That + public string? That { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs index 6bca4fd053..c58a18874c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Sum.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation that sums multiple values. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilder.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilder.cs index 98d5d33d66..4d125e367a 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilder.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilder.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -15,7 +17,7 @@ public class SupportsNiceJavaBuilder : Amazon.JSII.Tests.CalculatorNamespace.Sup /// /// Stability: Experimental /// - public SupportsNiceJavaBuilder(double id, double? defaultBar = null, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps props = null, params string[] rest): base(new DeputyProps(new object[]{id, defaultBar, props, rest})) + public SupportsNiceJavaBuilder(double id, double? defaultBar = null, Amazon.JSII.Tests.CalculatorNamespace.ISupportsNiceJavaBuilderProps? props = null, params string[] rest): base(new DeputyProps(new object?[]{id, defaultBar, props, rest})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderProps.cs index e054353717..16c2819a9d 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderProps.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -27,7 +31,7 @@ public double Bar /// [JsiiOptional] [JsiiProperty(name: "id", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Id + public string? Id { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderPropsProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderPropsProxy.cs index cba35e3736..d11df3b092 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderPropsProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderPropsProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -30,9 +32,9 @@ public double Bar /// [JsiiOptional] [JsiiProperty(name: "id", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Id + public string? Id { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs index d8000f5ae5..2f9b227c46 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SupportsNiceJavaBuilderWithRequiredProps.cs @@ -1,5 +1,7 @@ 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. @@ -56,9 +58,9 @@ public virtual double Id /// [JsiiOptional] [JsiiProperty(name: "propId", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public virtual string PropId + public virtual string? PropId { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs index b5a676eb67..130db1db59 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/SyncVirtualMethods.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs index 72beae0e91..16df088228 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/Thrower.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs index f977c645cf..71952e0149 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStruct.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -36,7 +40,7 @@ public object SecondLevel /// [JsiiOptional] [JsiiProperty(name: "optional", typeJson: "{\"primitive\":\"string\"}", isOptional: true, isOverride: true)] - public string Optional + public string? Optional { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStructProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStructProxy.cs index ac8c762695..9c94640e97 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStructProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/TopLevelStructProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -38,9 +40,9 @@ public object SecondLevel /// [JsiiOptional] [JsiiProperty(name: "optional", typeJson: "{\"primitive\":\"string\"}", isOptional: true)] - public string Optional + public string? Optional { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs index 1c402f5d09..20bcad5a4c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperation.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation on a single operand. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperationProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperationProxy.cs index e0d8ec41ce..cf7df5d32b 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperationProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnaryOperationProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// An operation on a single operand. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs index f02034633d..c827b0e642 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionProperties.cs @@ -1,7 +1,11 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { + #pragma warning disable CS8618 + /// /// Stability: Experimental /// @@ -23,7 +27,7 @@ public object Bar /// [JsiiOptional] [JsiiProperty(name: "foo", typeJson: "{\"union\":{\"types\":[{\"primitive\":\"string\"},{\"primitive\":\"number\"}]}}", isOptional: true, isOverride: true)] - public object Foo + public object? Foo { get; set; diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs index 436b1f1a36..16732ebbcf 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UnionPropertiesProxy.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// @@ -26,9 +28,9 @@ public object Bar /// [JsiiOptional] [JsiiProperty(name: "foo", typeJson: "{\"union\":{\"types\":[{\"primitive\":\"string\"},{\"primitive\":\"number\"}]}}", isOptional: true)] - public object Foo + public object? Foo { - get => GetInstanceProperty(); + get => GetInstanceProperty(); } } } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs index c6e9b96255..cbf27fedd2 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseBundledDependency.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs index f9235114a6..ef9929be49 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UseCalcBase.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs index febf3cc0c1..85b8ea2818 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/UsesInterfaceWithProperties.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicInvoker.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicInvoker.cs index d9f790b1ff..2c7f3d7d65 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicInvoker.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicInvoker.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs index 37de546d70..102b19b473 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VariadicMethod.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs index c3afa3c6d5..e55286686c 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VirtualMethodPlayground.cs @@ -1,5 +1,7 @@ using Amazon.JSII.Runtime.Deputy; +#pragma warning disable CS0672,CS0809,CS1591 + namespace Amazon.JSII.Tests.CalculatorNamespace { /// diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallback.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallback.cs index 9886d1b2e6..0b71fc3d26 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallback.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallback.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallbackProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallbackProxy.cs index 2914e93c16..17fcef5856 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallbackProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/VoidCallbackProxy.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs index 4810fc52a5..2dfcb9651f 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/WithPrivatePropertyInConstructor.cs @@ -1,5 +1,7 @@ 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. @@ -12,7 +14,7 @@ public class WithPrivatePropertyInConstructor : DeputyBase /// /// Stability: Experimental /// - public WithPrivatePropertyInConstructor(string privateField = null): base(new DeputyProps(new object[]{privateField})) + public WithPrivatePropertyInConstructor(string? privateField = null): base(new DeputyProps(new object?[]{privateField})) { } diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation.cs index 0834928c12..3a63d09ea9 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperation.cs @@ -1,5 +1,7 @@ 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. diff --git a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperationProxy.cs b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperationProxy.cs index 93d28c6281..4f70dac317 100644 --- a/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperationProxy.cs +++ b/packages/jsii-pacmak/test/expected.jsii-calc/dotnet/Amazon.JSII.Tests.CalculatorPackageId/Amazon/JSII/Tests/CalculatorNamespace/composition/CompositeOperationProxy.cs @@ -1,5 +1,7 @@ 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.