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

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

SessionChangeDescription.Reason プロパティ

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

セッション変更の理由取得します

名前空間: System.ServiceProcess
アセンブリ: System.ServiceProcess (system.serviceprocess.dll 内)
構文構文

Dim instance As SessionChangeDescription
Dim value As SessionChangeReason

value = instance.Reason
public SessionChangeReason Reason { get; }
public:
property SessionChangeReason Reason {
    SessionChangeReason get ();
}
/** @property */
public SessionChangeReason get_Reason ()
public function get Reason
 () : SessionChangeReason

プロパティ
SessionChangeReason 値の 1 つ

使用例使用例

ServiceBase から派生したクラスの OnSessionChange メソッド実装で、Reason プロパティ使用するコード例次に示します。このコード例は、ServiceBase クラストピック取り上げているコード例一部分です。

    ' Handle a session change notice
    Protected Overrides Sub
 OnSessionChange(ByVal changeDescription As
 SessionChangeDescription)
#If LOGEVENTS Then
        System.Diagnostics.EventLog.WriteEntry("SimpleService.OnSessionChange",
 _
        DateTime.Now.ToLongTimeString() + " - Session change notice
 recieved: " + _
        changeDescription.Reason.ToString() + "  Session ID: "
 + _
        changeDescription.SessionId.ToString())
#End If

        // Handle a session change notice
        protected override void OnSessionChange(SessionChangeDescription
 changeDescription)
        {
#if LOGEVENTS
            EventLog.WriteEntry("SimpleService.OnSessionChange", DateTime.Now.ToLongTimeString()
 +
                " - Session change notice received: " +
                changeDescription.Reason.ToString() + "  Session ID: "
 + 
                changeDescription.SessionId.ToString());
#endif

protected:
    virtual void OnSessionChange(SessionChangeDescription changeDescription)
 override
    {
        Trace::WriteLine( DateTime::Now.ToLongTimeString() + " - Change description
 received: " 
            + changeDescription.ToString(), "OnSessionChange" );

.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
SessionChangeDescription 構造体
SessionChangeDescription メンバ
System.ServiceProcess 名前空間



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS