Annotate webencoders with nullable (#22927)
This commit is contained in:
parent
416c78bc9e
commit
c93b61156d
|
|
@ -3,6 +3,7 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;$(DefaultNetCoreTargetFramework)</TargetFrameworks>
|
||||
<TargetFrameworks Condition="'$(DotNetBuildFromSource)' == 'true'">$(DefaultNetCoreTargetFramework)</TargetFrameworks>
|
||||
<Nullable>annotations</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<Compile Include="Microsoft.Extensions.WebEncoders.netstandard2.0.cs" />
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders
|
|||
public sealed partial class WebEncoderOptions
|
||||
{
|
||||
public WebEncoderOptions() { }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings? TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.WebEncoders.Testing
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Microsoft.Extensions.WebEncoders
|
|||
public sealed partial class WebEncoderOptions
|
||||
{
|
||||
public WebEncoderOptions() { }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
public System.Text.Encodings.Web.TextEncoderSettings? TextEncoderSettings { [System.Runtime.CompilerServices.CompilerGeneratedAttribute] get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute] set { } }
|
||||
}
|
||||
}
|
||||
namespace Microsoft.Extensions.WebEncoders.Testing
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
<PackageTags>aspnetcore</PackageTags>
|
||||
<IsPackable>true</IsPackable>
|
||||
<IsAspNetCoreApp>true</IsAspNetCoreApp>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@ namespace Microsoft.Extensions.WebEncoders
|
|||
/// <remarks>
|
||||
/// If this property is null, then the encoders will use their default allow lists.
|
||||
/// </remarks>
|
||||
public TextEncoderSettings TextEncoderSettings { get; set; }
|
||||
public TextEncoderSettings? TextEncoderSettings { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>$(DefaultNetCoreTargetFramework);net472</TargetFrameworks>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Reference in New Issue