Per https://github.com/dotnet/designs/blob/master/accepted/2020/better-obsoletion/better-obsoletion.md, we now have a strategy in place for marking existing APIs as `[Obsolete]`. This takes advantage of the new diagnostic id and URL template mechanisms introduced to `ObsoleteAttribute` in .NET 5.
-When obsoleting an API, use the diagnostic ID `MSLIB####`, where _\#\#\#\#_ is the next four-digit identifier in the sequence, and add it to the list below. This helps us maintain a centralized location of all APIs that were obsoleted using this mechanism.
+When obsoleting an API, use the diagnostic ID `SYSLIB####`, where _\#\#\#\#_ is the next four-digit identifier in the sequence, and add it to the list below. This helps us maintain a centralized location of all APIs that were obsoleted using this mechanism.
The URL template we use for obsoletions is `https://aka.ms/dotnet-warnings/{0}`.
-Currently the identifiers `MSLIB0001` through `MSLIB0999` are carved out for obsoletions. If we wish to introduce analyzer warnings not related to obsoletion in the future, we should begin at a different range, such as `MSLIB2000`.
+Currently the identifiers `SYSLIB0001` through `SYSLIB0999` are carved out for obsoletions. If we wish to introduce analyzer warnings not related to obsoletion in the future, we should begin at a different range, such as `SYSLIB2000`.
-## Current obsoletions (`MSLIB0001` - `MSLIB0999`)
+## Current obsoletions (`SYSLIB0001` - `SYSLIB0999`)
-| Diagnostic ID | Description |
-| :--------------- | :---------- |
-| __`MSLIB0001`__ | The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead. |
-| __`MSLIB0002`__ | `PrincipalPermissionAttribute` is not honored by the runtime and must not be used. |
-| __`MSLIB0003`__ | `BinaryFormatter` serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for recommended alternatives. |
+| Diagnostic ID | Description |
+| :---------------- | :---------- |
+| __`SYSLIB0001`__ | The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead. |
+| __`SYSLIB0002`__ | PrincipalPermissionAttribute is not honored by the runtime and must not be used. |
+| __`SYSLIB0003`__ | Code Access Security is not supported or honored by the runtime. |
+| __`SYSLIB0004`__ | The Constrained Execution Region (CER) feature is not supported. |
+| __`SYSLIB0005`__ | The Global Assembly Cache is not supported. |
+| __`SYSLIB0006`__ | Thread.Abort is not supported and throws PlatformNotSupportedException. |
+| __`SYSLIB0007`__ | The default implementation of this cryptography algorithm is not supported. |
+| __`SYSLIB0008`__ | The CreatePdbGenerator API is not supported and throws PlatformNotSupportedException. |
+| __`SYSLIB0009`__ | The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException. |
+| __`SYSLIB0010`__ | This Remoting API is not supported and throws PlatformNotSupportedException. |
+| __`SYSLIB0011`__ | `BinaryFormatter` serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for recommended alternatives. |
return InternalAssembly.GetReferencedAssemblies();
}
+ [Obsolete(Obsoletions.GlobalAssemblyCacheMessage, DiagnosticId = Obsoletions.GlobalAssemblyCacheDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public override bool GlobalAssemblyCache => InternalAssembly.GlobalAssemblyCache;
public override long HostContext => InternalAssembly.HostContext;
}
}
+ [Obsolete(Obsoletions.GlobalAssemblyCacheMessage, DiagnosticId = Obsoletions.GlobalAssemblyCacheDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public override bool GlobalAssemblyCache => false;
public override long HostContext => 0;
private static bool SafeWaitForMutexOnce(Mutex mutexIn, ref Mutex mutexOut)
{
bool ret;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{ }
finally
--- /dev/null
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+
+namespace System
+{
+ internal static class Obsoletions
+ {
+ internal const string SharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}";
+
+ internal const string SystemTextEncodingUTF7Message = "The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.";
+ internal const string SystemTextEncodingUTF7DiagId = "SYSLIB0001";
+
+ internal const string PrincipalPermissionAttributeMessage = "PrincipalPermissionAttribute is not honored by the runtime and must not be used.";
+ internal const string PrincipalPermissionAttributeDiagId = "SYSLIB0002";
+
+ internal const string CodeAccessSecurityMessage = "Code Access Security is not supported or honored by the runtime.";
+ internal const string CodeAccessSecurityDiagId = "SYSLIB0003";
+
+ internal const string ConstrainedExecutionRegionMessage = "The Constrained Execution Region (CER) feature is not supported.";
+ internal const string ConstrainedExecutionRegionDiagId = "SYSLIB0004";
+
+ internal const string GlobalAssemblyCacheMessage = "The Global Assembly Cache is not supported.";
+ internal const string GlobalAssemblyCacheDiagId = "SYSLIB0005";
+
+ internal const string ThreadAbortMessage = "Thread.Abort is not supported and throws PlatformNotSupportedException.";
+ internal const string ThreadAbortDiagId = "SYSLIB0006";
+
+ internal const string DefaultCryptoAlgorithmsMessage = "The default implementation of this cryptography algorithm is not supported.";
+ internal const string DefaultCryptoAlgorithmsDiagId = "SYSLIB0007";
+
+ internal const string CreatePdbGeneratorMessage = "The CreatePdbGenerator API is not supported and throws PlatformNotSupportedException.";
+ internal const string CreatePdbGeneratorDiagId = "SYSLIB0008";
+
+ internal const string AuthenticationManagerMessage = "The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.";
+ internal const string AuthenticationManagerDiagId = "SYSLIB0009";
+
+ internal const string RemotingApisMessage = "This Remoting API is not supported and throws PlatformNotSupportedException.";
+ internal const string RemotingApisDiagId = "SYSLIB0010";
+
+ internal const string BinaryFormatterMessage = "BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.";
+ internal const string BinaryFormatterDiagId = "SYSLIB0011";
+ }
+}
// https://msdn.microsoft.com/en-us/library/windows/desktop/aa366892(v=vs.85).aspx
[DllImport(KERNEL32_LIB, CallingConvention = CallingConvention.Winapi, SetLastError = true)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool VirtualFree(
[In] IntPtr lpAddress,
<!-- Warnings that should be disabled in our test projects. -->
<PropertyGroup Condition="'$(IsTestProject)' == 'true' or '$(IsTestSupportProject)' == 'true'">
<!-- don't warn on usage of BinaryFormatter from test projects -->
- <NoWarn>$(NoWarn);MSLIB0003</NoWarn>
+ <NoWarn>$(NoWarn);SYSLIB0011</NoWarn>
</PropertyGroup>
<!-- Common repo directories -->
<PropertyGroup>
<NoWarn Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework' or '$(TargetFrameworkIdentifier)' == '.NETStandard' or '$(TargetFramework)' == 'netcoreapp2.1'">$(NoWarn);nullable</NoWarn>
<NoWarn Condition="'$(GeneratePlatformNotSupportedAssembly)' == 'true' or '$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);nullable</NoWarn>
+ <!-- Ignore Obsolete errors within the generated shims that type-forward types.
+ SYSLIB0003 is for CAS. SYSLIB0004 is the obsoletion of CER. -->
+ <NoWarn Condition="'$(IsPartialFacadeAssembly)' == 'true'">$(NoWarn);SYSLIB0003;SYSLIB0004</NoWarn>
<!-- Reset these properties back to blank, since they are defaulted by Microsoft.NET.Sdk -->
<FileAlignment Condition="'$(FileAlignment)' == '512'" />
<ErrorReport Condition="'$(ErrorReport)' == 'prompt'" />
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <!-- Constrained Execution Regions only apply to netstandard2.0 and net4* -->
+ <DefineConstants Condition="$(TargetFramework.StartsWith('netstandard2.0')) or $(TargetFramework.StartsWith('net4'))">$(DefineConstants);FEATURE_CER</DefineConstants>
<IsPartialFacadeAssembly Condition="$(TargetFramework.StartsWith('net4'))">true</IsPartialFacadeAssembly>
<GeneratePlatformNotSupportedAssemblyMessage Condition="'$(TargetFramework)' == 'netstandard2.0' and '$(TargetsAnyOS)' == 'true'">SR.PlatformNotSupported_SystemEvents</GeneratePlatformNotSupportedAssemblyMessage>
</PropertyGroup>
}
}
+#if FEATURE_CER
[PrePrepareMethod]
+#endif
private static void Shutdown(object? sender, EventArgs e)
{
Shutdown();
public static void Serialize(Stream o, string cryptoKey, DesigntimeLicenseContext context)
{
IFormatter formatter = new BinaryFormatter();
-#pragma warning disable MSLIB0003 // Issue https://github.com/dotnet/runtime/issues/39293 tracks finding an alternative to BinaryFormatter
+#pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39293 tracks finding an alternative to BinaryFormatter
formatter.Serialize(o, new object[] { cryptoKey, context._savedLicenseKeys });
-#pragma warning restore MSLIB0003
+#pragma warning restore SYSLIB0011
}
internal static void Deserialize(Stream o, string cryptoKey, RuntimeLicenseContext context)
{
-#pragma warning disable MSLIB0003 // Issue https://github.com/dotnet/runtime/issues/39293 tracks finding an alternative to BinaryFormatter
+#pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39293 tracks finding an alternative to BinaryFormatter
IFormatter formatter = new BinaryFormatter();
object obj = formatter.Deserialize(o);
-#pragma warning restore MSLIB0003
+#pragma warning restore SYSLIB0011
if (obj is object[] value)
{
throw new NotImplementedException();
}
+#pragma warning disable SYSLIB0003 // Obsolete: CAS
void IInternalConfigHost.GetRestrictedPermissions(IInternalConfigRecord configRecord, out PermissionSet permissionSet, out bool isHostReady)
{
throw new NotImplementedException();
}
+#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
}
}
{
BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false));
MemoryStream memStream = new MemoryStream();
-#pragma warning disable MSLIB0003 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
+#pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
bf.Serialize(memStream, Tables[i]);
-#pragma warning restore MSLIB0003
+#pragma warning restore SYSLIB0011
memStream.Position = 0;
info.AddValue(string.Format(CultureInfo.InvariantCulture, "DataSet.Tables_{0}", i), memStream.GetBuffer());
}
MemoryStream memStream = new MemoryStream(buffer);
memStream.Position = 0;
BinaryFormatter bf = new BinaryFormatter(null, new StreamingContext(context.State, false));
-#pragma warning disable MSLIB0003 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
+#pragma warning disable SYSLIB0011 // Issue https://github.com/dotnet/runtime/issues/39289 tracks finding an alternative to BinaryFormatter
DataTable dt = (DataTable)bf.Deserialize(memStream);
-#pragma warning restore MSLIB0003
+#pragma warning restore SYSLIB0011
Tables.Add(dt);
}
return ((null != inputString) ? inputString.Length : 0);
}
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
internal static IntPtr IntPtrOffset(IntPtr pbase, int offset)
{
if (4 == ADP.PtrSize)
if (0 < initialSize)
{
_bufferLength = initialSize;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try { }
finally
{
string value = null;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
string value = null;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
byte value;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= destination.Length, "destination too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= destination.Length, "destination too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
short value;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= destination.Length, "destination too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
int value;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= destination.Length, "destination too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
long value;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
IntPtr value;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % ADP.PtrSize, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % 4, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= source.Length, "source too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= source.Length, "source too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % 2, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= source.Length, "source too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % 4, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(startIndex + length <= source.Length, "source too small");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment");
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
internal void ZeroMemory()
{
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
bool mustRelease = false;
CNativeBuffer parameterBuffer = _cmdWrapper._nativeParameterBuffer;
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
//Handle Parameters
Debug.Assert(HandleState.Connected <= _handleState, "AutoCommitOff while in wrong state?");
- // Avoid runtime injected errors in the following block.
// must call SQLSetConnectAttrW and set _handleState
- RuntimeHelpers.PrepareConstrainedRegions();
try { }
finally
{
internal ODBC32.RetCode CompleteTransaction(short transactionOperation)
{
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
DangerousAddRef(ref mustRelease);
}
}
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
private ODBC32.RetCode CompleteTransaction(short transactionOperation, IntPtr handle)
{
// must only call this code from ReleaseHandle or DangerousAddRef region
ODBC32.RetCode retcode = ODBC32.RetCode.SUCCESS;
- // using ConstrainedRegions to make the native ODBC call and change the _handleState
- RuntimeHelpers.PrepareConstrainedRegions();
try { }
finally
{
ODBC32.RetCode retcode;
- // Avoid runtime injected errors in the following block.
- RuntimeHelpers.PrepareConstrainedRegions();
try { }
finally
{
bool mustRelease = false;
Debug.Assert(buffer.Length >= 264, "Native buffer to small (_buffer.Length < 264)");
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
buffer.DangerousAddRef(ref mustRelease);
bool mustRelease = false;
Debug.Assert(buffer.Length >= 544, "Native buffer to small (_buffer.Length < 544)");
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
buffer.DangerousAddRef(ref mustRelease);
bool mustRelease = false;
ODBC32.RetCode retcode = ODBC32.RetCode.SUCCESS;
- // using ConstrainedRegions to make the native ODBC call and AddRef the parent
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
// validate handleType
int cbActual;
ODBC32.RetCode retcode;
bool mustRelease = false;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
// must addref before calling native so it won't be released just after
throw new ArgumentException(SR.Format(SR.ParameterTooLong, nameof(source), 254 - EventLogKey.Length));
Mutex mutex = null;
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
NetFrameworkUtils.EnterMutex(eventLogMutexName, ref mutex);
RegistryKey eventlogkey = null;
Mutex mutex = null;
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
NetFrameworkUtils.EnterMutex(eventLogMutexName, ref mutex);
}
Mutex mutex = null;
- RuntimeHelpers.PrepareConstrainedRegions();
try
{
NetFrameworkUtils.EnterMutex(eventLogMutexName, ref mutex);
if (!EventLog.SourceExists(sourceName, currentMachineName, true))
{
Mutex mutex = null;
- RuntimeHelpers.PrepareConstrainedRegions();
+
try
{
NetFrameworkUtils.EnterMutex(eventLogMutexName, ref mutex);
internal static extern bool EvtCancel(EventLogHandle handle);
[DllImport(WEVTAPI)]
- [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
internal static extern bool EvtClose(IntPtr handle);
/*
bool success = false;
if (ldapConnection != null && ldapConnection._ldapHandle != null && !ldapConnection._ldapHandle.IsInvalid)
{
- RuntimeHelpers.PrepareConstrainedRegions();
try { }
finally
{
{
if (ldapConnection != null && ldapConnection._ldapHandle != null && !ldapConnection._ldapHandle.IsInvalid)
{
- RuntimeHelpers.PrepareConstrainedRegions();
try { }
finally
{
namespace System.DirectoryServices
{
+#pragma warning disable SYSLIB0003
+ // Conditionally marking this type as obsolete in .NET 5+ will require diverging its net5.0 build from netstandard2.0
+ // https://github.com/dotnet/runtime/issues/39413
public sealed class DirectoryServicesPermission : ResourcePermissionBase
{
public DirectoryServicesPermission() { }
public DirectoryServicesPermission(DirectoryServicesPermissionAccess permissionAccess, string path) { }
public DirectoryServicesPermissionEntryCollection PermissionEntries { get; }
}
+#pragma warning restore SYSLIB0003
}
namespace System.DirectoryServices
{
+#pragma warning disable SYSLIB0003
+ // Conditionally marking this type as obsolete in .NET 5+ will require diverging its net5.0 build from netstandard2.0
+ // https://github.com/dotnet/runtime/issues/39413
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct |
AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Event,
AllowMultiple = true, Inherited = false)]
public string Path { get; set; }
public override IPermission CreatePermission() { return default(IPermission); }
}
+#pragma warning restore SYSLIB0003
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
- <NoWarn>$(NoWarn);CS0618</NoWarn>
+ <!-- SYSLIB0003: CAS is obsolete, but we still have tests referencing it -->
+ <NoWarn>$(NoWarn);SYSLIB0003</NoWarn>
<TargetFrameworks>$(NetCoreAppCurrent)-Windows_NT;$(NetFrameworkCurrent)</TargetFrameworks>
</PropertyGroup>
<ItemGroup>
/// <summary>
/// Called on process exit
/// </summary>
- [PrePrepareMethod]
private static void OnShutdown(object? sender, EventArgs e) => Current.Invalidate();
}
}
}
// This is called from AppDomain.ProcessExit and AppDomain.DomainUnload.
- [PrePrepareMethod]
private static void OnDomainUnload(object? sender, EventArgs e)
{
if (s_halftonePalette != IntPtr.Zero)
if (ht.ContainsKey(image))
{
AnimateEventArgs evtArgs = (AnimateEventArgs)ht[image]!;
+#pragma warning disable SYSLIB0006 // https://github.com/dotnet/runtime/issues/39405
evtArgs.RunThread!.Abort();
+#pragma warning restore SYSLIB0006
ht.Remove(image);
}
}
{
CheckWriteOperations();
ExecuteHelper execHelper = new ExecuteHelper(impersonationWorker, InternalHandle);
- RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(tryCode, cleanupCode, execHelper);
+ bool exceptionThrown = true;
+
+ try
+ {
+ ImpersonateAndTryCode(execHelper);
+ exceptionThrown = false;
+ }
+ finally
+ {
+ RevertImpersonationOnBackout(execHelper, exceptionThrown);
+ }
// now handle win32 impersonate/revert specific errors by throwing corresponding exceptions
if (execHelper._impersonateErrorCode != 0)
}
}
- // the following are needed for CER
-
- private static readonly RuntimeHelpers.TryCode tryCode = new RuntimeHelpers.TryCode(ImpersonateAndTryCode);
- private static readonly RuntimeHelpers.CleanupCode cleanupCode = new RuntimeHelpers.CleanupCode(RevertImpersonationOnBackout);
-
private static void ImpersonateAndTryCode(object? helper)
{
ExecuteHelper execHelper = (ExecuteHelper)helper!;
Assert.True(false, string.Format(format, args));
}
-#pragma warning disable MSLIB0001 // Encoding.UTF7 property is obsolete
+#pragma warning disable SYSLIB0001 // Encoding.UTF7 property is obsolete
protected static Encoding LegacyUTF7Encoding => Encoding.UTF7;
-#pragma warning restore MSLIB0001
+#pragma warning restore SYSLIB0001
/// <summary>
/// Returns a value stating whether <paramref name="encoding"/> is UTF-7.
public abstract partial class DebugInfoGenerator
{
protected DebugInfoGenerator() { }
+ [System.ObsoleteAttribute("The CreatePdbGenerator API is not supported and throws PlatformNotSupportedException.", DiagnosticId = "SYSLIB0008", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Runtime.CompilerServices.DebugInfoGenerator CreatePdbGenerator() { throw null; }
public abstract void MarkSequencePoint(System.Linq.Expressions.LambdaExpression method, int ilOffset, System.Linq.Expressions.DebugInfoExpression sequencePoint);
}
<DefineConstants Condition=" '$(FeatureInterpret)' == 'true' ">$(DefineConstants);FEATURE_INTERPRET</DefineConstants>
</PropertyGroup>
<ItemGroup>
+ <Compile Include="$(CommonPath)System\Obsoletions.cs"
+ Link="Common\System\Obsoletions.cs" />
<Compile Include="$(CommonPath)System\Collections\Generic\ArrayBuilder.cs"
Link="Common\System\Collections\Generic\ArrayBuilder.cs" />
<Compile Include="System\Dynamic\Utils\CacheDict.cs" />
/// Creates PDB symbol generator.
/// </summary>
/// <returns>PDB symbol generator.</returns>
+ [Obsolete(Obsoletions.CreatePdbGeneratorMessage, DiagnosticId = Obsoletions.CreatePdbGeneratorDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static DebugInfoGenerator CreatePdbGenerator()
{
// Creating PDBs is not supported in .NET Core
public static System.Net.ICredentialPolicy? CredentialPolicy { get { throw null; } set { } }
public static System.Collections.Specialized.StringDictionary CustomTargetNameDictionary { get { throw null; } }
public static System.Collections.IEnumerator RegisteredModules { get { throw null; } }
+ [System.ObsoleteAttribute("The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0009", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.Authorization? Authenticate(string challenge, System.Net.WebRequest request, System.Net.ICredentials credentials) { throw null; }
+ [System.ObsoleteAttribute("The AuthenticationManager Authenticate and PreAuthenticate methods are not supported and throw PlatformNotSupportedException.", DiagnosticId = "SYSLIB0009", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Net.Authorization? PreAuthenticate(System.Net.WebRequest request, System.Net.ICredentials credentials) { throw null; }
public static void Register(System.Net.IAuthenticationModule authenticationModule) { }
public static void Unregister(System.Net.IAuthenticationModule authenticationModule) { }
<Compile Include="System\Net\Cache\HttpRequestCacheLevel.cs" />
<Compile Include="System\Net\Cache\HttpRequestCachePolicy.cs" />
<Compile Include="System\Net\NetEventSource.Requests.cs" />
+ <Compile Include="$(CommonPath)System\Obsoletions.cs"
+ Link="Common\System\Obsoletions.cs" />
<Compile Include="$(CommonPath)System\Net\Http\HttpHandlerDefaults.cs"
Link="Common\System\Net\Http\HttpHandlerDefaults.cs" />
<Compile Include="$(CommonPath)System\Net\InternalException.cs"
public static StringDictionary CustomTargetNameDictionary { get; } = new StringDictionary();
+ [Obsolete(Obsoletions.AuthenticationManagerMessage, DiagnosticId = Obsoletions.AuthenticationManagerDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Authorization? Authenticate(string challenge, WebRequest request, ICredentials credentials) =>
throw new PlatformNotSupportedException();
+ [Obsolete(Obsoletions.AuthenticationManagerMessage, DiagnosticId = Obsoletions.AuthenticationManagerDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static Authorization? PreAuthenticate(WebRequest request, ICredentials credentials) =>
throw new PlatformNotSupportedException();
[Fact]
public void Authenticate_NotSupported()
{
+#pragma warning disable SYSLIB0009 // The methods are obsolete
Assert.Throws<PlatformNotSupportedException>(() => AuthenticationManager.Authenticate(null, null, null));
Assert.Throws<PlatformNotSupportedException>(() => AuthenticationManager.PreAuthenticate(null, null));
+#pragma warning restore SYSLIB0009
}
[Fact]
<Compile Include="$(MSBuildThisFileDirectory)System\Object.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\ObjectDisposedException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\ObsoleteAttribute.cs" />
- <Compile Include="$(MSBuildThisFileDirectory)System\Obsoletions.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\OperatingSystem.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\OperationCanceledException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\OutOfMemoryException.cs" />
<Compile Include="$(CommonPath)System\HResults.cs">
<Link>Common\System\HResults.cs</Link>
</Compile>
+ <Compile Include="$(CommonPath)System\Obsoletions.cs">
+ <Link>Common\System\Obsoletions.cs</Link>
+ </Compile>
<Compile Include="$(CommonPath)System\SR.cs">
<Link>Common\System\SR.cs</Link>
</Compile>
public AppDomainSetup SetupInformation => new AppDomainSetup();
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public PermissionSet PermissionSet => new PermissionSet(PermissionState.Unrestricted);
public event UnhandledExceptionEventHandler? UnhandledException
descriptors[1].SetMetadata(pMetadata1, nameInfo.nameMetadata.Length, 1);
descriptors[2].SetMetadata(pMetadata2, eventTypes.typeMetadata.Length, 1);
-#if (!ES_BUILD_PCL)
+#if (!ES_BUILD_PCL && !NETCOREAPP)
System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
#endif
try
descriptors[2].SetMetadata(pMetadata2, eventTypes.typeMetadata.Length, 1);
#endif // FEATURE_MANAGED_ETW
-#if (!ES_BUILD_PCL)
+#if (!ES_BUILD_PCL && !NETCOREAPP)
System.Runtime.CompilerServices.RuntimeHelpers.PrepareConstrainedRegions();
#endif
EventOpcode opcode = (EventOpcode)descriptor.Opcode;
DispatchToAllListeners(-1, eventCallbackArgs);
}
-#if (!ES_BUILD_PCL)
+#if (!ES_BUILD_PCL && !NETCOREAPP)
[System.Runtime.ConstrainedExecution.ReliabilityContract(
System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState,
System.Runtime.ConstrainedExecution.Cer.Success)]
{
}
+ [Obsolete(Obsoletions.RemotingApisMessage, DiagnosticId = Obsoletions.RemotingApisDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public object GetLifetimeService()
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Remoting);
}
+ [Obsolete(Obsoletions.RemotingApisMessage, DiagnosticId = Obsoletions.RemotingApisDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public virtual object InitializeLifetimeService()
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_Remoting);
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System
-{
- internal static class Obsoletions
- {
- internal const string SharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}";
-
- internal const string SystemTextEncodingUTF7Message = "The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.";
- internal const string SystemTextEncodingUTF7DiagId = "MSLIB0001";
- }
-}
/*
Returns true if the assembly was loaded from the global assembly cache.
*/
+ [Obsolete(Obsoletions.GlobalAssemblyCacheMessage, DiagnosticId = Obsoletions.GlobalAssemblyCacheDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public virtual bool GlobalAssemblyCache => throw NotImplemented.ByDesign;
public virtual long HostContext => throw NotImplemented.ByDesign;
return GetUninitializedObjectInternal(type);
}
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static void ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, object? userData)
{
if (code == null)
}
}
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static void PrepareContractedDelegate(Delegate d)
{
}
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static void ProbeForSufficientStack()
{
}
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static void PrepareConstrainedRegions()
{
}
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static void PrepareConstrainedRegionsNoOP()
{
}
namespace System.Runtime.ConstrainedExecution
{
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public enum Cer : int
{
None = 0,
namespace System.Runtime.ConstrainedExecution
{
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public enum Consistency : int
{
MayCorruptProcess = 0,
namespace System.Runtime.ConstrainedExecution
{
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage(AttributeTargets.Constructor | AttributeTargets.Method, Inherited = false)]
public sealed class PrePrepareMethodAttribute : Attribute
{
namespace System.Runtime.ConstrainedExecution
{
+ [Obsolete(Obsoletions.ConstrainedExecutionRegionMessage, DiagnosticId = Obsoletions.ConstrainedExecutionRegionDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)]
public sealed class ReliabilityContractAttribute : Attribute
{
namespace System.Security
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public partial interface IPermission : ISecurityEncodable
{
IPermission Copy();
namespace System.Security
{
+#if SYSTEM_PRIVATE_CORELIB
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public partial interface IStackWalk
{
void Assert();
namespace System.Security
{
+#if SYSTEM_PRIVATE_CORELIB
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public partial class PermissionSet : ICollection, IEnumerable, IDeserializationCallback, ISecurityEncodable, IStackWalk
{
public PermissionSet(PermissionState state) { }
namespace System.Security.Permissions
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public abstract partial class CodeAccessSecurityAttribute : SecurityAttribute
{
namespace System.Security.Permissions
{
+#if SYSTEM_PRIVATE_CORELIB
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum PermissionState
{
None = 0,
namespace System.Security.Permissions
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public enum SecurityAction
{
Assert = 3,
Demand = 2,
- [Obsolete("Deny is obsolete and will be removed in a future release of the .NET Framework. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
Deny = 4,
InheritanceDemand = 7,
LinkDemand = 6,
PermitOnly = 5,
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestMinimum = 8,
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestOptional = 9,
- [Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestRefuse = 10,
}
}
namespace System.Security.Permissions
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public abstract partial class SecurityAttribute : Attribute
{
namespace System.Security.Permissions
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class SecurityPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
[Flags]
public enum SecurityPermissionFlag
{
if (LocalAppContextSwitches.EnableUnsafeUTF7Encoding)
{
-#pragma warning disable MSLIB0001 // Encoding.UTF7 property getter is obsolete
+#pragma warning disable SYSLIB0001 // Encoding.UTF7 property getter is obsolete
return UTF7;
-#pragma warning restore MSLIB0001
+#pragma warning restore SYSLIB0001
}
else
{
private const string optionalChars =
"!\"#$%&*;<=>@[]^_`{|}";
-#pragma warning disable MSLIB0001
+#pragma warning disable SYSLIB0001
// Used by Encoding.UTF7 for lazy initialization
// The initialization code will not be run until a static member of the class is referenced
internal static readonly UTF7Encoding s_default = new UTF7Encoding();
-#pragma warning restore MSLIB0001
+#pragma warning restore SYSLIB0001
// The set of base 64 characters.
private byte[] _base64Bytes;
}
}
+ [Obsolete(Obsoletions.ThreadAbortMessage, DiagnosticId = Obsoletions.ThreadAbortDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public void Abort()
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort);
}
+ [Obsolete(Obsoletions.ThreadAbortMessage, DiagnosticId = Obsoletions.ThreadAbortDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public void Abort(object? stateInfo)
{
throw new PlatformNotSupportedException(SR.PlatformNotSupported_ThreadAbort);
continue;
}
- if (!a.GlobalAssemblyCache)
- {
- assemblies[name] = a;
- }
+ assemblies[name] = a;
}
}
public override string? CodeBase { get { throw null; } }
public override System.Reflection.MethodInfo? EntryPoint { get { throw null; } }
public override string? FullName { get { throw null; } }
+ [Obsolete("The Global Assembly Cache is not supported.", DiagnosticId = "SYSLIB0005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public override bool GlobalAssemblyCache { get { throw null; } }
public override long HostContext { get { throw null; } }
public override string ImageRuntimeVersion { get { throw null; } }
<ExcludeCurrentNetCoreAppFromPackage>true</ExcludeCurrentNetCoreAppFromPackage>
<Nullable>enable</Nullable>
</PropertyGroup>
- <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
+ <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
+ <!-- Constrained Execution Regions only apply to netstandard2.0 and net4* -->
+ <DefineConstants Condition="$(TargetFramework.StartsWith('netstandard2.0')) or $(TargetFramework.StartsWith('net4'))">$(DefineConstants);FEATURE_CER</DefineConstants>
<PackageTargetFramework Condition="'$(TargetFramework)' == 'netstandard1.1'">netstandard1.1;portable-net45+win8</PackageTargetFramework>
</PropertyGroup>
<ItemGroup>
public DisposableData(IDisposable accessor, SafeBuffer safeBuffer, long offset)
{
+#if FEATURE_CER
// Make sure the current thread isn't aborted in between acquiring the pointer and assigning the fields.
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
byte* basePointer = null;
safeBuffer.AcquirePointer(ref basePointer);
protected override void Release()
{
+#if FEATURE_CER
// Make sure the current thread isn't aborted in between zeroing the references and releasing/disposing.
// Safe buffer only frees the underlying resource if its ref count drops to zero, so we have to make sure it does.
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
Interlocked.Exchange(ref _safeBuffer, null)?.ReleasePointer();
Interlocked.Exchange(ref _accessor, null)?.Dispose();
public DisposableData(int size)
{
+#if FEATURE_CER
// make sure the current thread isn't aborted in between allocating and storing the pointer
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
_pointer = Marshal.AllocHGlobal(size);
}
protected override void Release()
{
+#if FEATURE_CER
// make sure the current thread isn't aborted in between zeroing the pointer and freeing the memory
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
IntPtr ptr = Interlocked.Exchange(ref _pointer, IntPtr.Zero);
if (ptr != IntPtr.Zero)
public PinnedObject(object obj)
{
+#if FEATURE_CER
// Make sure the current thread isn't aborted in between allocating the handle and storing it.
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
_handle = GCHandle.Alloc(obj, GCHandleType.Pinned);
_isValid = 1;
protected override void Release()
{
+#if FEATURE_CER
// Make sure the current thread isn't aborted in between zeroing the handle and freeing it.
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
#endif
try
protected override void Release()
{
+#if FEATURE_CER
// Make sure the current thread isn't aborted in the middle of the operation.
-#if !NETSTANDARD1_1
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
var blobs = Interlocked.Exchange(ref _blobs, null);
var blobs = GetBlobs();
MemoryBlock result;
-#if !NETSTANDARD1_1
+#if FEATURE_CER
RuntimeHelpers.PrepareConstrainedRegions();
-#endif
try
- {
- }
+ { /* intentionally left blank */ }
finally
+#endif
{
var blob = new PinnedBlob(GCHandle.Alloc(value, GCHandleType.Pinned), value.Length);
blobs.Add(rawHandle, blob);
<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" />
// Miscellaneous properties
public sealed override bool ReflectionOnly => true;
+#if NET50_OBSOLETIONS
+ [Obsolete("The Global Assembly Cache is not supported.", DiagnosticId = "SYSLIB0005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public sealed override bool GlobalAssemblyCache => false;
public sealed override long HostContext => 0;
public abstract override string ImageRuntimeVersion { get; }
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent);$(NetFrameworkCurrent)</TargetFrameworks>
+ <!-- The GAC is obsolete, but there are unit tests still referencing it -->
+ <NoWarn>$(NoWarn);SYSLIB0005</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(CommonTestPath)System\IO\TempDirectory.cs"
Assert.Equal(typeof(G<G<int>>), t);
}
+#pragma warning disable SYSLIB0005 // Obsolete: GAC
[Fact]
public void GlobalAssemblyCache()
{
Assert.False(typeof(AssemblyTests).Assembly.GlobalAssemblyCache);
}
+#pragma warning restore SYSLIB0005 // Obsolete: GAC
[Fact]
public void HostContext()
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
+#pragma warning disable SYSLIB0003 // CAS Obsoletions
+
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomain))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomainSetup))]
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.AppDomainUnloadedException))]
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
public static void GetPermissionSet()
{
+#pragma warning disable SYSLIB0003 // Obsolete: CAS
RemoteExecutor.Invoke(() => {
Assert.Equal(new PermissionSet(PermissionState.Unrestricted), AppDomain.CurrentDomain.PermissionSet);
}).Dispose();
+#pragma warning restore SYSLIB0003 // Obsolete: CAS
}
[Theory]
public static void MarshalByRefObjectTests()
{
var obj = new MarshalByRefObjectTest();
+#pragma warning disable SYSLIB0010 // Obsolete: Remoting APIs
Assert.Throws<PlatformNotSupportedException>(() => obj.GetLifetimeService());
Assert.Throws<PlatformNotSupportedException>(() => obj.InitializeLifetimeService());
+#pragma warning restore SYSLIB0010 // Obsolete: Remoting APIs
var clone = obj.MemberwiseClone(false);
Assert.NotNull(clone);
public abstract System.Runtime.Serialization.SerializationBinder? Binder { get; set; }
public abstract System.Runtime.Serialization.StreamingContext Context { get; set; }
public abstract System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get; set; }
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public abstract object Deserialize(System.IO.Stream serializationStream);
protected virtual object? GetNext(out long objID) { throw null; }
protected virtual long Schedule(object? obj) { throw null; }
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public abstract void Serialize(System.IO.Stream serializationStream, object graph);
protected abstract void WriteArray(object obj, string name, System.Type memberType);
protected abstract void WriteBoolean(bool val, string name);
System.Runtime.Serialization.SerializationBinder? Binder { get; set; }
System.Runtime.Serialization.StreamingContext Context { get; set; }
System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get; set; }
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
object Deserialize(System.IO.Stream serializationStream);
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
void Serialize(System.IO.Stream serializationStream, object graph);
}
public partial interface ISerializationSurrogate
public System.Runtime.Serialization.Formatters.TypeFilterLevel FilterLevel { get { throw null; } set { } }
public System.Runtime.Serialization.ISurrogateSelector? SurrogateSelector { get { throw null; } set { } }
public System.Runtime.Serialization.Formatters.FormatterTypeStyle TypeFormat { get { throw null; } set { } }
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public object Deserialize(System.IO.Stream serializationStream) { throw null; }
- [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "MSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId = "SYSLIB0011", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public void Serialize(System.IO.Stream serializationStream, object graph) { }
}
}
<Compile Include="System\Runtime\Serialization\MemberHolder.cs" />
<Compile Include="System\Runtime\Serialization\ObjectIDGenerator.cs" />
<Compile Include="System\Runtime\Serialization\ObjectManager.cs" />
- <Compile Include="System\Runtime\Serialization\Obsoletions.cs" />
<Compile Include="System\Runtime\Serialization\SerializationBinder.cs" />
<Compile Include="System\Runtime\Serialization\SerializationEventsCache.cs" />
<Compile Include="System\Runtime\Serialization\SerializationFieldInfo.cs" />
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryObjectWriter.cs" />
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryParser.cs" />
<Compile Include="System\Runtime\Serialization\Formatters\Binary\BinaryUtilClasses.cs" />
+ <Compile Include="$(CommonPath)System\Obsoletions.cs"
+ Link="Common\System\Obsoletions.cs" />
<Compile Include="$(CoreLibSharedDir)System\Collections\HashHelpers.cs"
Link="Common\System\Collections\HashHelpers.cs" />
</ItemGroup>
m_idGenerator = new ObjectIDGenerator();
}
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public abstract object Deserialize(Stream serializationStream);
protected virtual object? GetNext(out long objID)
return id;
}
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public abstract void Serialize(Stream serializationStream, object graph);
protected abstract void WriteArray(object obj, string name, Type memberType);
{
public sealed partial class BinaryFormatter : IFormatter
{
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public object Deserialize(Stream serializationStream)
{
// don't refactor the 'throw' into a helper method; linker will have difficulty trimming
}
}
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public void Serialize(Stream serializationStream, object graph)
{
// don't refactor the 'throw' into a helper method; linker will have difficulty trimming
{
public sealed partial class BinaryFormatter : IFormatter
{
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public object Deserialize(Stream serializationStream)
=> throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationDisallowed);
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public void Serialize(Stream serializationStream, object graph)
=> throw new PlatformNotSupportedException(SR.BinaryFormatter_SerializationDisallowed);
}
{
public interface IFormatter
{
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
object Deserialize(Stream serializationStream);
- [Obsolete(Obsoletions.InsecureSerializationMessage, DiagnosticId = Obsoletions.InsecureSerializationDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+ [Obsolete(Obsoletions.BinaryFormatterMessage, DiagnosticId = Obsoletions.BinaryFormatterDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
void Serialize(Stream serializationStream, object graph);
ISurrogateSelector? SurrogateSelector { get; set; }
SerializationBinder? Binder { get; set; }
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-
-namespace System.Runtime.Serialization
-{
- internal static class Obsoletions
- {
- internal const string SharedUrlFormat = "https://aka.ms/dotnet-warnings/{0}";
-
- internal const string InsecureSerializationMessage = "BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.";
- internal const string InsecureSerializationDiagId = "MSLIB0003";
- }
-}
var formatException = new FormatException("message", exception);
yield return new object[] { PopulateException(formatException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAABZTeXN0ZW0uRm9ybWF0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAFlN5c3RlbS5Gb3JtYXRFeGNlcHRpb24GAwAAAAdtZXNzYWdlCQQAAAAJBQAAAAYGAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBwAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYIAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYJAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQEAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkKAAAAAgAAAAIAAAAEBQAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYLAAAAEFN5c3RlbS5FeGNlcHRpb24JAwAAAAkNAAAACQ4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAABZTeXN0ZW0uRm9ybWF0RXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYCAAAAFlN5c3RlbS5Gb3JtYXRFeGNlcHRpb24GAwAAAAdtZXNzYWdlCQQAAAAJBQAAAAYGAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBwAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYIAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYJAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQEAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkKAAAAAgAAAAIAAAAEBQAAABBTeXN0ZW0uRXhjZXB0aW9uDAAAAAlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMBAQMDAQEBAAEAAQcpU3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwQU3lzdGVtLkV4Y2VwdGlvbggIAgYLAAAAEFN5c3RlbS5FeGNlcHRpb24JAwAAAAkNAAAACQ4AAAAJBgAAAAkHAAAACQgAAAAAAAAACugDAAAJCQAAAAoECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGEwAAAAZzZWNyZXQIAQEJFAAAAAENAAAABAAAAAkVAAAAAgAAAAIAAAABDgAAAAUAAAAJCwAAAAYXAAAAF0lubmVyIGV4Y2VwdGlvbiBtZXNzYWdlCgoKCgoAAAAACgAVE4AKCgEUAAAACgAAAAgIAQAAAAYYAAAAA29uZQoBFQAAAAoAAAAJEwAAAAgBAQkaAAAAARoAAAAKAAAACAgBAAAACRgAAAAKCw==", TargetFrameworkMoniker.netfx461) } };
+#pragma warning disable SYSLIB0003 // Obsolete: CAS
var hostProtectionException = new HostProtectionException("message", exception);
yield return new object[] { PopulateException(hostProtectionException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACdTeXN0ZW0uU2VjdXJpdHkuSG9zdFByb3RlY3Rpb25FeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cxJQcm90ZWN0ZWRSZXNvdXJjZXMRRGVtYW5kZWRSZXNvdXJjZXMBAQMDAQEBAAEAAQcDAylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlBgIAAAAnU3lzdGVtLlNlY3VyaXR5Lkhvc3RQcm90ZWN0aW9uRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoE9v///zJTeXN0ZW0uU2VjdXJpdHkuUGVybWlzc2lvbnMuSG9zdFByb3RlY3Rpb25SZXNvdXJjZQEAAAAHdmFsdWVfXwAIAAAAAAH1////9v///wAAAAAEBAAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAUAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQMAAAAJDwAAAAkQAAAACQYAAAAJBwAAAAkIAAAAAAAAAAroAwAACQkAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAQAAAAJFwAAAAIAAAACAAAAARAAAAAFAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACdTeXN0ZW0uU2VjdXJpdHkuSG9zdFByb3RlY3Rpb25FeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cxJQcm90ZWN0ZWRSZXNvdXJjZXMRRGVtYW5kZWRSZXNvdXJjZXMBAQMDAQEBAAEAAQcDAylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlBgIAAAAnU3lzdGVtLlNlY3VyaXR5Lkhvc3RQcm90ZWN0aW9uRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACQUAAAAGBgAAABlodHRwOi8vbXNkbi5taWNyb3NvZnQuY29tBgcAAAAUU3RhY2tUcmFjZSBzdHJpbmcuLi4GCAAAABtSZW1vdGUgU3RhY2tUcmFjZSBzdHJpbmcuLi4AAAAACugDAAAGCQAAABdFeGNlcHRpb25fQ2xhc3NfU2FtcGxlcwoE9v///zJTeXN0ZW0uU2VjdXJpdHkuUGVybWlzc2lvbnMuSG9zdFByb3RlY3Rpb25SZXNvdXJjZQEAAAAHdmFsdWVfXwAIAAAAAAH1////9v///wAAAAAEBAAAAClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbAMAAAAEaGVhZAd2ZXJzaW9uBWNvdW50AwAAOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlCAgJDAAAAAIAAAACAAAABAUAAAAQU3lzdGVtLkV4Y2VwdGlvbgwAAAAJQ2xhc3NOYW1lB01lc3NhZ2UERGF0YQ5Jbm5lckV4Y2VwdGlvbgdIZWxwVVJMEFN0YWNrVHJhY2VTdHJpbmcWUmVtb3RlU3RhY2tUcmFjZVN0cmluZxBSZW1vdGVTdGFja0luZGV4D0V4Y2VwdGlvbk1ldGhvZAdIUmVzdWx0BlNvdXJjZQ1XYXRzb25CdWNrZXRzAQEDAwEBAQABAAEHKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIGDQAAABBTeXN0ZW0uRXhjZXB0aW9uCQMAAAAJDwAAAAkQAAAACQYAAAAJBwAAAAkIAAAAAAAAAAroAwAACQkAAAAKBAwAAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUDAAAAA2tleQV2YWx1ZQRuZXh0AgIDOFN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsK0RpY3Rpb25hcnlOb2RlBhUAAAAGc2VjcmV0CAEBCRYAAAABDwAAAAQAAAAJFwAAAAIAAAACAAAAARAAAAAFAAAACQ0AAAAGGQAAABdJbm5lciBleGNlcHRpb24gbWVzc2FnZQoKCgoKAAAAAAoAFROACgoBFgAAAAwAAAAICAEAAAAGGgAAAANvbmUKARcAAAAMAAAACRUAAAAIAQEJHAAAAAEcAAAADAAAAAgIAQAAAAkaAAAACgs=", TargetFrameworkMoniker.netfx461) } };
var hostProtectionException2 = new HostProtectionException("message", Security.Permissions.HostProtectionResource.All, Security.Permissions.HostProtectionResource.SharedState);
yield return new object[] { PopulateException(hostProtectionException2, false), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACdTeXN0ZW0uU2VjdXJpdHkuSG9zdFByb3RlY3Rpb25FeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cxJQcm90ZWN0ZWRSZXNvdXJjZXMRRGVtYW5kZWRSZXNvdXJjZXMBAQMDAQEBAAEAAQcDAylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlBgIAAAAnU3lzdGVtLlNlY3VyaXR5Lkhvc3RQcm90ZWN0aW9uRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACgYFAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBgAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYHAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAKQBYTgAYIAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgT3////MlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlAQAAAAd2YWx1ZV9fAAj/AQAAAfb////3////AgAAAAQEAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGDAAAAAZzZWNyZXQIAQEJDQAAAAENAAAACwAAAAgIAQAAAAYOAAAAA29uZQoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAEAQAAACdTeXN0ZW0uU2VjdXJpdHkuSG9zdFByb3RlY3Rpb25FeGNlcHRpb24OAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cxJQcm90ZWN0ZWRSZXNvdXJjZXMRRGVtYW5kZWRSZXNvdXJjZXMBAQMDAQEBAAEAAQcDAylTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlMlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlBgIAAAAnU3lzdGVtLlNlY3VyaXR5Lkhvc3RQcm90ZWN0aW9uRXhjZXB0aW9uBgMAAAAHbWVzc2FnZQkEAAAACgYFAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBgAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYHAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAKQBYTgAYIAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgT3////MlN5c3RlbS5TZWN1cml0eS5QZXJtaXNzaW9ucy5Ib3N0UHJvdGVjdGlvblJlc291cmNlAQAAAAd2YWx1ZV9fAAj/AQAAAfb////3////AgAAAAQEAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkLAAAAAgAAAAIAAAAECwAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGDAAAAAZzZWNyZXQIAQEJDQAAAAENAAAACwAAAAgIAQAAAAYOAAAAA29uZQoL", TargetFrameworkMoniker.netfx461) } };
+#pragma warning restore SYSLIB0003 // Obsolete: CAS
var httpListenerException = new HttpListenerException(404, "not found");
yield return new object[] { PopulateException(httpListenerException), new TypeSerializableValue[] { new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAgU3lzdGVtLk5ldC5IdHRwTGlzdGVuZXJFeGNlcHRpb24NAAAACUNsYXNzTmFtZQdNZXNzYWdlBERhdGEOSW5uZXJFeGNlcHRpb24HSGVscFVSTBBTdGFja1RyYWNlU3RyaW5nFlJlbW90ZVN0YWNrVHJhY2VTdHJpbmcQUmVtb3RlU3RhY2tJbmRleA9FeGNlcHRpb25NZXRob2QHSFJlc3VsdAZTb3VyY2UNV2F0c29uQnVja2V0cw9OYXRpdmVFcnJvckNvZGUBAQMDAQEBAAEAAQcAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsEFN5c3RlbS5FeGNlcHRpb24ICAIIAgAAAAYDAAAAIFN5c3RlbS5OZXQuSHR0cExpc3RlbmVyRXhjZXB0aW9uBgQAAAAJbm90IGZvdW5kCQUAAAAKBgYAAAAZaHR0cDovL21zZG4ubWljcm9zb2Z0LmNvbQYHAAAAFFN0YWNrVHJhY2Ugc3RyaW5nLi4uBggAAAAbUmVtb3RlIFN0YWNrVHJhY2Ugc3RyaW5nLi4uAAAAAAroAwAABgkAAAAXRXhjZXB0aW9uX0NsYXNzX1NhbXBsZXMKlAEAAAQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkKAAAAAgAAAAIAAAAECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGCwAAAAZzZWNyZXQIAQEJDAAAAAEMAAAACgAAAAgIAQAAAAYNAAAAA29uZQoL", TargetFrameworkMoniker.netcoreapp20), new TypeSerializableValue("AAEAAAD/////AQAAAAAAAAAMAgAAAElTeXN0ZW0sIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAgU3lzdGVtLk5ldC5IdHRwTGlzdGVuZXJFeGNlcHRpb24NAAAAD05hdGl2ZUVycm9yQ29kZQlDbGFzc05hbWUHTWVzc2FnZQREYXRhDklubmVyRXhjZXB0aW9uB0hlbHBVUkwQU3RhY2tUcmFjZVN0cmluZxZSZW1vdGVTdGFja1RyYWNlU3RyaW5nEFJlbW90ZVN0YWNrSW5kZXgPRXhjZXB0aW9uTWV0aG9kB0hSZXN1bHQGU291cmNlDVdhdHNvbkJ1Y2tldHMAAQEDAwEBAQABAAEHCClTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbBBTeXN0ZW0uRXhjZXB0aW9uCAgCAgAAAJQBAAAGAwAAACBTeXN0ZW0uTmV0Lkh0dHBMaXN0ZW5lckV4Y2VwdGlvbgYEAAAACW5vdCBmb3VuZAkFAAAACgYGAAAAGWh0dHA6Ly9tc2RuLm1pY3Jvc29mdC5jb20GBwAAABRTdGFja1RyYWNlIHN0cmluZy4uLgYIAAAAG1JlbW90ZSBTdGFja1RyYWNlIHN0cmluZy4uLgAAAAAK6AMAAAYJAAAAF0V4Y2VwdGlvbl9DbGFzc19TYW1wbGVzCgQFAAAAKVN5c3RlbS5Db2xsZWN0aW9ucy5MaXN0RGljdGlvbmFyeUludGVybmFsAwAAAARoZWFkB3ZlcnNpb24FY291bnQDAAA4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUICAkKAAAAAgAAAAIAAAAECgAAADhTeXN0ZW0uQ29sbGVjdGlvbnMuTGlzdERpY3Rpb25hcnlJbnRlcm5hbCtEaWN0aW9uYXJ5Tm9kZQMAAAADa2V5BXZhbHVlBG5leHQCAgM4U3lzdGVtLkNvbGxlY3Rpb25zLkxpc3REaWN0aW9uYXJ5SW50ZXJuYWwrRGljdGlvbmFyeU5vZGUGCwAAAAZzZWNyZXQIAQEJDAAAAAEMAAAACgAAAAgIAQAAAAYNAAAAA29uZQoL", TargetFrameworkMoniker.netfx461) } };
public static long MonitoringSurvivedProcessMemorySize { get { throw null; } }
public long MonitoringTotalAllocatedMemorySize { get { throw null; } }
public System.TimeSpan MonitoringTotalProcessorTime { get { throw null; } }
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public System.Security.PermissionSet PermissionSet { get { throw null; } }
public string? RelativeSearchPath { get { throw null; } }
public System.AppDomainSetup SetupInformation { get { throw null; } }
public abstract partial class MarshalByRefObject
{
protected MarshalByRefObject() { }
+ [System.ObsoleteAttribute("This Remoting API is not supported and throws PlatformNotSupportedException.", DiagnosticId = "SYSLIB0010", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public object GetLifetimeService() { throw null; }
+ [System.ObsoleteAttribute("This Remoting API is not supported and throws PlatformNotSupportedException.", DiagnosticId = "SYSLIB0010", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual object InitializeLifetimeService() { throw null; }
protected System.MarshalByRefObject MemberwiseClone(bool cloneIdentity) { throw null; }
}
public virtual string EscapedCodeBase { get { throw null; } }
public virtual System.Collections.Generic.IEnumerable<System.Type> ExportedTypes { [System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute("Types might be removed")] get { throw null; } }
public virtual string? FullName { get { throw null; } }
+ [System.ObsoleteAttribute("The Global Assembly Cache is not supported.", DiagnosticId = "SYSLIB0005", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public virtual bool GlobalAssemblyCache { get { throw null; } }
public virtual long HostContext { get { throw null; } }
public virtual string ImageRuntimeVersion { get { throw null; } }
public static System.IntPtr AllocateTypeAssociatedMemory(System.Type type, int size) { throw null; }
public static void EnsureSufficientExecutionStack() { }
public static new bool Equals(object? o1, object? o2) { throw null; }
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static void ExecuteCodeWithGuaranteedCleanup(System.Runtime.CompilerServices.RuntimeHelpers.TryCode code, System.Runtime.CompilerServices.RuntimeHelpers.CleanupCode backoutCode, object? userData) { }
public static int GetHashCode(object? o) { throw null; }
[return: System.Diagnostics.CodeAnalysis.NotNullIfNotNullAttribute("obj")]
public static object GetUninitializedObject([System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute(System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.NonPublicConstructors | System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes.PublicConstructors)] System.Type type) { throw null; }
public static void InitializeArray(System.Array array, System.RuntimeFieldHandle fldHandle) { }
public static bool IsReferenceOrContainsReferences<T>() { throw null; }
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static void PrepareConstrainedRegions() { }
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static void PrepareConstrainedRegionsNoOP() { }
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static void PrepareContractedDelegate(System.Delegate d) { }
public static void PrepareDelegate(System.Delegate d) { }
public static void PrepareMethod(System.RuntimeMethodHandle method) { }
public static void PrepareMethod(System.RuntimeMethodHandle method, System.RuntimeTypeHandle[]? instantiation) { }
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static void ProbeForSufficientStack() { }
public static void RunClassConstructor(System.RuntimeTypeHandle type) { }
public static void RunModuleConstructor(System.ModuleHandle module) { }
}
namespace System.Runtime.ConstrainedExecution
{
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public enum Cer
{
None = 0,
MayFail = 1,
Success = 2,
}
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public enum Consistency
{
MayCorruptProcess = 0,
protected CriticalFinalizerObject() { }
~CriticalFinalizerObject() { }
}
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.AttributeUsageAttribute(System.AttributeTargets.Constructor | System.AttributeTargets.Method, Inherited=false)]
public sealed partial class PrePrepareMethodAttribute : System.Attribute
{
public PrePrepareMethodAttribute() { }
}
+ [System.ObsoleteAttribute("The Constrained Execution Region (CER) feature is not supported.", DiagnosticId = "SYSLIB0004", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Interface | System.AttributeTargets.Method | System.AttributeTargets.Struct, Inherited=false)]
public sealed partial class ReliabilityContractAttribute : System.Attribute
{
public AllowPartiallyTrustedCallersAttribute() { }
public System.Security.PartialTrustVisibilityLevel PartialTrustVisibilityLevel { get { throw null; } set { } }
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public partial interface IPermission : System.Security.ISecurityEncodable
{
System.Security.IPermission Copy();
void FromXml(System.Security.SecurityElement e);
System.Security.SecurityElement? ToXml();
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public partial interface IStackWalk
{
void Assert();
VisibleToAllHosts = 0,
NotVisibleByDefault = 1,
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public partial class PermissionSet : System.Collections.ICollection, System.Collections.IEnumerable, System.Runtime.Serialization.IDeserializationCallback, System.Security.ISecurityEncodable, System.Security.IStackWalk
{
public PermissionSet(System.Security.Permissions.PermissionState state) { }
}
namespace System.Security.Permissions
{
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public abstract partial class CodeAccessSecurityAttribute : System.Security.Permissions.SecurityAttribute
{
protected CodeAccessSecurityAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public enum PermissionState
{
None = 0,
Unrestricted = 1,
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public enum SecurityAction
{
Demand = 2,
Assert = 3,
- [System.ObsoleteAttribute("Deny is obsolete and will be removed in a future release of the .NET Framework. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
Deny = 4,
PermitOnly = 5,
LinkDemand = 6,
InheritanceDemand = 7,
- [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestMinimum = 8,
- [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestOptional = 9,
- [System.ObsoleteAttribute("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
RequestRefuse = 10,
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public abstract partial class SecurityAttribute : System.Attribute
{
public bool Unrestricted { get { throw null; } set { } }
public abstract System.Security.IPermission? CreatePermission();
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class SecurityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool UnmanagedCode { get { throw null; } set { } }
public override System.Security.IPermission? CreatePermission() { throw null; }
}
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
[System.FlagsAttribute]
public enum SecurityPermissionFlag
{
public virtual System.ReadOnlySpan<byte> Preamble { get { throw null; } }
public static System.Text.Encoding Unicode { get { throw null; } }
public static System.Text.Encoding UTF32 { get { throw null; } }
- [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "MSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "SYSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Text.Encoding UTF7 { get { throw null; } }
public static System.Text.Encoding UTF8 { get { throw null; } }
public virtual string WebName { get { throw null; } }
namespace System.Runtime.ConstrainedExecution.Tests
{
+#pragma warning disable SYSLIB0004 // Obsolete: CER
public class PrePrepareMethodAttributeTests
{
public sealed class ConstrainedType
typeof(ConstrainedType).GetConstructors()[0].GetCustomAttribute<PrePrepareMethodAttribute>());
}
}
+#pragma warning restore SYSLIB0004 // Obsolete: CER
}
{
public class EncodingTests
{
-#pragma warning disable MSLIB0001 // UTF7Encoding is obsolete
+#pragma warning disable SYSLIB0001 // UTF7Encoding is obsolete
private static UTF7Encoding _utf7Encoding = new UTF7Encoding();
-#pragma warning restore MSLIB0001
+#pragma warning restore SYSLIB0001
public static IEnumerable<object[]> DisallowedEncodings()
{
public virtual System.Security.Cryptography.KeySizes[] LegalKeySizes { get { throw null; } }
public virtual string? SignatureAlgorithm { get { throw null; } }
public void Clear() { }
+ [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.AsymmetricAlgorithm Create() { throw null; }
public static System.Security.Cryptography.AsymmetricAlgorithm? Create(string algName) { throw null; }
public void Dispose() { }
public byte[] ComputeHash(byte[] buffer, int offset, int count) { throw null; }
public byte[] ComputeHash(System.IO.Stream inputStream) { throw null; }
public System.Threading.Tasks.Task<byte[]> ComputeHashAsync(System.IO.Stream inputStream, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
+ [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.HashAlgorithm Create() { throw null; }
public static System.Security.Cryptography.HashAlgorithm? Create(string hashName) { throw null; }
public void Dispose() { }
protected int BlockSizeValue { get { throw null; } set { } }
public string HashName { get { throw null; } set { } }
public override byte[] Key { get { throw null; } set { } }
+ [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static new System.Security.Cryptography.HMAC Create() { throw null; }
public static new System.Security.Cryptography.HMAC? Create(string algorithmName) { throw null; }
protected override void Dispose(bool disposing) { }
protected byte[] KeyValue;
protected KeyedHashAlgorithm() { }
public virtual byte[] Key { get { throw null; } set { } }
+ [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static new System.Security.Cryptography.KeyedHashAlgorithm Create() { throw null; }
public static new System.Security.Cryptography.KeyedHashAlgorithm? Create(string algName) { throw null; }
protected override void Dispose(bool disposing) { }
public virtual System.Security.Cryptography.CipherMode Mode { get { throw null; } set { } }
public virtual System.Security.Cryptography.PaddingMode Padding { get { throw null; } set { } }
public void Clear() { }
+ [System.ObsoleteAttribute("The default implementation of this cryptography algorithm is not supported", DiagnosticId = "SYSLIB0007", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.SymmetricAlgorithm Create() { throw null; }
public static System.Security.Cryptography.SymmetricAlgorithm? Create(string algName) { throw null; }
public virtual System.Security.Cryptography.ICryptoTransform CreateDecryptor() { throw null; }
<Compile Include="System\Security\Cryptography\PbeEncryptionAlgorithm.cs" />
<Compile Include="System\Security\Cryptography\PbeParameters.cs" />
<Compile Include="System\Security\Cryptography\SymmetricAlgorithm.cs" />
+ <Compile Include="$(CommonPath)System\Obsoletions.cs"
+ Link="Common\System\Obsoletions.cs" />
<Compile Include="$(CommonPath)System\Threading\Tasks\ForceAsyncAwaiter.cs"
Link="Common\System\Threading\Tasks\ForceAsyncAwaiter.cs" />
<Compile Include="$(CommonPath)Internal\Cryptography\Helpers.cs"
protected AsymmetricAlgorithm() { }
+ [Obsolete(Obsoletions.DefaultCryptoAlgorithmsMessage, DiagnosticId = Obsoletions.DefaultCryptoAlgorithmsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static AsymmetricAlgorithm Create() =>
throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
protected HMAC() { }
+ [Obsolete(Obsoletions.DefaultCryptoAlgorithmsMessage, DiagnosticId = Obsoletions.DefaultCryptoAlgorithmsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static new HMAC Create() =>
throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
protected HashAlgorithm() { }
+ [Obsolete(Obsoletions.DefaultCryptoAlgorithmsMessage, DiagnosticId = Obsoletions.DefaultCryptoAlgorithmsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static HashAlgorithm Create() =>
CryptoConfigForwarder.CreateDefaultHashAlgorithm();
{
protected KeyedHashAlgorithm() { }
+ [Obsolete(Obsoletions.DefaultCryptoAlgorithmsMessage, DiagnosticId = Obsoletions.DefaultCryptoAlgorithmsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static new KeyedHashAlgorithm Create() =>
throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
PaddingValue = PaddingMode.PKCS7;
}
+ [Obsolete(Obsoletions.DefaultCryptoAlgorithmsMessage, DiagnosticId = Obsoletions.DefaultCryptoAlgorithmsDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public static SymmetricAlgorithm Create() =>
throw new PlatformNotSupportedException(SR.Cryptography_DefaultAlgorithm_NotSupported);
[Fact]
public static void DefaultStaticCreateMethods()
{
+#pragma warning disable SYSLIB0007 // These methods are marked as Obsolete
// .NET Core does not allow the base classes to pick an algorithm.
Assert.Throws<PlatformNotSupportedException>(() => AsymmetricAlgorithm.Create());
Assert.Throws<PlatformNotSupportedException>(() => HashAlgorithm.Create());
Assert.Throws<PlatformNotSupportedException>(() => KeyedHashAlgorithm.Create());
Assert.Throws<PlatformNotSupportedException>(() => HMAC.Create());
Assert.Throws<PlatformNotSupportedException>(() => SymmetricAlgorithm.Create());
+#pragma warning restore SYSLIB0007
}
[Fact]
// ------------------------------------------------------------------------------
// Changes to this file must follow the https://aka.ms/api-review process.
// ------------------------------------------------------------------------------
+#pragma warning disable SYSLIB0003 // CAS Obsoletions
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.IPermission))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Security.ISecurityEncodable))]
}
namespace System.Configuration
{
+#if NET50_OBSOLETIONS
+ [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 ConfigurationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public ConfigurationPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 ConfigurationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public ConfigurationPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
}
namespace System.Data.Common
{
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public abstract partial class DBDataPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
protected DBDataPermission() { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public abstract partial class DBDataPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Data.Odbc
{
+#if NET50_OBSOLETIONS
+ [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 OdbcPermission : System.Data.Common.DBDataPermission
{
public OdbcPermission() { }
public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) { }
public override System.Security.IPermission Copy() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class OdbcPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
{
}
namespace System.Data.OleDb
{
+#if NET50_OBSOLETIONS
+ [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 OleDbPermission : System.Data.Common.DBDataPermission
{
public OleDbPermission() { }
public string Provider { get { throw null; } set { } }
public override System.Security.IPermission Copy() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class OleDbPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
{
}
namespace System.Data.OracleClient
{
+#if NET50_OBSOLETIONS
+ [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 OraclePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public OraclePermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class OraclePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Data.SqlClient
{
+#if NET50_OBSOLETIONS
+ [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 SqlClientPermission : System.Data.Common.DBDataPermission
{
public SqlClientPermission() { }
public override void Add(string connectionString, string restrictions, System.Data.KeyRestrictionBehavior behavior) { }
public override System.Security.IPermission Copy() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class SqlClientPermissionAttribute : System.Data.Common.DBDataPermissionAttribute
{
}
namespace System.Diagnostics
{
+#if NET50_OBSOLETIONS
+ [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 EventLogPermission : System.Security.Permissions.ResourcePermissionBase
{
public EventLogPermission() { }
Write = 16,
Administer = 48,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public partial class EventLogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
protected override void OnSet(int index, object oldValue, object newValue) { }
public void Remove(System.Diagnostics.EventLogPermissionEntry value) { }
}
+#if NET50_OBSOLETIONS
+ [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 PerformanceCounterPermission : System.Security.Permissions.ResourcePermissionBase
{
public PerformanceCounterPermission() { }
Instrument = 3,
Administer = 7,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public partial class PerformanceCounterPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Drawing.Printing
{
+#if NET50_OBSOLETIONS
+ [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 PrintingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public PrintingPermission(System.Drawing.Printing.PrintingPermissionLevel printingLevel) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true)]
public sealed partial class PrintingPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Net
{
+#if NET50_OBSOLETIONS
+ [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 DnsPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public DnsPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class DnsPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
Connect = 64,
Accept = 128,
}
+#if NET50_OBSOLETIONS
+ [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 SocketPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public const int AllPorts = -1;
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 SocketPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public SocketPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
Tcp = 2,
All = 3,
}
+#if NET50_OBSOLETIONS
+ [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 WebPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public WebPermission() { }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 WebPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public WebPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
Connect = 1,
ConnectToUnrestrictedPort = 2,
}
+#if NET50_OBSOLETIONS
+ [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 SmtpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public SmtpPermission(bool unrestricted) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class SmtpPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
Read = 1,
Ping = 4,
}
+#if NET50_OBSOLETIONS
+ [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 NetworkInformationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public NetworkInformationPermission(System.Net.NetworkInformation.NetworkInformationAccess access) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class NetworkInformationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Net.PeerToPeer
{
+#if NET50_OBSOLETIONS
+ [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 PnrpPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public PnrpPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class PnrpPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Net.PeerToPeer.Collaboration
{
+#if NET50_OBSOLETIONS
+ [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 PeerCollaborationPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public PeerCollaborationPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class PeerCollaborationPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Security
{
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public abstract partial class CodeAccessPermission : System.Security.IPermission, System.Security.ISecurityEncodable, System.Security.IStackWalk
{
protected CodeAccessPermission() { }
public abstract System.Security.SecurityElement ToXml();
public virtual System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public partial class HostProtectionException : System.SystemException
{
public HostProtectionException() { }
void PermitOnly();
}
#endif
+#if NET50_OBSOLETIONS
+ [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 NamedPermissionSet : System.Security.PermissionSet
{
public NamedPermissionSet(System.Security.NamedPermissionSet permSet) : base (default(System.Security.Permissions.PermissionState)) { }
CurrentAppDomain = 0,
CurrentAssembly = 1,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public static partial class SecurityManager
{
[System.ObsoleteAttribute]
}
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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 DataProtectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public DataProtectionPermission(System.Security.Permissions.DataProtectionPermissionFlags flag) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class DataProtectionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool UnprotectMemory { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum DataProtectionPermissionFlags
{
UnprotectMemory = 8,
AllFlags = 15,
}
+#if NET50_OBSOLETIONS
+ [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 EnvironmentPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public EnvironmentPermission(System.Security.Permissions.EnvironmentPermissionAccess flag, string pathList) { }
public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
[System.FlagsAttribute]
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum EnvironmentPermissionAccess
{
NoAccess = 0,
AllAccess = 3,
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 EnvironmentPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public EnvironmentPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public string Write { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 FileDialogPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public FileDialogPermission(System.Security.Permissions.FileDialogPermissionAccess access) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum FileDialogPermissionAccess
{
Save = 2,
OpenSave = 3,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class FileDialogPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool Save { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 FileIOPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public FileIOPermission(System.Security.Permissions.FileIOPermissionAccess access, System.Security.AccessControl.AccessControlActions actions, string path) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum FileIOPermissionAccess
{
PathDiscovery = 8,
AllAccess = 15,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class FileIOPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string Write { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 GacIdentityPermission : System.Security.CodeAccessPermission
{
public GacIdentityPermission() { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class GacIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public GacIdentityPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Delegate | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class HostProtectionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool UI { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum HostProtectionResource
{
MayLeakOnAbort = 256,
All = 511,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum IsolatedStorageContainment
{
None = 0,
AdministerIsolatedStorageByUser = 112,
UnrestrictedIsolatedStorage = 240,
}
+#if NET50_OBSOLETIONS
+ [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 IsolatedStorageFilePermission : System.Security.Permissions.IsolatedStoragePermission
{
public IsolatedStorageFilePermission(System.Security.Permissions.PermissionState state) : base (default(System.Security.Permissions.PermissionState)) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class IsolatedStorageFilePermissionAttribute : System.Security.Permissions.IsolatedStoragePermissionAttribute
{
public IsolatedStorageFilePermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public abstract partial class IsolatedStoragePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
protected IsolatedStoragePermission(System.Security.Permissions.PermissionState state) { }
public bool IsUnrestricted() { throw null; }
public override System.Security.SecurityElement ToXml() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public abstract partial class IsolatedStoragePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
protected IsolatedStoragePermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public System.Security.Permissions.IsolatedStorageContainment UsageAllowed { get { throw null; } set { } }
public long UserQuota { get { throw null; } set { } }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public partial interface IUnrestrictedPermission
{
bool IsUnrestricted();
}
+#if NET50_OBSOLETIONS
+ [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 KeyContainerPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public KeyContainerPermission(System.Security.Permissions.KeyContainerPermissionFlags flags) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 KeyContainerPermissionAccessEntry
{
public KeyContainerPermissionAccessEntry(System.Security.Cryptography.CspParameters parameters, System.Security.Permissions.KeyContainerPermissionFlags flags) { }
public override bool Equals(object o) { throw null; }
public override int GetHashCode() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 KeyContainerPermissionAccessEntryCollection : System.Collections.ICollection, System.Collections.IEnumerable
{
public KeyContainerPermissionAccessEntryCollection() { }
public void Remove(System.Security.Permissions.KeyContainerPermissionAccessEntry accessEntry) { }
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 KeyContainerPermissionAccessEntryEnumerator : System.Collections.IEnumerator
{
public KeyContainerPermissionAccessEntryEnumerator() { }
public void Reset() { }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 KeyContainerPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public KeyContainerPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public int ProviderType { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum KeyContainerPermissionFlags
{
NoFlags = 0,
ChangeAcl = 8192,
AllFlags = 13111,
}
+#if NET50_OBSOLETIONS
+ [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 MediaPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public MediaPermission() { }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 MediaPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public MediaPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public System.Security.Permissions.MediaPermissionVideo Video { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum MediaPermissionAudio
{
NoAudio = 0,
SafeAudio = 2,
AllAudio = 3,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum MediaPermissionImage
{
NoImage = 0,
SafeImage = 2,
AllImage = 3,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum MediaPermissionVideo
{
NoVideo = 0,
SafeVideo = 2,
AllVideo = 3,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class PermissionSetAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
Unrestricted = 1,
}
#endif
+#if NET50_OBSOLETIONS
+ [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 PrincipalPermission : System.Security.IPermission, System.Security.ISecurityEncodable, System.Security.Permissions.IUnrestrictedPermission
{
public PrincipalPermission(System.Security.Permissions.PermissionState state) { }
public System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
[System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [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 PrincipalPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
-#if CAS_OBSOLETIONS
- [System.ObsoleteAttribute("PrincipalPermissionAttribute is not honored by the runtime and must not be used.", true, DiagnosticId = "MSLIB0002", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("PrincipalPermissionAttribute is not honored by the runtime and must not be used.", true, DiagnosticId = "SYSLIB0002", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
#endif
public PrincipalPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
public bool Authenticated { get { throw null; } set { } }
public string Role { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 PublisherIdentityPermission : System.Security.CodeAccessPermission
{
public PublisherIdentityPermission(System.Security.Cryptography.X509Certificates.X509Certificate certificate) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class PublisherIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string X509Certificate { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 ReflectionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public ReflectionPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class ReflectionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool TypeInformation { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum ReflectionPermissionFlag
{
AllFlags = 7,
RestrictedMemberAccess = 8,
}
+#if NET50_OBSOLETIONS
+ [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 RegistryPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public RegistryPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission other) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum RegistryPermissionAccess
{
Create = 4,
AllAccess = 7,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class RegistryPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string Write { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public abstract partial class ResourcePermissionBase : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public const string Any = "*";
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public partial class ResourcePermissionBaseEntry
{
public ResourcePermissionBaseEntry() { }
public int PermissionAccess { get { throw null; } }
public string[] PermissionAccessPath { get { throw null; } }
}
+#if NET50_OBSOLETIONS
+ [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 SecurityPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public SecurityPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 SiteIdentityPermission : System.Security.CodeAccessPermission
{
public SiteIdentityPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class SiteIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string Site { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 StorePermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public StorePermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class StorePermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool RemoveFromStore { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum StorePermissionFlags
{
EnumerateCertificates = 128,
AllFlags = 247,
}
+#if NET50_OBSOLETIONS
+ [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 StrongNameIdentityPermission : System.Security.CodeAccessPermission
{
public StrongNameIdentityPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class StrongNameIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string Version { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 StrongNamePublicKeyBlob
{
public StrongNamePublicKeyBlob(byte[] publicKey) { }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 TypeDescriptorPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public TypeDescriptorPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class TypeDescriptorPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public bool RestrictedRegistrationAccess { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.FlagsAttribute]
public enum TypeDescriptorPermissionFlags
{
NoFlags = 0,
RestrictedRegistrationAccess = 1,
}
+#if NET50_OBSOLETIONS
+ [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 UIPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public UIPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class UIPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public System.Security.Permissions.UIPermissionWindow Window { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum UIPermissionClipboard
{
NoClipboard = 0,
OwnClipboard = 1,
AllClipboard = 2,
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum UIPermissionWindow
{
NoWindows = 0,
SafeTopLevelWindows = 2,
AllWindows = 3,
}
+#if NET50_OBSOLETIONS
+ [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 UrlIdentityPermission : System.Security.CodeAccessPermission
{
public UrlIdentityPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class UrlIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public string Url { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 WebBrowserPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public WebBrowserPermission() { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class WebBrowserPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public System.Security.Permissions.WebBrowserPermissionLevel Level { get { throw null; } set { } }
public override System.Security.IPermission CreatePermission() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public enum WebBrowserPermissionLevel
{
None = 0,
Safe = 1,
Unrestricted = 2,
}
+#if NET50_OBSOLETIONS
+ [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 ZoneIdentityPermission : System.Security.CodeAccessPermission
{
public ZoneIdentityPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
public sealed partial class ZoneIdentityPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
{
public ApplicationTrust() { }
public ApplicationTrust(System.ApplicationIdentity identity) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public ApplicationTrust(System.Security.PermissionSet defaultGrantSet, System.Collections.Generic.IEnumerable<System.Security.Policy.StrongName> fullTrustAssemblies) { }
public System.ApplicationIdentity ApplicationIdentity { get { throw null; } set { } }
public System.Security.Policy.PolicyStatement DefaultGrantSet { get { throw null; } set { } }
public object ExtraInfo { get { throw null; } set { } }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Collections.Generic.IList<System.Security.Policy.StrongName> FullTrustAssemblies { get { throw null; } }
public bool IsApplicationTrustedToRun { get { throw null; } set { } }
public bool Persist { get { throw null; } set { } }
protected EvidenceBase() { }
public virtual System.Security.Policy.EvidenceBase Clone() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 FileCodeGroup : System.Security.Policy.CodeGroup
{
public FileCodeGroup(System.Security.Policy.IMembershipCondition membershipCondition, System.Security.Permissions.FileIOPermissionAccess access) : base (default(System.Security.Policy.IMembershipCondition), default(System.Security.Policy.PolicyStatement)) { }
public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) { throw null; }
public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 GacInstalled : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public GacInstalled() { }
public System.Security.SecurityElement ToXml() { throw null; }
public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public partial interface IIdentityPermissionFactory
{
System.Security.IPermission CreateIdentityPermission(System.Security.Policy.Evidence evidence);
public void AddFullTrustAssembly(System.Security.Policy.StrongName sn) { }
[System.ObsoleteAttribute]
public void AddFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public void AddNamedPermissionSet(System.Security.NamedPermissionSet permSet) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Security.NamedPermissionSet ChangeNamedPermissionSet(string name, System.Security.PermissionSet pSet) { throw null; }
[System.ObsoleteAttribute("AppDomain policy levels are obsolete. See https://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
public static System.Security.Policy.PolicyLevel CreateAppDomainLevel() { throw null; }
public void FromXml(System.Security.SecurityElement e) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Security.NamedPermissionSet GetNamedPermissionSet(string name) { throw null; }
public void Recover() { }
[System.ObsoleteAttribute]
public void RemoveFullTrustAssembly(System.Security.Policy.StrongName sn) { }
[System.ObsoleteAttribute]
public void RemoveFullTrustAssembly(System.Security.Policy.StrongNameMembershipCondition snMC) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Security.NamedPermissionSet RemoveNamedPermissionSet(System.Security.NamedPermissionSet permSet) { throw null; }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Security.NamedPermissionSet RemoveNamedPermissionSet(string name) { throw null; }
public void Reset() { }
public System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) { throw null; }
}
public sealed partial class PolicyStatement : System.Security.ISecurityEncodable, System.Security.ISecurityPolicyEncodable
{
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public PolicyStatement(System.Security.PermissionSet permSet) { }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public PolicyStatement(System.Security.PermissionSet permSet, System.Security.Policy.PolicyStatementAttribute attributes) { }
public System.Security.Policy.PolicyStatementAttribute Attributes { get { throw null; } set { } }
public string AttributeString { get { throw null; } }
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
public System.Security.PermissionSet PermissionSet { get { throw null; } set { } }
public System.Security.Policy.PolicyStatement Copy() { throw null; }
public override bool Equals(object o) { throw null; }
LevelFinal = 2,
All = 3,
}
+#if NET50_OBSOLETIONS
+ [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 Publisher : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public Publisher(System.Security.Cryptography.X509Certificates.X509Certificate cert) { }
public System.Security.SecurityElement ToXml() { throw null; }
public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 Site : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public Site(string name) { }
public System.Security.SecurityElement ToXml() { throw null; }
public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 StrongName : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public StrongName(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version) { }
public override int GetHashCode() { throw null; }
public override string ToString() { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 StrongNameMembershipCondition : System.Security.ISecurityEncodable, System.Security.ISecurityPolicyEncodable, System.Security.Policy.IMembershipCondition
{
public StrongNameMembershipCondition(System.Security.Permissions.StrongNamePublicKeyBlob blob, string name, System.Version version) { }
public override System.Security.Policy.PolicyStatement Resolve(System.Security.Policy.Evidence evidence) { throw null; }
public override System.Security.Policy.CodeGroup ResolveMatchingCodeGroups(System.Security.Policy.Evidence evidence) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 Url : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public Url(string name) { }
public System.Security.SecurityElement ToXml() { throw null; }
public System.Security.SecurityElement ToXml(System.Security.Policy.PolicyLevel level) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [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 Zone : System.Security.Policy.EvidenceBase, System.Security.Policy.IIdentityPermissionFactory
{
public Zone(System.Security.SecurityZone zone) { }
}
namespace System.ServiceProcess
{
+#if NET50_OBSOLETIONS
+ [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 ServiceControllerPermission : System.Security.Permissions.ResourcePermissionBase
{
public ServiceControllerPermission() { }
Browse = 2,
Control = 6,
}
- [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple=true, Inherited=false)]
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
+ [System.AttributeUsageAttribute(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Event | System.AttributeTargets.Method | System.AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
public partial class ServiceControllerPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
public ServiceControllerPermissionAttribute(System.Security.Permissions.SecurityAction action) : base (default(System.Security.Permissions.SecurityAction)) { }
}
namespace System.Transactions
{
+#if NET50_OBSOLETIONS
+ [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 DistributedTransactionPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public DistributedTransactionPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true)]
public sealed partial class DistributedTransactionPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
}
namespace System.Web
{
+#if NET50_OBSOLETIONS
+ [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 AspNetHostingPermission : System.Security.CodeAccessPermission, System.Security.Permissions.IUnrestrictedPermission
{
public AspNetHostingPermission(System.Security.Permissions.PermissionState state) { }
public override System.Security.SecurityElement ToXml() { throw null; }
public override System.Security.IPermission Union(System.Security.IPermission target) { throw null; }
}
+#if NET50_OBSOLETIONS
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#endif
[System.AttributeUsageAttribute(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)]
public sealed partial class AspNetHostingPermissionAttribute : System.Security.Permissions.CodeAccessSecurityAttribute
{
<PropertyGroup>
<IsPartialFacadeAssembly Condition="$(TargetFramework.StartsWith('net4'))">true</IsPartialFacadeAssembly>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
- <DefineConstants>$(DefineConstants);CAS_OBSOLETIONS</DefineConstants>
+ <!-- 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" />
namespace System.Xaml.Permissions
{
+#if NET50_OBSOLETIONS
+ [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
{
public XamlLoadPermission(System.Collections.Generic.IEnumerable<System.Xaml.Permissions.XamlAccessLevel> allowedAccess) { }
<TargetFrameworks>$(NetCoreAppCurrent);netcoreapp3.0;netstandard2.0;net461;$(NetFrameworkCurrent)</TargetFrameworks>
<ExcludeCurrentFullFrameworkFromPackage>true</ExcludeCurrentFullFrameworkFromPackage>
</PropertyGroup>
- <PropertyGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)'">
- <DefineConstants>$(DefineConstants);CAS_OBSOLETIONS</DefineConstants>
+ <!-- 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\Web\AspNetHostingPermission.cs" />
<Compile Include="System\Web\AspNetHostingPermissionAttribute.cs" />
<Compile Include="System\Web\AspNetHostingPermissionLevel.cs" />
+ <Compile Include="$(CommonPath)System\Obsoletions.cs"
+ Link="Common\System\Obsoletions.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == '$(NetCoreAppCurrent)' or '$(TargetFramework)' == 'netcoreapp3.0'">
<Compile Include="System\Xaml\Permissions\XamlLoadPermission.cs" />
namespace System.Configuration
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class ConfigurationPermission : CodeAccessPermission, IUnrestrictedPermission
{
public ConfigurationPermission(PermissionState state) { }
namespace System.Data.Common
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public abstract class DBDataPermission : CodeAccessPermission, IUnrestrictedPermission
{
protected DBDataPermission() { }
namespace System.Data.Odbc
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class OdbcPermission : DBDataPermission
{
public OdbcPermission() : base(default(PermissionState)) { }
namespace System.Data.OleDb
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class OleDbPermission : DBDataPermission
{
public OleDbPermission() : base(default(PermissionState)) { }
namespace System.Data.OracleClient
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class OraclePermission : CodeAccessPermission, IUnrestrictedPermission
{
public OraclePermission(PermissionState state) { }
namespace System.Data.SqlClient
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class SqlClientPermission : DBDataPermission
{
public SqlClientPermission() : base(default(PermissionState)) { }
namespace System.Diagnostics
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class EventLogPermission : ResourcePermissionBase
{
public EventLogPermission() { }
namespace System.Diagnostics
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class PerformanceCounterPermission : ResourcePermissionBase
{
public PerformanceCounterPermission() { }
namespace System.Drawing.Printing
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class PrintingPermission : CodeAccessPermission, IUnrestrictedPermission
{
public PrintingPermission(PrintingPermissionLevel printingLevel) { }
namespace System.Net
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class DnsPermission : CodeAccessPermission, IUnrestrictedPermission
{
public DnsPermission(PermissionState state) { }
namespace System.Net.Mail
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class SmtpPermission : CodeAccessPermission, IUnrestrictedPermission
{
public SmtpPermission(bool unrestricted) { }
namespace System.Net.NetworkInformation
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class NetworkInformationPermission : CodeAccessPermission, IUnrestrictedPermission
{
public NetworkInformationPermission(PermissionState state) { }
namespace System.Net.PeerToPeer.Collaboration
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class PeerCollaborationPermission : CodeAccessPermission, IUnrestrictedPermission
{
public PeerCollaborationPermission(PermissionState state) { }
namespace System.Net.PeerToPeer
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class PnrpPermission : CodeAccessPermission, IUnrestrictedPermission
{
public PnrpPermission(PermissionState state) { }
namespace System.Net
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class SocketPermission : CodeAccessPermission, IUnrestrictedPermission
{
public const int AllPorts = -1;
namespace System.Net
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class WebPermission : CodeAccessPermission, IUnrestrictedPermission
{
public WebPermission() { }
namespace System.Security
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Serializable]
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public partial class HostProtectionException : SystemException
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class DataProtectionPermission : CodeAccessPermission, IUnrestrictedPermission
{
public DataProtectionPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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 )]
public sealed class DataProtectionPermissionAttribute : CodeAccessSecurityAttribute
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum DataProtectionPermissionFlags
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class EnvironmentPermission : CodeAccessPermission, IUnrestrictedPermission
{
public EnvironmentPermission(EnvironmentPermissionAccess flag, string pathList) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum EnvironmentPermissionAccess
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class EnvironmentPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class FileDialogPermission : CodeAccessPermission, IUnrestrictedPermission
{
public FileDialogPermission(FileDialogPermissionAccess access) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum FileDialogPermissionAccess
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class FileDialogPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class FileIOPermission : CodeAccessPermission, IUnrestrictedPermission
{
public FileIOPermission(FileIOPermissionAccess access, string path) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum FileIOPermissionAccess
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class FileIOPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class GacIdentityPermission : CodeAccessPermission
{
public GacIdentityPermission() { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class GacIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(4205), AllowMultiple = true, Inherited = false)]
public sealed partial class HostProtectionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
[System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public enum HostProtectionResource
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public partial interface IUnrestrictedPermission
{
bool IsUnrestricted();
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum IsolatedStorageContainment
{
None = 0x00,
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class IsolatedStorageFilePermission : IsolatedStoragePermission
{
public IsolatedStorageFilePermission(PermissionState state) : base(state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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)]
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public abstract class IsolatedStoragePermission : CodeAccessPermission, IUnrestrictedPermission
{
protected IsolatedStoragePermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public abstract class IsolatedStoragePermissionAttribute : CodeAccessSecurityAttribute
{
protected IsolatedStoragePermissionAttribute(SecurityAction action) : base(action) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class KeyContainerPermission : CodeAccessPermission, IUnrestrictedPermission
{
public KeyContainerPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class KeyContainerPermissionAccessEntry
{
public KeyContainerPermissionAccessEntry(string keyContainerName, KeyContainerPermissionFlags flags) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class KeyContainerPermissionAccessEntryCollection : ICollection
{
public KeyContainerPermissionAccessEntry this[int index] { get { return null; } }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class KeyContainerPermissionAccessEntryEnumerator : IEnumerator
{
public KeyContainerPermissionAccessEntry Current { get; }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class KeyContainerPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum KeyContainerPermissionFlags
{
NoFlags = 0x0000,
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum MediaPermissionAudio
{
NoAudio,
SafeAudio,
AllAudio
}
+
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum MediaPermissionVideo
{
NoVideo,
SafeVideo,
AllVideo,
}
+
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum MediaPermissionImage
{
NoImage,
SafeImage,
AllImage,
}
+
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class MediaPermission : CodeAccessPermission, IUnrestrictedPermission
{
public MediaPermission() { }
public MediaPermissionVideo Video { get { return MediaPermissionVideo.AllVideo; } }
public MediaPermissionImage Image { get { return MediaPermissionImage.AllImage; } }
}
+
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class MediaPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class PermissionSetAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class PrincipalPermission : IPermission, ISecurityEncodable, IUnrestrictedPermission
{
private IDRole[] _idArray;
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(68), AllowMultiple = true, Inherited = false)]
public sealed partial class PrincipalPermissionAttribute : CodeAccessSecurityAttribute
{
-#if CAS_OBSOLETIONS
- [Obsolete("PrincipalPermissionAttribute is not honored by the runtime and must not be used.", error: true, DiagnosticId = "MSLIB0002", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.PrincipalPermissionAttributeMessage, error: true, DiagnosticId = Obsoletions.PrincipalPermissionAttributeDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
#endif
public PrincipalPermissionAttribute(SecurityAction action) : base(default(SecurityAction)) { }
public bool Authenticated { get; set; }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class PublisherIdentityPermission : CodeAccessPermission
{
public PublisherIdentityPermission(X509Certificate certificate) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class PublisherIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class ReflectionPermission : CodeAccessPermission, IUnrestrictedPermission
{
public ReflectionPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class ReflectionPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum ReflectionPermissionFlag
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class RegistryPermission : CodeAccessPermission, IUnrestrictedPermission
{
public RegistryPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum RegistryPermissionAccess
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class RegistryPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public abstract class ResourcePermissionBase : CodeAccessPermission, IUnrestrictedPermission
{
public const string Any = "*";
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public class ResourcePermissionBaseEntry
{
public ResourcePermissionBaseEntry() { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class SecurityPermission : CodeAccessPermission, IUnrestrictedPermission
{
public SecurityPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class SiteIdentityPermission : CodeAccessPermission
{
public SiteIdentityPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class SiteIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class StorePermission : CodeAccessPermission, IUnrestrictedPermission
{
public StorePermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class StorePermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum StorePermissionFlags
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class StrongNameIdentityPermission : CodeAccessPermission
{
public StrongNameIdentityPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class StrongNameIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class StrongNamePublicKeyBlob
{
public StrongNamePublicKeyBlob(byte[] publicKey) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class TypeDescriptorPermission : CodeAccessPermission, IUnrestrictedPermission
{
public TypeDescriptorPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class TypeDescriptorPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[Flags]
public enum TypeDescriptorPermissionFlags
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class UIPermission : CodeAccessPermission, IUnrestrictedPermission
{
public UIPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class UIPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum UIPermissionClipboard
{
AllClipboard = 2,
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum UIPermissionWindow
{
AllWindows = 3,
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class UrlIdentityPermission : CodeAccessPermission
{
public UrlIdentityPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class UrlIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
// The .NET Foundation licenses this file to you under the MIT license.
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public enum WebBrowserPermissionLevel
{
None,
Safe,
Unrestricted
}
+
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class WebBrowserPermission : CodeAccessPermission, IUnrestrictedPermission
{
public WebBrowserPermission() { }
public WebBrowserPermissionLevel Level { get { return WebBrowserPermissionLevel.Unrestricted; } set { } }
}
+#if NET50_OBSOLETIONS
+ [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)]
public sealed class WebBrowserPermissionAttribute : CodeAccessSecurityAttribute
{
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class ZoneIdentityPermission : CodeAccessPermission
{
public ZoneIdentityPermission(PermissionState state) { }
namespace System.Security.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
[AttributeUsage((AttributeTargets)(109), AllowMultiple = true, Inherited = false)]
public sealed partial class ZoneIdentityPermissionAttribute : CodeAccessSecurityAttribute
{
{
public ApplicationTrust() { }
public ApplicationTrust(ApplicationIdentity identity) { }
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public ApplicationTrust(PermissionSet defaultGrantSet, IEnumerable<StrongName> fullTrustAssemblies) { }
public ApplicationIdentity ApplicationIdentity { get; set; }
public PolicyStatement DefaultGrantSet { get; set; }
public object ExtraInfo { get; set; }
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public IList<StrongName> FullTrustAssemblies { get { return default(IList<StrongName>); } }
public bool IsApplicationTrustedToRun { get; set; }
public bool Persist { get; set; }
namespace System.Security.Policy
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class FileCodeGroup : CodeGroup
{
public FileCodeGroup(IMembershipCondition membershipCondition, Permissions.FileIOPermissionAccess access) : base(default(IMembershipCondition), default(PolicyStatement)) { }
namespace System.Security.Policy
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class StrongName : EvidenceBase, IIdentityPermissionFactory
{
public StrongName(StrongNamePublicKeyBlob blob, string name, Version version) { }
namespace System.Security.Policy
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed partial class StrongNameMembershipCondition : ISecurityEncodable, ISecurityPolicyEncodable, IMembershipCondition
{
public StrongNameMembershipCondition(StrongNamePublicKeyBlob blob, string name, Version version) { }
namespace System.Security
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public static partial class SecurityManager
{
[Obsolete]
namespace System.ServiceProcess
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class ServiceControllerPermission : ResourcePermissionBase
{
public ServiceControllerPermission() { }
namespace System.Transactions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class DistributedTransactionPermission : CodeAccessPermission, IUnrestrictedPermission
{
public DistributedTransactionPermission(PermissionState state) { }
namespace System.Web
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class AspNetHostingPermission : CodeAccessPermission, IUnrestrictedPermission
{
public AspNetHostingPermission(PermissionState state) { }
namespace System.Xaml.Permissions
{
+#if NET50_OBSOLETIONS
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
+#endif
public sealed class XamlLoadPermission : CodeAccessPermission, IUnrestrictedPermission
{
public XamlLoadPermission(PermissionState state) { }
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
+ <!-- SYSLIB0003 is the obsoletion of CAS, but we still have unit tests for it -->
+ <NoWarn>$(NoWarn);SYSLIB0003</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="ApplicationTrustTests.cs" />
}
public partial class UTF7Encoding : System.Text.Encoding
{
- [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "MSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "SYSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public UTF7Encoding() { }
- [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "MSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
+ [System.ObsoleteAttribute("The UTF-7 encoding is insecure and should not be used. Consider using UTF-8 instead.", DiagnosticId = "SYSLIB0001", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public UTF7Encoding(bool allowOptionals) { }
public override bool Equals(object? value) { throw null; }
[System.CLSCompliantAttribute(false)]
<IncludeRemoteExecutor>true</IncludeRemoteExecutor>
<TargetFrameworks>$(NetCoreAppCurrent)</TargetFrameworks>
<!-- Encoding.UTF7 and UTF7Encoding are obsolete, but we're the unit test project for it, so suppress warnings -->
- <NoWarn>$(NoWarn),MSLIB0001</NoWarn>
+ <NoWarn>$(NoWarn),SYSLIB0001</NoWarn>
</PropertyGroup>
<ItemGroup>
<Compile Include="ASCIIEncoding\ASCIIEncodingEncode.cs" />
public string? Name { get { throw null; } set { } }
public System.Threading.ThreadPriority Priority { get { throw null; } set { } }
public System.Threading.ThreadState ThreadState { get { throw null; } }
+ [System.ObsoleteAttribute("Thread.Abort is not supported and throws PlatformNotSupportedException.", DiagnosticId = "SYSLIB0006", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public void Abort() { }
+ [System.ObsoleteAttribute("Thread.Abort is not supported and throws PlatformNotSupportedException.", DiagnosticId = "SYSLIB0006", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public void Abort(object? stateInfo) { }
public static System.LocalDataStoreSlot AllocateDataSlot() { throw null; }
public static System.LocalDataStoreSlot AllocateNamedDataSlot(string name) { throw null; }
Action verify = () =>
{
+#pragma warning disable SYSLIB0006, 618 // Obsolete: Abort, Suspend, Resume
Assert.Throws<PlatformNotSupportedException>(() => t.Abort());
Assert.Throws<PlatformNotSupportedException>(() => t.Abort(t));
-#pragma warning disable 618 // Obsolete members
Assert.Throws<PlatformNotSupportedException>(() => t.Suspend());
Assert.Throws<PlatformNotSupportedException>(() => t.Resume());
-#pragma warning restore 618 // Obsolete members
+#pragma warning restore SYSLIB0006, 618 // Obsolete: Abort, Suspend, Resume
};
verify();
}
}
+ [Obsolete(Obsoletions.GlobalAssemblyCacheMessage, DiagnosticId = Obsoletions.GlobalAssemblyCacheDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public override bool GlobalAssemblyCache
{
get
public override Module ManifestModule => GetManifestModuleInternal();
+ [Obsolete(Obsoletions.GlobalAssemblyCacheMessage, DiagnosticId = Obsoletions.GlobalAssemblyCacheDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public override bool GlobalAssemblyCache => false;
public override long HostContext => 0;