HostProtectionAttribute.ExternalThreading プロパティ
アセンブリ: mscorlib (mscorlib.dll 内)
構文Dim instance As HostProtectionAttribute Dim value As Boolean value = instance.ExternalThreading instance.ExternalThreading = value
/** @property */ public boolean get_ExternalThreading () /** @property */ public void set_ExternalThreading (boolean value)
public function get ExternalThreading () : boolean public function set ExternalThreading (value : boolean)
外部スレッド処理が公開されている場合は true。それ以外の場合は false。既定値は false です。
解説
使用例ExternalThreading プロパティを持つ HostProtectionAttribute 属性を使用するコード例を次に示します。このコード例は、HostProtectionAttribute クラスのトピックで取り上げているコード例の一部分です。
' Use the enumeration flags to indicate that this method exposes ' synchronization and external threading. <HostProtectionAttribute(Synchronization := True, _ ExternalThreading := True)> _ Private Shared Sub StartThread() Dim t As New Thread(New ThreadStart(AddressOf WatchFileEvents)) ' Start the new thread. On a uniprocessor, the thread is not given ' any processor time until the main thread yields the processor. t.Start() ' Give the new thread a chance to execute. Thread.Sleep(1000) End Sub 'StartThread
// Use the enumeration flags to indicate that this method exposes // synchronization and external threading. [HostProtectionAttribute(Synchronization=true, ExternalThreading=true)] private static void StartThread() { Thread t = new Thread(new ThreadStart(WatchFileEvents)); // Start the new thread. On a uniprocessor, the thread is not given // any processor time until the main thread yields the processor. t.Start(); // Give the new thread a chance to execute. Thread.Sleep(1000); }
// Use the enumeration flags to indicate that this method exposes synchronization // and external threading. [HostProtection(Synchronization=true,ExternalThreading=true)] static void StartThread() { Thread^ t = gcnew Thread( gcnew ThreadStart( WatchFileEvents ) ); // Start the new thread. On a uniprocessor, the thread is not given // any processor time until the main thread yields the processor. t->Start(); // Give the new thread a chance to execute. Thread::Sleep( 1000 ); } public:
プラットフォーム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.ExternalThreading プロパティを検索する場合は、下記のリンクをクリックしてください。
全ての辞書からHostProtectionAttribute.ExternalThreading プロパティ
を検索
- HostProtectionAttribute.ExternalThreading プロパティのページへのリンク