diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/CustomAttributeFactory.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/CustomAttributeFactory.cs
index 744fded..6eb6cef 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/CustomAttributeFactory.cs
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/CustomAttributeFactory.cs
@@ -69,6 +69,13 @@ public CustomAttribute AttributeUsage(AttributeTargets validOn, bool? allowMulti
return customAttribute;
}
+ public CustomAttribute ParamArray()
+ {
+ MethodDefinition constructor = _wellKnownTypes.SystemParamArrayAttribute.Resolve().Methods.Single(method => method.IsConstructor && !method.IsStatic && method.Parameters.Count == 0);
+ var customAttribute = new CustomAttribute(_wellKnownTypes.Module.ImportReference(constructor));
+ return customAttribute;
+ }
+
public CustomAttribute ReferenceAssembly()
{
MethodDefinition constructor = _wellKnownTypes.SystemRuntimeCompilerServicesReferenceAssemblyAttribute.Value.Resolve().Methods.Single(method => method.IsConstructor && !method.IsStatic && method.Parameters.Count == 0);
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.cs
similarity index 96%
rename from TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.cs
rename to TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.cs
index 1a3656e..b757ed3 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.cs
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.cs
@@ -3,7 +3,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-// This was copied from https://github.com/dotnet/coreclr/blob/60f1e6265bd1039f023a82e0643b524d6aaf7845/src/System.Private.CoreLib/shared/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
+// This was copied from https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
// and updated to have the scope of the attributes be internal.
namespace System.Diagnostics.CodeAnalysis
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.vb b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.vb
similarity index 95%
rename from TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.vb
rename to TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.vb
index ab87809..ee3d5bc 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.vb
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen1.vb
@@ -3,7 +3,7 @@
' The .NET Foundation licenses this file to you under the MIT license.
' See the LICENSE file in the project root for more information.
-' This was copied from https://github.com/dotnet/coreclr/blob/60f1e6265bd1039f023a82e0643b524d6aaf7845/src/System.Private.CoreLib/shared/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
+' This was copied from https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
' and updated to have the scope of the attributes be internal.
Imports System
@@ -94,7 +94,7 @@ Namespace Global.System.Diagnostics.CodeAnalysis
''' Specifies that the method will not return if the associated Boolean parameter is passed the specified value.
- Friend NotInheritable Class DoesNotReturnAttribute
+ Friend NotInheritable Class DoesNotReturnIfAttribute
Inherits Attribute
''' Initializes the attribute with the specified parameter value.
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.cs
new file mode 100644
index 0000000..6ae2691
--- /dev/null
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.cs
@@ -0,0 +1,67 @@
+//
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// This was copied from https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
+// and updated to have the scope of the attributes be internal.
+
+namespace System.Diagnostics.CodeAnalysis
+{
+ /// Specifies that the method or property will ensure that the listed field and property members have not-null values.
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
+ internal sealed class MemberNotNullAttribute : Attribute
+ {
+ /// Initializes the attribute with a field or property member.
+ ///
+ /// The field or property member that is promised to be not-null.
+ ///
+ public MemberNotNullAttribute(string member) => Members = new[] { member };
+
+ /// Initializes the attribute with the list of field and property members.
+ ///
+ /// The list of field and property members that are promised to be not-null.
+ ///
+ public MemberNotNullAttribute(params string[] members) => Members = members;
+
+ /// Gets field or property member names.
+ public string[] Members { get; }
+ }
+
+ /// Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+ [AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, Inherited = false, AllowMultiple = true)]
+ internal sealed class MemberNotNullWhenAttribute : Attribute
+ {
+ /// Initializes the attribute with the specified return value condition and a field or property member.
+ ///
+ /// The return value condition. If the method returns this value, the associated parameter will not be null.
+ ///
+ ///
+ /// The field or property member that is promised to be not-null.
+ ///
+ public MemberNotNullWhenAttribute(bool returnValue, string member)
+ {
+ ReturnValue = returnValue;
+ Members = new[] { member };
+ }
+
+ /// Initializes the attribute with the specified return value condition and list of field and property members.
+ ///
+ /// The return value condition. If the method returns this value, the associated parameter will not be null.
+ ///
+ ///
+ /// The list of field and property members that are promised to be not-null.
+ ///
+ public MemberNotNullWhenAttribute(bool returnValue, params string[] members)
+ {
+ ReturnValue = returnValue;
+ Members = members;
+ }
+
+ /// Gets the return value condition.
+ public bool ReturnValue { get; }
+
+ /// Gets field or property member names.
+ public string[] Members { get; }
+ }
+}
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.vb b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.vb
new file mode 100644
index 0000000..bbc8114
--- /dev/null
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/NullableAttributes.gen2.vb
@@ -0,0 +1,75 @@
+'
+' Licensed to the .NET Foundation under one or more agreements.
+' The .NET Foundation licenses this file to you under the MIT license.
+' See the LICENSE file in the project root for more information.
+
+' This was copied from https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/System/Diagnostics/CodeAnalysis/NullableAttributes.cs
+' and updated to have the scope of the attributes be internal.
+
+Imports System
+Imports System.Diagnostics
+
+Namespace Global.System.Diagnostics.CodeAnalysis
+
+ ''' Specifies that the method or property will ensure that the listed field and property members have not-null values.
+
+ Friend NotInheritable Class MemberNotNullAttribute
+ Inherits Attribute
+
+ ''' Initializes the attribute with a field or property member.
+ '''
+ ''' The field or property member that is promised to be not-null.
+ '''
+ Public Sub New(member As String)
+ Me.Members = {member}
+ End Sub
+
+ ''' Initializes the attribute with the list of field and property members.
+ '''
+ ''' The list of field and property members that are promised to be not-null.
+ '''
+ Public Sub New(ParamArray members As String())
+ Me.Members = members
+ End Sub
+
+ ''' Gets field or property member names.
+ Public ReadOnly Property Members As String()
+ End Class
+
+ ''' Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition.
+
+ Friend NotInheritable Class MemberNotNullWhenAttribute
+ Inherits Attribute
+
+ ''' Initializes the attribute with the specified return value condition and a field or property member.
+ '''
+ ''' The return value condition. If the method returns this value, the associated parameter will not be null.
+ '''
+ '''
+ ''' The field or property member that is promised to be not-null.
+ '''
+ Public Sub New(returnValue As Boolean, member As String)
+ Me.ReturnValue = returnValue
+ Me.Members = {member}
+ End Sub
+
+ ''' Initializes the attribute with the specified return value condition and list of field and property members.
+ '''
+ ''' The return value condition. If the method returns this value, the associated parameter will not be null.
+ '''
+ '''
+ ''' The list of field and property members that are promised to be not-null.
+ '''
+ Public Sub New(ReturnValue As Boolean, ParamArray members As String())
+ Me.ReturnValue = ReturnValue
+ Me.Members = members
+ End Sub
+
+ ''' Gets the return value condition.
+ Public ReadOnly Property ReturnValue As Boolean
+
+ ''' Gets field or property member names.
+ Public ReadOnly Property Members As String()
+ End Class
+
+End Namespace
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/Program.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/Program.cs
index a79fc55..0bd4222 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/Program.cs
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/Program.cs
@@ -54,6 +54,8 @@ internal static void Main(SuppressibleLoggingHelper? log, string referenceAssemb
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisDoesNotReturnIfAttribute);
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisMaybeNullAttribute);
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisMaybeNullWhenAttribute);
+ AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisMemberNotNullAttribute);
+ AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisMemberNotNullWhenAttribute);
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisNotNullAttribute);
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisNotNullIfNotNullAttribute);
AddAttributeOfInterest(attributesOfInterest, wellKnownTypes.SystemDiagnosticsCodeAnalysisNotNullWhenAttribute);
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.csproj b/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.csproj
index 9322122..ced178a 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.csproj
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.csproj
@@ -16,6 +16,14 @@
..\TunnelVisionLabs.ReferenceAssemblyAnnotator.ruleset
+
+
+
+
+
+
+
+
@@ -23,10 +31,18 @@
+
+ build
+ true
+
+
+ build
+ true
+
-
-
+
+
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.targets b/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.targets
index 10f60df..b1b7f2b 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.targets
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/TunnelVisionLabs.ReferenceAssemblyAnnotator.targets
@@ -4,23 +4,39 @@
- <_FrameworkIncludesNullableAttributes Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND '$(TargetFrameworkVersion.Substring(1))' >= '3.0'">true
- <_FrameworkIncludesNullableAttributes Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' AND '$(TargetFrameworkVersion.Substring(1))' >= '2.1'">true
- <_FrameworkIncludesNullableAttributes Condition="'$(_FrameworkIncludesNullableAttributes)' == ''">false
+ <_FrameworkIncludesGen1NullableAttributes Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '3.0'))">true
+ <_FrameworkIncludesGen1NullableAttributes Condition="'$(TargetFrameworkIdentifier)' == '.NETStandard' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '2.1'))">true
+ <_FrameworkIncludesGen1NullableAttributes Condition="'$(_FrameworkIncludesGen1NullableAttributes)' == ''">false
+
+
+ <_FrameworkIncludesGen2NullableAttributes Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '5.0'))">true
+ <_FrameworkIncludesGen2NullableAttributes Condition="'$(_FrameworkIncludesGen2NullableAttributes)' == ''">false
+
+ true
+ true
+
+ $(MSBuildThisFileDirectory)NullableAttributes.gen1$(DefaultLanguageSourceExtension)
+ $(MSBuildThisFileDirectory)NullableAttributes.gen2$(DefaultLanguageSourceExtension)
+
- true
+
+
- $(MSBuildThisFileDirectory)NullableAttributes$(DefaultLanguageSourceExtension)
-
+
+ <_GeneratedCodeFiles Include="$(Gen1NullableAttributesPath)" Visible="false" Condition="'$(UseWPF)' == 'true'" />
+
+
+
+
-
-
+
+
- <_GeneratedCodeFiles Include="$(NullableAttributesPath)" Visible="false" Condition="'$(UseWPF)' == 'true'" />
+ <_GeneratedCodeFiles Include="$(Gen2NullableAttributesPath)" Visible="false" Condition="'$(UseWPF)' == 'true'" />
-
+
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullAttributeProvidedType.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullAttributeProvidedType.cs
new file mode 100644
index 0000000..f5657a9
--- /dev/null
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullAttributeProvidedType.cs
@@ -0,0 +1,38 @@
+// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
+// Licensed under the MIT License. See LICENSE in the project root for license information.
+
+namespace TunnelVisionLabs.ReferenceAssemblyAnnotator
+{
+ using System;
+ using Mono.Cecil;
+ using Mono.Cecil.Rocks;
+
+ internal partial class WellKnownTypes
+ {
+ private sealed class MemberNotNullAttributeProvidedType : ProvidedAttributeType
+ {
+ public MemberNotNullAttributeProvidedType()
+ : base("System.Diagnostics.CodeAnalysis", "MemberNotNullAttribute")
+ {
+ }
+
+ protected override void ImplementAttribute(ModuleDefinition module, TypeDefinition attribute, WellKnownTypes wellKnownTypes, CustomAttributeFactory attributeFactory)
+ {
+ var constructor1 = MethodFactory.Constructor(wellKnownTypes.TypeSystem);
+ constructor1.Parameters.Add(new ParameterDefinition("member", ParameterAttributes.None, wellKnownTypes.TypeSystem.String));
+ attribute.Methods.Add(constructor1);
+
+ var members = new ParameterDefinition("members", ParameterAttributes.None, wellKnownTypes.TypeSystem.String.MakeArrayType());
+ members.CustomAttributes.Add(attributeFactory.ParamArray());
+
+ var constructor2 = MethodFactory.Constructor(wellKnownTypes.TypeSystem);
+ constructor2.Parameters.Add(members);
+ attribute.Methods.Add(constructor2);
+
+ attribute.CustomAttributes.Add(attributeFactory.NullableContext(1));
+ attribute.CustomAttributes.Add(attributeFactory.Nullable(0));
+ attribute.CustomAttributes.Add(attributeFactory.AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, inherited: false, allowMultiple: true));
+ }
+ }
+ }
+}
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullWhenAttributeProvidedType.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullWhenAttributeProvidedType.cs
new file mode 100644
index 0000000..7f0c053
--- /dev/null
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes+MemberNotNullWhenAttributeProvidedType.cs
@@ -0,0 +1,40 @@
+// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
+// Licensed under the MIT License. See LICENSE in the project root for license information.
+
+namespace TunnelVisionLabs.ReferenceAssemblyAnnotator
+{
+ using System;
+ using Mono.Cecil;
+ using Mono.Cecil.Rocks;
+
+ internal partial class WellKnownTypes
+ {
+ private sealed class MemberNotNullWhenAttributeProvidedType : ProvidedAttributeType
+ {
+ public MemberNotNullWhenAttributeProvidedType()
+ : base("System.Diagnostics.CodeAnalysis", "MemberNotNullWhenAttribute")
+ {
+ }
+
+ protected override void ImplementAttribute(ModuleDefinition module, TypeDefinition attribute, WellKnownTypes wellKnownTypes, CustomAttributeFactory attributeFactory)
+ {
+ var constructor1 = MethodFactory.Constructor(wellKnownTypes.TypeSystem);
+ constructor1.Parameters.Add(new ParameterDefinition("parameterValue", ParameterAttributes.None, wellKnownTypes.TypeSystem.Boolean));
+ constructor1.Parameters.Add(new ParameterDefinition("member", ParameterAttributes.None, wellKnownTypes.TypeSystem.String));
+ attribute.Methods.Add(constructor1);
+
+ var members = new ParameterDefinition("members", ParameterAttributes.None, wellKnownTypes.TypeSystem.String.MakeArrayType());
+ members.CustomAttributes.Add(attributeFactory.ParamArray());
+
+ var constructor2 = MethodFactory.Constructor(wellKnownTypes.TypeSystem);
+ constructor2.Parameters.Add(new ParameterDefinition("parameterValue", ParameterAttributes.None, wellKnownTypes.TypeSystem.Boolean));
+ constructor2.Parameters.Add(members);
+ attribute.Methods.Add(constructor2);
+
+ attribute.CustomAttributes.Add(attributeFactory.NullableContext(1));
+ attribute.CustomAttributes.Add(attributeFactory.Nullable(0));
+ attribute.CustomAttributes.Add(attributeFactory.AttributeUsage(AttributeTargets.Method | AttributeTargets.Property, inherited: false, allowMultiple: true));
+ }
+ }
+ }
+}
diff --git a/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes.cs b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes.cs
index 58162e0..9666a59 100644
--- a/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes.cs
+++ b/TunnelVisionLabs.ReferenceAssemblyAnnotator/WellKnownTypes.cs
@@ -13,6 +13,7 @@ internal partial class WellKnownTypes
private readonly WellKnownType _systemAttribute = new PredefinedType(typeof(Attribute));
private readonly WellKnownType _systemAttributeTargets = new PredefinedType(typeof(AttributeTargets));
private readonly WellKnownType _systemAttributeUsageAttribute = new PredefinedType(typeof(AttributeUsageAttribute));
+ private readonly WellKnownType _systemParamArrayAttribute = new PredefinedType(typeof(ParamArrayAttribute));
private readonly WellKnownType _systemRuntimeCompilerServicesCompilerGeneratedAttribute = new PredefinedType(typeof(CompilerGeneratedAttribute));
private readonly WellKnownType _systemRuntimeCompilerServicesReferenceAssemblyAttribute = new ReferenceAssemblyAttributeProvidedType();
@@ -27,6 +28,8 @@ internal partial class WellKnownTypes
private readonly WellKnownType _systemDiagnosticsCodeAnalysisDoesNotReturnIfAttribute = new DoesNotReturnIfAttributeProvidedType();
private readonly WellKnownType _systemDiagnosticsCodeAnalysisMaybeNullAttribute = new MaybeNullAttributeProvidedType();
private readonly WellKnownType _systemDiagnosticsCodeAnalysisMaybeNullWhenAttribute = new MaybeNullWhenAttributeProvidedType();
+ private readonly WellKnownType _systemDiagnosticsCodeAnalysisMemberNotNullAttribute = new MemberNotNullAttributeProvidedType();
+ private readonly WellKnownType _systemDiagnosticsCodeAnalysisMemberNotNullWhenAttribute = new MemberNotNullWhenAttributeProvidedType();
private readonly WellKnownType _systemDiagnosticsCodeAnalysisNotNullAttribute = new NotNullAttributeProvidedType();
private readonly WellKnownType _systemDiagnosticsCodeAnalysisNotNullIfNotNullAttribute = new NotNullIfNotNullAttributeProvidedType();
private readonly WellKnownType _systemDiagnosticsCodeAnalysisNotNullWhenAttribute = new NotNullWhenAttributeProvidedType();
@@ -70,6 +73,12 @@ public WellKnownTypes(AssemblyDefinition assemblyDefinition)
SystemDiagnosticsCodeAnalysisMaybeNullWhenAttribute = new Lazy(
() => _systemDiagnosticsCodeAnalysisMaybeNullWhenAttribute.GetOrCreateTypeReference(Module, this),
LazyThreadSafetyMode.ExecutionAndPublication);
+ SystemDiagnosticsCodeAnalysisMemberNotNullAttribute = new Lazy(
+ () => _systemDiagnosticsCodeAnalysisMemberNotNullAttribute.GetOrCreateTypeReference(Module, this),
+ LazyThreadSafetyMode.ExecutionAndPublication);
+ SystemDiagnosticsCodeAnalysisMemberNotNullWhenAttribute = new Lazy(
+ () => _systemDiagnosticsCodeAnalysisMemberNotNullWhenAttribute.GetOrCreateTypeReference(Module, this),
+ LazyThreadSafetyMode.ExecutionAndPublication);
SystemDiagnosticsCodeAnalysisNotNullAttribute = new Lazy(
() => _systemDiagnosticsCodeAnalysisNotNullAttribute.GetOrCreateTypeReference(Module, this),
LazyThreadSafetyMode.ExecutionAndPublication);
@@ -91,6 +100,8 @@ public WellKnownTypes(AssemblyDefinition assemblyDefinition)
public TypeReference SystemAttributeUsageAttribute => _systemAttributeUsageAttribute.GetOrCreateTypeReference(Module, this);
+ public TypeReference SystemParamArrayAttribute => _systemParamArrayAttribute.GetOrCreateTypeReference(Module, this);
+
public TypeReference SystemRuntimeCompilerServicesCompilerGeneratedAttribute => _systemRuntimeCompilerServicesCompilerGeneratedAttribute.GetOrCreateTypeReference(Module, this);
public Lazy SystemRuntimeCompilerServicesReferenceAssemblyAttribute { get; }
@@ -115,6 +126,10 @@ public WellKnownTypes(AssemblyDefinition assemblyDefinition)
public Lazy SystemDiagnosticsCodeAnalysisMaybeNullWhenAttribute { get; }
+ public Lazy SystemDiagnosticsCodeAnalysisMemberNotNullAttribute { get; }
+
+ public Lazy SystemDiagnosticsCodeAnalysisMemberNotNullWhenAttribute { get; }
+
public Lazy SystemDiagnosticsCodeAnalysisNotNullAttribute { get; }
public Lazy SystemDiagnosticsCodeAnalysisNotNullIfNotNullAttribute { get; }