HostProtectionAttribute::SelfAffectingThreading Property
.NET Framework (current version)
Gets or sets a value indicating whether self-affecting threading is exposed.
Assembly: mscorlib (in mscorlib.dll)
Property Value
Type: System::Booleantrue if self-affecting threading is exposed; otherwise, false. The default is false.
Self-affecting threading manipulates threads in a way that only affects user code.
The following code example illustrates the use of the HostProtectionAttribute attribute with the SelfAffectingThreading property. This example is part of a larger example provided for the HostProtectionAttribute class.
// Use the enumeration flags to indicate that this method exposes shared state, // self-affecting process management, and self-affecting threading. // This method allows the user to quit the sample. [HostProtection(SharedState=true,SelfAffectingProcessMgmt=true, SelfAffectingThreading=true,UI=true)] static void ExecuteBreak() { Console::WriteLine( "Executing Debugger.Break." ); Debugger::Break(); Debugger::Log( 1, "info", "test message" ); }
.NET Framework
Available since 2.0
Available since 2.0
Show: