HostProtectionAttribute.Resources-Eigenschaft
.NET Framework 3.0
Ruft Flags ab, die Kategorien von Funktionen angeben, die potenziell schädlich für den Host sind, oder legt diese Flags fest.
Namespace: System.Security.Permissions
Assembly: mscorlib (in mscorlib.dll)
Assembly: mscorlib (in mscorlib.dll)
/** @property */ public HostProtectionResource get_Resources () /** @property */ public void set_Resources (HostProtectionResource value)
public function get Resources () : HostProtectionResource public function set Resources (value : HostProtectionResource)
Nicht zutreffend.
Eigenschaftenwert
Eine bitweise Kombination der HostProtectionResource-Werte. Der Standardwert ist None.Im folgenden Codebeispiel wird die Verwendung des HostProtectionAttribute-Attributs mit der Resources-Eigenschaft veranschaulicht. Dieses Beispiel ist Teil eines umfangreicheren Beispiels für die HostProtectionAttribute-Klasse.
// Use the enumeration flags to indicate that this method exposes // shared state and self-affecting process management. // Either of the following attribute statements can be used to set the // resource flags. [HostProtectionAttribute(SharedState = true, SelfAffectingProcessMgmt = true)] [HostProtectionAttribute(Resources = HostProtectionResource.SharedState | HostProtectionResource.SelfAffectingProcessMgmt)] private static void Exit(string Message, int Code) { // Exit the sample when an exception is thrown. Console.WriteLine("\nFAILED: " + Message + " " + Code.ToString()); Environment.ExitCode = Code; Environment.Exit(Code); }
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
Microsoft .NET Framework 3.0 wird unter Windows Vista, Microsoft Windows XP SP2 und Windows Server 2003 SP1 unterstützt.