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

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

SecurityCallContext.CurrentCall プロパティ

セキュリティ呼び出しコンテキスト説明する SecurityCallContext オブジェクト取得します

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

Public Shared ReadOnly Property
 CurrentCall As SecurityCallContext
Dim value As SecurityCallContext

value = SecurityCallContext.CurrentCall
public static SecurityCallContext CurrentCall
 { get; }
public:
static property SecurityCallContext^ CurrentCall {
    SecurityCallContext^ get ();
}
/** @property */
public static SecurityCallContext get_CurrentCall
 ()
public static function get
 CurrentCall () : SecurityCallContext

プロパティ
セキュリティ呼び出しコンテキスト説明する SecurityCallContext オブジェクト

解説解説
使用例使用例

このメソッド使用してメソッド呼び出しセキュリティ コンテキスト説明する SecurityCallContext オブジェクト取得する方法コード例次に示します

' Set the employee's salary. Only managers can do this.
Public Sub SetSalary(ByVal
 ammount As Double) 
    If SecurityCallContext.CurrentCall.IsCallerInRole("Manager")
 Then
        salary = ammount
    Else
        Throw New UnauthorizedAccessException()
    End If

End Sub 'SetSalary
// Set the employee's salary. Only managers can do this.
public void SetSalary (double ammount)
{
    if (SecurityCallContext.CurrentCall.IsCallerInRole("Manager"))
    {
        salary = ammount;
    }
    else
    {
        throw new UnauthorizedAccessException();
    }
}
// Set the employee's salary. Only managers can do this.
void SetSalary( double ammount )
{
   if ( SecurityCallContext::CurrentCall->IsCallerInRole( "Manager"
 ) )
   {
      salary = ammount;
   }
   else
   {
      throw gcnew UnauthorizedAccessException;
   }
}
// Set the employee's salary. Only managers can do this.
public void SetSalary(double ammount) 
    throws System.UnauthorizedAccessException
{
    if (SecurityCallContext.get_CurrentCall().IsCallerInRole("Manager"))
 {
        salary = ammount;
    }
    else {
        throw new UnauthorizedAccessException();
    }
} //SetSalary
.NET Framework のセキュリティ.NET Frameworkセキュリティ
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照



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

辞書ショートカット

すべての辞書の索引

「SecurityCallContext.CurrentCall プロパティ」の関連用語

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

   

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



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

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

©2025 GRAS Group, Inc.RSS