SecurityCallContext.CurrentCall プロパティ
アセンブリ: System.EnterpriseServices (system.enterpriseservices.dll 内)

セキュリティ呼び出しコンテキストを説明する 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(); } }


Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


- SecurityCallContext.CurrentCall プロパティのページへのリンク