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