未验证 提交 ac98c817 编写于 作者: J Jeff Handley 提交者: GitHub

Improve some of our recent obsoletions (#51721)

* Replace usage of NET50_OBSOLETIONS with NET5_0_OR_GREATER

* Correct GitHub handle

* Use a diagnostic id for the RuntimeEnvironment obsoletions from #50666

* Use fully-qualified attribute name in ref source updates from #49411

* Use a diagnostic id for the JsonSerializerOptions.IgnoreNullValues obsoletion from #41141
上级 23d16da1
......@@ -36,7 +36,7 @@ The acceptance criteria for adding an obsoletion includes:
* Register the `SYSLIB0###` URL in `aka.ms`
* The vanity name will be `dotnet-warnings/syslib0###`
* Ensure the link's group owner matches the group owner of `dotnet-warnings/syslib0001`
* Connect with `@jeffhandley`, `@levib`, or `@gewarren` with any questions
* Connect with `@jeffhandley`, `@GrabYourPitchforks`, or `@gewarren` with any questions
An example obsoletion PR that can be referenced where each of the above criteria was met is:
......@@ -66,6 +66,8 @@ The PR that reveals the implementation of the `<IncludeInternalObsoleteAttribute
| __`SYSLIB0014`__ | WebRequest, HttpWebRequest, ServicePoint, and WebClient are obsolete. Use HttpClient instead. |
| __`SYSLIB0015`__ | DisablePrivateReflectionAttribute has no effect in .NET 6.0+ applications. |
| __`SYSLIB0016`__ | Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations. |
| __`SYSLIB0019`__ | RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException. |
| __`SYSLIB0020`__ | JsonSerializerOptions.IgnoreNullValues is obsolete. To ignore null values when serializing, set DefaultIgnoreCondition to JsonIgnoreCondition.WhenWritingNull. |
## Analyzer Warnings
......
......@@ -59,5 +59,11 @@ internal static class Obsoletions
internal const string GetContextInfoMessage = "Use the Graphics.GetContextInfo overloads that accept arguments for better performance and fewer allocations.";
internal const string GetContextInfoDiagId = "SYSLIB0016";
internal const string RuntimeEnvironmentMessage = "RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException.";
internal const string RuntimeEnvironmentDiagId = "SYSLIB0019";
internal const string JsonSerializerOptionsIgnoreNullValuesMessage = "JsonSerializerOptions.IgnoreNullValues is obsolete. To ignore null values when serializing, set DefaultIgnoreCondition to JsonIgnoreCondition.WhenWritingNull.";
internal const string JsonSerializerOptionsIgnoreNullValuesDiagId = "SYSLIB0020";
}
}
......@@ -7,10 +7,6 @@
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<Nullable>enable</Nullable>
</PropertyGroup>
<!-- We conditionally apply net5.0+ obsoletions -->
<PropertyGroup Condition="!($(TargetFramework.StartsWith('netcoreapp')) or $(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4')))">
<DefineConstants>$(DefineConstants);NET50_OBSOLETIONS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="System\CoreRtBridge.cs" />
<Compile Include="System\Reflection\DefaultBinder.cs" />
......@@ -164,7 +160,7 @@
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.CompilerServices.Unsafe\src\System.Runtime.CompilerServices.Unsafe.ilproj" />
</ItemGroup>
<!-- Application tfms (.NETCoreApp, .NETFramework) need to use the same or higher version of .NETStandard's dependencies. -->
<Choose>
<When Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
......
......@@ -41,11 +41,11 @@ protected RoAssembly(MetadataLoadContext loader, int assemblyFileCount)
// Location and codebase
public abstract override string Location { get; }
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed override string CodeBase => throw new NotSupportedException(SR.NotSupported_AssemblyCodeBase);
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeBaseMessage, DiagnosticId = Obsoletions.CodeBaseDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed override string EscapedCodeBase => throw new NotSupportedException(SR.NotSupported_AssemblyCodeBase);
......@@ -151,7 +151,7 @@ public sealed override AssemblyName[] GetReferencedAssemblies()
// Miscellaneous properties
public sealed override bool ReflectionOnly => true;
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete("The Global Assembly Cache is not supported.", DiagnosticId = "SYSLIB0005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
#endif
public sealed override bool GlobalAssemblyCache => false;
......
......@@ -794,13 +794,13 @@ public sealed partial class ProgIdAttribute : System.Attribute
}
public static partial class RuntimeEnvironment
{
[System.ObsoleteAttribute("SystemConfigurationFile is no longer supported.")]
[System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static string SystemConfigurationFile { get { throw null; } }
public static bool FromGlobalAccessCache(System.Reflection.Assembly a) { throw null; }
public static string GetRuntimeDirectory() { throw null; }
[System.ObsoleteAttribute("GetRuntimeInterfaceAsIntPtr(Guid, Guid) is no longer supported.")]
[System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.IntPtr GetRuntimeInterfaceAsIntPtr(System.Guid clsid, System.Guid riid) { throw null; }
[System.ObsoleteAttribute("GetRuntimeInterfaceAsObject(Guid, Guid) is no longer supported.")]
[System.ObsoleteAttribute("RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0019", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static object GetRuntimeInterfaceAsObject(System.Guid clsid, System.Guid riid) { throw null; }
public static string GetSystemVersion() { throw null; }
}
......
......@@ -46,6 +46,7 @@
<Compile Include="System\Runtime\InteropServices\TypeLibVarFlags.cs" />
<Compile Include="System\Runtime\InteropServices\TypeLibVersionAttribute.cs" />
<Compile Include="System\Security\SecureStringMarshal.cs" />
<Compile Include="$(CommonPath)System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(CoreLibProject)" />
......
......@@ -8,7 +8,7 @@ namespace System.Runtime.InteropServices
{
public static class RuntimeEnvironment
{
[Obsolete("SystemConfigurationFile is no longer supported.")]
[Obsolete(Obsoletions.RuntimeEnvironmentMessage, DiagnosticId = Obsoletions.RuntimeEnvironmentDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static string SystemConfigurationFile => throw new PlatformNotSupportedException();
public static bool FromGlobalAccessCache(Assembly a) => false;
......@@ -23,10 +23,10 @@ public static string GetRuntimeDirectory()
return Path.GetDirectoryName(runtimeDirectory) + Path.DirectorySeparatorChar;
}
[Obsolete("GetRuntimeInterfaceAsIntPtr(Guid, Guid) is no longer supported.")]
[Obsolete(Obsoletions.RuntimeEnvironmentMessage, DiagnosticId = Obsoletions.RuntimeEnvironmentDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid) => throw new PlatformNotSupportedException();
[Obsolete("GetRuntimeInterfaceAsObject(Guid, Guid) is no longer supported.")]
[Obsolete(Obsoletions.RuntimeEnvironmentMessage, DiagnosticId = Obsoletions.RuntimeEnvironmentDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static object GetRuntimeInterfaceAsObject(Guid clsid, Guid riid) => throw new PlatformNotSupportedException();
public static string GetSystemVersion() => typeof(object).Assembly.ImageRuntimeVersion;
......
......@@ -20,29 +20,25 @@ public void RuntimeEnvironmentSysVersion()
Assert.NotEmpty(RuntimeEnvironment.GetSystemVersion());
}
#pragma warning disable SYSLIB0019 // RuntimeEnvironment members SystemConfigurationFile, GetRuntimeInterfaceAsIntPtr, and GetRuntimeInterfaceAsObject are no longer supported and throw PlatformNotSupportedException.
[Fact]
public void SystemConfigurationFile_Get_ThrowsPlatformNotSupportedException()
{
#pragma warning disable 618 // SystemConfigurationFile is marked as Obsolete
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.SystemConfigurationFile);
#pragma warning restore 618
}
[Fact]
public void GetRuntimeInterfaceAsObject_Invoke_ThrowsPlatformNotSupportedException()
{
#pragma warning disable 618 // GetRuntimeInterfaceAsObject is marked as Obsolete
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsObject(Guid.Empty, Guid.Empty));
#pragma warning restore 618
}
[Fact]
public void GetRuntimeInterfaceAsIntPtr_Invoke_ThrowsPlatformNotSupportedException()
{
#pragma warning disable 618 // GetRuntimeInterfaceAsIntPtr is marked as Obsolete
Assert.Throws<PlatformNotSupportedException>(() => RuntimeEnvironment.GetRuntimeInterfaceAsIntPtr(Guid.Empty, Guid.Empty));
#pragma warning restore 618
}
#pragma warning restore SYSLIB0019
[Fact]
public void FromGlobalAccessCache_nNvoke_ReturnsFalse()
......
......@@ -536,29 +536,29 @@ namespace System.Security.Policy
public sealed partial class Evidence : System.Collections.ICollection, System.Collections.IEnumerable
{
public Evidence() { }
[Obsolete("This constructor is obsolete. Please use the constructor which takes arrays of EvidenceBase instead.")]
[System.ObsoleteAttribute("This constructor is obsolete. Please use the constructor which takes arrays of EvidenceBase instead.")]
public Evidence(object[] hostEvidence, object[] assemblyEvidence) { }
public Evidence(System.Security.Policy.Evidence evidence) { }
public Evidence(System.Security.Policy.EvidenceBase[] hostEvidence, System.Security.Policy.EvidenceBase[] assemblyEvidence) { }
[Obsolete("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
[System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Please use GetHostEnumerator and GetAssemblyEnumerator to iterate over the evidence to collect a count.")]
public int Count { get { throw null; } }
public bool IsReadOnly { get { throw null; } }
public bool IsSynchronized { get { throw null; } }
public bool Locked { get { throw null; } set { } }
public object SyncRoot { get { throw null; } }
[Obsolete("This method is obsolete. Please use AddAssemblyEvidence instead.")]
[System.ObsoleteAttribute("This method is obsolete. Please use AddAssemblyEvidence instead.")]
public void AddAssembly(object id) { }
public void AddAssemblyEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
[Obsolete("This method is obsolete. Please use AddHostEvidence instead.")]
[System.ObsoleteAttribute("This method is obsolete. Please use AddHostEvidence instead.")]
public void AddHost(object id) { }
public void AddHostEvidence<T>(T evidence) where T : System.Security.Policy.EvidenceBase { }
public void Clear() { }
public System.Security.Policy.Evidence? Clone() { throw null; }
[Obsolete("Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
[System.ObsoleteAttribute("Evidence should not be treated as an ICollection. Please use the GetHostEnumerator and GetAssemblyEnumerator methods rather than using CopyTo.")]
public void CopyTo(System.Array array, int index) { }
public System.Collections.IEnumerator GetAssemblyEnumerator() { throw null; }
public T? GetAssemblyEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
[Obsolete("GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.")]
public T? GetAssemblyEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
[System.ObsoleteAttribute("GetEnumerator is obsolete. Please use GetAssemblyEnumerator and GetHostEnumerator instead.")]
public System.Collections.IEnumerator GetEnumerator() { throw null; }
public System.Collections.IEnumerator GetHostEnumerator() { throw null; }
public T? GetHostEvidence<T>() where T : System.Security.Policy.EvidenceBase { throw null; }
......
......@@ -6,10 +6,6 @@
<PropertyGroup>
<IsPartialFacadeAssembly Condition="$(TargetFramework.StartsWith('net4'))">true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- We conditionally apply net5.0+ obsoletions -->
<PropertyGroup Condition="!($(TargetFramework.StartsWith('netcoreapp')) or $(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4')))">
<DefineConstants>$(DefineConstants);NET50_OBSOLETIONS</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="System.Security.Permissions.cs" />
<Compile Include="System.Security.Permissions.Forwards.cs" />
......
......@@ -6,7 +6,7 @@
namespace System.Xaml.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
#endif
public sealed partial class XamlLoadPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
......
......@@ -4,10 +4,6 @@
<TargetFrameworks>$(NetCoreAppCurrent);net5.0;netcoreapp3.0;netstandard2.0;net461</TargetFrameworks>
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
</PropertyGroup>
<!-- We conditionally apply net5.0+ obsoletions -->
<PropertyGroup Condition="!($(TargetFramework.StartsWith('netcoreapp')) or $(TargetFramework.StartsWith('netstandard')) or $(TargetFramework.StartsWith('net4')))">
<DefineConstants>$(DefineConstants);NET50_OBSOLETIONS</DefineConstants>
</PropertyGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<Compile Include="System\ApplicationIdentity.cs" />
<Compile Include="System\Configuration\ConfigurationPermission.cs" />
......
......@@ -6,7 +6,7 @@
namespace System.Configuration
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class ConfigurationPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Configuration
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)]
......
......@@ -6,7 +6,7 @@
namespace System.Data.Common
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public abstract class DBDataPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -5,7 +5,7 @@
namespace System.Data.Common
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor| AttributeTargets.Method,
......
......@@ -7,7 +7,7 @@
namespace System.Data.Odbc
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class OdbcPermission : DBDataPermission
......
......@@ -7,7 +7,7 @@
namespace System.Data.OleDb
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class OleDbPermission : DBDataPermission
......
......@@ -6,7 +6,7 @@
namespace System.Data.OracleClient
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class OraclePermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -5,7 +5,7 @@
namespace System.Data.OracleClient
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
......
......@@ -6,7 +6,7 @@
namespace System.Data.SqlClient
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class SqlClientPermission : DBDataPermission
......
......@@ -5,7 +5,7 @@
namespace System.Diagnostics
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class EventLogPermission : ResourcePermissionBase
......
......@@ -6,7 +6,7 @@
namespace System.Diagnostics
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct
......
......@@ -5,7 +5,7 @@
namespace System.Diagnostics
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class PerformanceCounterPermission : ResourcePermissionBase
......
......@@ -5,7 +5,7 @@
using System.Security.Permissions;
namespace System.Diagnostics
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Event,
......
......@@ -6,7 +6,7 @@
namespace System.Drawing.Printing
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class PrintingPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -5,7 +5,7 @@
namespace System.Drawing.Printing
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.All, AllowMultiple = true)]
......
......@@ -6,7 +6,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class DnsPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class |
......
......@@ -6,7 +6,7 @@
namespace System.Net.Mail
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class SmtpPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net.Mail
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class |
......
......@@ -6,7 +6,7 @@
namespace System.Net.NetworkInformation
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class NetworkInformationPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net.NetworkInformation
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -6,7 +6,7 @@
namespace System.Net.PeerToPeer.Collaboration
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class PeerCollaborationPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net.PeerToPeer.Collaboration
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
......
......@@ -6,7 +6,7 @@
namespace System.Net.PeerToPeer
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class PnrpPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net.PeerToPeer
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
......
......@@ -6,7 +6,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class SocketPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class |
......
......@@ -8,7 +8,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class WebPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -6,7 +6,7 @@
namespace System.Net
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class |
......
......@@ -3,7 +3,7 @@
namespace System.Security
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public abstract partial class CodeAccessPermission : IPermission, ISecurityEncodable, IStackWalk
......
......@@ -7,7 +7,7 @@
namespace System.Security
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Serializable]
......
......@@ -5,7 +5,7 @@
namespace System.Security
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class NamedPermissionSet : PermissionSet
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class DataProtectionPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class EnvironmentPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class FileDialogPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class FileIOPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class GacIdentityPermission : CodeAccessPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(4205), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public partial interface IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public enum IsolatedStorageContainment
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class IsolatedStorageFilePermission : IsolatedStoragePermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public abstract class IsolatedStoragePermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public abstract class IsolatedStoragePermissionAttribute : CodeAccessSecurityAttribute
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class KeyContainerPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class KeyContainerPermissionAccessEntry
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class KeyContainerPermissionAccessEntryCollection : ICollection
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class KeyContainerPermissionAccessEntryEnumerator : IEnumerator
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public enum KeyContainerPermissionFlags
......
......@@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public enum MediaPermissionAudio
......@@ -13,7 +13,7 @@ public enum MediaPermissionAudio
AllAudio
}
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public enum MediaPermissionVideo
......@@ -24,7 +24,7 @@ public enum MediaPermissionVideo
AllVideo,
}
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public enum MediaPermissionImage
......@@ -35,7 +35,7 @@ public enum MediaPermissionImage
AllImage,
}
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class MediaPermission : CodeAccessPermission, IUnrestrictedPermission
......@@ -61,7 +61,7 @@ public sealed class MediaPermission : CodeAccessPermission, IUnrestrictedPermiss
public MediaPermissionImage Image { get { return MediaPermissionImage.AllImage; } }
}
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -8,7 +8,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class PrincipalPermission : IPermission, ISecurityEncodable, IUnrestrictedPermission
......
......@@ -3,13 +3,13 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(68), AllowMultiple = true, Inherited = false)]
public sealed partial class PrincipalPermissionAttribute : CodeAccessSecurityAttribute
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.PrincipalPermissionAttributeMessage, error: true, DiagnosticId = Obsoletions.PrincipalPermissionAttributeDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public PrincipalPermissionAttribute(SecurityAction action) : base(default(SecurityAction)) { }
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class PublisherIdentityPermission : CodeAccessPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class ReflectionPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class RegistryPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -5,7 +5,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public abstract class ResourcePermissionBase : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public class ResourcePermissionBaseEntry
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class SecurityPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class SiteIdentityPermission : CodeAccessPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed class StorePermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class StrongNameIdentityPermission : CodeAccessPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class StrongNamePublicKeyBlob
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class TypeDescriptorPermission : CodeAccessPermission, IUnrestrictedPermission
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
[Flags]
......
......@@ -3,7 +3,7 @@
namespace System.Security.Permissions
{
#if NET50_OBSOLETIONS
#if NET5_0_OR_GREATER
[Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public sealed partial class UIPermission : CodeAccessPermission, IUnrestrictedPermission
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册