}
public static partial class HostingEnvironmentExtensions
{
-#pragma warning disable CS0618 // Type or member is obsolete
public static bool IsDevelopment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) { throw null; }
public static bool IsEnvironment(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment, string environmentName) { throw null; }
public static bool IsProduction(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) { throw null; }
public static bool IsStaging(this Microsoft.Extensions.Hosting.IHostingEnvironment hostingEnvironment) { throw null; }
-#pragma warning restore CS0618 // Type or member is obsolete
}
[System.ObsoleteAttribute("This type is obsolete and will be removed in a future version. The recommended alternative is Microsoft.Extensions.Hosting.IHostApplicationLifetime.", false)]
public partial interface IApplicationLifetime
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<Reference Include="Microsoft.Bcl.AsyncInterfaces" />
}
namespace Microsoft.Extensions.Hosting.Internal
{
-#pragma warning disable CS0618 // Type or member is obsolete
public partial class ApplicationLifetime : Microsoft.Extensions.Hosting.IApplicationLifetime, Microsoft.Extensions.Hosting.IHostApplicationLifetime
-#pragma warning restore CS0618 // Type or member is obsolete
{
public ApplicationLifetime(Microsoft.Extensions.Logging.ILogger<Microsoft.Extensions.Hosting.Internal.ApplicationLifetime> logger) { }
public System.Threading.CancellationToken ApplicationStarted { get { throw null; } }
public System.Threading.Tasks.Task StopAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
public System.Threading.Tasks.Task WaitForStartAsync(System.Threading.CancellationToken cancellationToken) { throw null; }
}
-#pragma warning disable CS0618 // Type or member is obsolete
public partial class HostingEnvironment : Microsoft.Extensions.Hosting.IHostEnvironment, Microsoft.Extensions.Hosting.IHostingEnvironment
-#pragma warning restore CS0618 // Type or member is obsolete
{
public HostingEnvironment() { }
public string ApplicationName { get { throw null; } set { } }
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="Microsoft.Extensions.Hosting.cs" />
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.ArrayList))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Comparer))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Hashtable))]
-#pragma warning disable 0618
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.IHashCodeProvider))]
-#pragma warning restore 0618
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
}
public partial class ConfigurationErrorsException : System.Configuration.ConfigurationException
{
-#pragma warning disable CS0618
public ConfigurationErrorsException() { }
protected ConfigurationErrorsException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { }
public ConfigurationErrorsException(string message) { }
public ConfigurationErrorsException(string message, string filename, int line) { }
public ConfigurationErrorsException(string message, System.Xml.XmlNode node) { }
public ConfigurationErrorsException(string message, System.Xml.XmlReader reader) { }
-#pragma warning restore CS0618
public override string BareMessage { get { throw null; } }
public System.Collections.ICollection Errors { get { throw null; } }
public override string Filename { get { throw null; } }
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;net461;$(NetFrameworkCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
<ExcludeCurrentFullFrameworkFromPackage>true</ExcludeCurrentFullFrameworkFromPackage>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
}
public sealed partial class MemberAssignment : System.Linq.Expressions.MemberBinding
{
-#pragma warning disable CS0618
internal MemberAssignment() : base (default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) { }
-#pragma warning restore CS0618
public System.Linq.Expressions.Expression Expression { get { throw null; } }
public System.Linq.Expressions.MemberAssignment Update(System.Linq.Expressions.Expression expression) { throw null; }
}
}
public sealed partial class MemberListBinding : System.Linq.Expressions.MemberBinding
{
-#pragma warning disable CS0618
internal MemberListBinding() : base (default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) { }
-#pragma warning restore CS0618
public System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.ElementInit> Initializers { get { throw null; } }
public System.Linq.Expressions.MemberListBinding Update(System.Collections.Generic.IEnumerable<System.Linq.Expressions.ElementInit> initializers) { throw null; }
}
public sealed partial class MemberMemberBinding : System.Linq.Expressions.MemberBinding
{
-#pragma warning disable CS0618
internal MemberMemberBinding() : base (default(System.Linq.Expressions.MemberBindingType), default(System.Reflection.MemberInfo)) { }
-#pragma warning restore CS0618
public System.Collections.ObjectModel.ReadOnlyCollection<System.Linq.Expressions.MemberBinding> Bindings { get { throw null; } }
public System.Linq.Expressions.MemberMemberBinding Update(System.Collections.Generic.IEnumerable<System.Linq.Expressions.MemberBinding> bindings) { throw null; }
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
public override System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult) { throw null; }
public System.IO.Stream EndGetRequestStream(System.IAsyncResult asyncResult, out System.Net.TransportContext? context) { throw null; }
public override System.Net.WebResponse EndGetResponse(System.IAsyncResult asyncResult) { throw null; }
-#pragma warning disable 0809 // Obsolete member overrides non-obsolete member
[System.ObsoleteAttribute("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-#pragma warning restore 0809
public override System.IO.Stream GetRequestStream() { throw null; }
public System.IO.Stream GetRequestStream(out System.Net.TransportContext? context) { throw null; }
public override System.Net.WebResponse GetResponse() { throw null; }
public override bool SupportsHeaders { get { throw null; } }
public override void Close() { }
protected override void Dispose(bool disposing) { }
-#pragma warning disable 0809 // Obsolete member overrides non-obsolete member
[System.ObsoleteAttribute("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")]
protected override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
-#pragma warning restore 0809
public string GetResponseHeader(string headerName) { throw null; }
public override System.IO.Stream GetResponseStream() { throw null; }
[System.ObsoleteAttribute("Serialization is obsoleted for this type. https://go.microsoft.com/fwlink/?linkid=14202")]
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0809</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
public void Add(System.Net.HttpRequestHeader header, string? value) { }
public void Add(System.Net.HttpResponseHeader header, string? value) { }
public void Add(string header) { }
-#pragma warning disable CS8765 // Nullability of parameter 'name' doesn't match overridden member
public override void Add(string name, string? value) { }
-#pragma warning restore CS8765
protected void AddWithoutValidate(string headerName, string? headerValue) { }
public override void Clear() { }
public override string? Get(int index) { throw null; }
public override string GetKey(int index) { throw null; }
public override void GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public override string[]? GetValues(int index) { throw null; }
-#pragma warning disable CS8765 // Nullability of parameter 'header' doesn't match overridden member
public override string[]? GetValues(string header) { throw null; }
-#pragma warning restore CS8765
public static bool IsRestricted(string headerName) { throw null; }
public static bool IsRestricted(string headerName, bool response) { throw null; }
public override void OnDeserialization(object? sender) { }
public void Remove(System.Net.HttpRequestHeader header) { }
public void Remove(System.Net.HttpResponseHeader header) { }
-#pragma warning disable CS8765 // Nullability of parameter 'name' doesn't match overridden member
public override void Remove(string name) { }
-#pragma warning restore CS8765
public void Set(System.Net.HttpRequestHeader header, string? value) { }
public void Set(System.Net.HttpResponseHeader header, string? value) { }
-#pragma warning disable CS8765 // Nullability of parameter 'name' doesn't match overridden member
public override void Set(string name, string? value) { }
-#pragma warning restore CS8765
void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo serializationInfo, System.Runtime.Serialization.StreamingContext streamingContext) { }
public byte[] ToByteArray() { throw null; }
public override string ToString() { throw null; }
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
+ <!-- Nullability of parameter 'name' doesn't match overridden member -->
+ <NoWarn>$(NoWarn);CS8765</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Net.WebHeaderCollection.cs" />
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
-#pragma warning disable 0618
-
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomainSetup))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomainUnloadedException))]
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0618</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
public override System.Reflection.Module Module { get { throw null; } }
public override string Name { get { throw null; } }
public override System.Type? ReflectedType { get { throw null; } }
-#pragma warning disable CS8765 // Nullability of parameters 'target' and 'handler' don't match overridden member
public override void AddEventHandler(object target, System.Delegate handler) { }
-#pragma warning restore CS8765
public override System.Reflection.MethodInfo? GetAddMethod(bool nonPublic) { throw null; }
public override object[] GetCustomAttributes(bool inherit) { throw null; }
public override object[] GetCustomAttributes(System.Type attributeType, bool inherit) { throw null; }
public override System.Reflection.MethodInfo? GetRaiseMethod(bool nonPublic) { throw null; }
public override System.Reflection.MethodInfo? GetRemoveMethod(bool nonPublic) { throw null; }
public override bool IsDefined(System.Type attributeType, bool inherit) { throw null; }
-#pragma warning disable CS8765 // Nullability of parameters 'target' and 'handler' don't match overridden member
public override void RemoveEventHandler(object target, System.Delegate handler) { }
-#pragma warning restore CS8765
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly, Inherited=false)]
public sealed partial class ComCompatibleVersionAttribute : System.Attribute
<PropertyGroup>
<!-- Don't warn about usage of obsolete API since the contract must keep its own references
to its own obsolete API. -->
- <NoWarn>$(NoWarn);618</NoWarn>
+ <!-- Nullability of parameter 'name' doesn't match overridden member -->
+ <NoWarn>$(NoWarn);618;CS8765</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
public abstract bool Equals(string? x, string? y);
public static System.StringComparer FromComparison(System.StringComparison comparisonType) { throw null; }
public int GetHashCode(object obj) { throw null; }
-#pragma warning disable CS8614 // Remove warning disable when nullable attributes are respected
public abstract int GetHashCode(string obj);
-#pragma warning restore CS8614
}
public enum StringComparison
{
public string? Message { get; }
public string? Url { get; set; }
}
-#pragma warning disable CS3015 // Type has no accessible constructors which use only CLS-compliant types
public abstract class OSPlatformAttribute : System.Attribute
-#pragma warning restore CS3015 // Type has no accessible constructors which use only CLS-compliant types
{
private protected OSPlatformAttribute(string platformName) { }
public string PlatformName { get; }
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<!-- It is a core assembly because it defines System.Object so we need to pass RuntimeMetadataVersion to the compiler -->
<RuntimeMetadataVersion>v4.0.30319</RuntimeMetadataVersion>
- <!-- disable warnings about obsolete APIs -->
- <NoWarn>$(NoWarn);0809;0618</NoWarn>
+ <!-- disable warnings about obsolete APIs,
+ Remove warning disable when nullable attributes are respected,
+ Type has no accessible constructors which use only CLS-compliant types -->
+ <NoWarn>$(NoWarn);0809;0618;CS8614;CS3015</NoWarn>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<Nullable>enable</Nullable>
</PropertyGroup>
public byte[]? Salt { get { throw null; } set { } }
public byte[] CryptDeriveKey(string? algname, string? alghashname, int keySize, byte[] rgbIV) { throw null; }
protected override void Dispose(bool disposing) { }
-#pragma warning disable 0809
[System.ObsoleteAttribute("Rfc2898DeriveBytes replaces PasswordDeriveBytes for deriving key material from a password and is preferred in new applications.")]
public override byte[] GetBytes(int cb) { throw null; }
-#pragma warning restore 0809
public override void Reset() { }
}
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <NoWarn>$(NoWarn);CS0809</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
-#pragma warning disable CS3011 // Only CLS-compliant members can be abstract
-
namespace System.Text.Encodings.Web
{
public abstract partial class HtmlEncoder : System.Text.Encodings.Web.TextEncoder
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <!-- Only CLS-compliant members can be abstract -->
+ <NoWarn>$(NoWarn);CS3011</NoWarn>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>