HostProtectionAttribute.Resources プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)

Dim instance As HostProtectionAttribute Dim value As HostProtectionResource value = instance.Resources instance.Resources = value
public: property HostProtectionResource Resources { HostProtectionResource get (); void set (HostProtectionResource value); }
/** @property */ public HostProtectionResource get_Resources () /** @property */ public void set_Resources (HostProtectionResource value)
public function get Resources () : HostProtectionResource public function set Resources (value : HostProtectionResource)
HostProtectionResource 値のビットごとの組み合わせ。既定値は None です。


Resources プロパティを持つ HostProtectionAttribute 属性を使用するコード例を次に示します。このコード例は、HostProtectionAttribute クラスのトピックで取り上げているコード例の一部分です。
' 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 Or _ HostProtectionResource.SelfAffectingProcessMgmt)> _ Private Shared Sub [Exit](ByVal Message As String, ByVal Code As Integer) ' Exit the sample when an exception is thrown. Console.WriteLine((ControlChars.Lf & "FAILED: " & Message & " " & _ Code.ToString())) Environment.ExitCode = Code Environment.Exit(Code) End Sub 'Exit
// 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); }
// 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. // Exit the sample when an exception is thrown. [HostProtection(SharedState=true,SelfAffectingProcessMgmt=true)] [HostProtection(Resources=HostProtectionResource::SharedState| HostProtectionResource::SelfAffectingProcessMgmt)] static void Exit( String^ Message, int Code ) { Console::WriteLine( "\nFAILED: {0} {1}", Message, Code ); Environment::ExitCode = Code; Environment::Exit( Code ); }

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からHostProtectionAttribute.Resources プロパティを検索する場合は、下記のリンクをクリックしてください。

- HostProtectionAttribute.Resources プロパティのページへのリンク