return SetApartmentStateUnchecked(state, throwOnError);
}
- [Obsolete("Thread.GetCompressedStack has been deprecated. Use the System.Threading.CompressedStack class instead.")]
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public CompressedStack GetCompressedStack()
{
throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
}
- [Obsolete("Thread.SetCompressedStack has been deprecated. Use the System.Threading.CompressedStack class instead.")]
+ [Obsolete(Obsoletions.CodeAccessSecurityMessage, DiagnosticId = Obsoletions.CodeAccessSecurityDiagId, UrlFormat = Obsoletions.SharedUrlFormat)]
public void SetCompressedStack(CompressedStack stack)
{
throw new InvalidOperationException(SR.Thread_GetSetCompressedStack_NotSupported);
~Thread() { }
public static void FreeNamedDataSlot(string name) { }
public System.Threading.ApartmentState GetApartmentState() { throw null; }
- [System.ObsoleteAttribute("Thread.GetCompressedStack has been deprecated. Use the System.Threading.CompressedStack class instead.")]
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public System.Threading.CompressedStack GetCompressedStack() { throw null; }
public static int GetCurrentProcessorId() { throw null; }
public static object? GetData(System.LocalDataStoreSlot slot) { throw null; }
public void Resume() { }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public void SetApartmentState(System.Threading.ApartmentState state) { }
- [System.ObsoleteAttribute("Thread.SetCompressedStack has been deprecated. Use the System.Threading.CompressedStack class instead.")]
+ [System.ObsoleteAttribute("Code Access Security is not supported or honored by the runtime.", DiagnosticId = "SYSLIB0003", UrlFormat = "https://aka.ms/dotnet-warnings/{0}")]
public void SetCompressedStack(System.Threading.CompressedStack stack) { }
public static void SetData(System.LocalDataStoreSlot slot, object? data) { }
public static void Sleep(int millisecondsTimeout) { }
Thread.BeginThreadAffinity();
Thread.EndThreadAffinity();
-#pragma warning disable 618 // obsolete members
+#pragma warning disable SYSLIB0003 // obsolete members
Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.GetCompressedStack());
Assert.Throws<InvalidOperationException>(() => Thread.CurrentThread.SetCompressedStack(CompressedStack.Capture()));
-#pragma warning restore 618 // obsolete members
+#pragma warning restore SYSLIB0003 // obsolete members
Thread.MemoryBarrier();