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

Dim instance As HostProtectionAttribute Dim value As Boolean value = instance.Synchronization instance.Synchronization = value
/** @property */ public boolean get_Synchronization () /** @property */ public void set_Synchronization (boolean value)
public function get Synchronization () : boolean public function set Synchronization (value : boolean)
同期が公開されている場合は true。それ以外の場合は false。既定値は false です。

Synchronization プロパティを持つ 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 によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


HostProtectionAttribute クラス
HostProtectionAttribute メンバ
System.Security.Permissions 名前空間
Synchronization
Weblioに収録されているすべての辞書からHostProtectionAttribute.Synchronization プロパティを検索する場合は、下記のリンクをクリックしてください。

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