HostProtectionAttribute.ExternalThreading プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HostProtectionAttribute.ExternalThreading プロパティの意味・解説 

HostProtectionAttribute.ExternalThreading プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

外部スレッド処理が公開されているかどうかを示す値を取得または設定します

名前空間: System.Security.Permissions
アセンブリ: mscorlib (mscorlib.dll 内)
構文構文

Public Property ExternalThreading As
 Boolean
Dim instance As HostProtectionAttribute
Dim value As Boolean

value = instance.ExternalThreading

instance.ExternalThreading = value
public bool ExternalThreading { get;
 set; }
public:
property bool ExternalThreading {
    bool get ();
    void set (bool 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:

プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HostProtectionAttribute クラス
HostProtectionAttribute メンバ
System.Security.Permissions 名前空間
ExternalThreading


このページでは「.NET Framework クラス ライブラリ リファレンス」からHostProtectionAttribute.ExternalThreading プロパティを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHostProtectionAttribute.ExternalThreading プロパティを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHostProtectionAttribute.ExternalThreading プロパティ を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HostProtectionAttribute.ExternalThreading プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HostProtectionAttribute.ExternalThreading プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS