SecureEnvironment クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ユーザーのアクティブ化、ライセンス バインド、およびその他の権限管理操作のセキュリティで保護されたクライアント セッションを表します。
public ref class SecureEnvironment : IDisposable
[System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)]
public class SecureEnvironment : IDisposable
[<System.Security.SecurityCritical(System.Security.SecurityCriticalScope.Everything)>]
type SecureEnvironment = class
interface IDisposable
Public Class SecureEnvironment
Implements IDisposable
- 継承
-
SecureEnvironment
- 属性
- 実装
例
次の例は、 SecureEnvironment クラスの使用を示しています
string applicationManifest = "<manifest></manifest>";
if (File.Exists("rpc.xml"))
{
StreamReader manifestReader = File.OpenText("rpc.xml");
applicationManifest = manifestReader.ReadToEnd();
}
if (_secureEnv == null)
{
if (SecureEnvironment.IsUserActivated(new ContentUser(
_currentUserId, AuthenticationType.Windows)))
{
_secureEnv = SecureEnvironment.Create(
applicationManifest, new ContentUser(
_currentUserId, AuthenticationType.Windows));
}
else
{
_secureEnv = SecureEnvironment.Create(
applicationManifest,
AuthenticationType.Windows,
UserActivationMode.Permanent);
}
}
Dim applicationManifest As String = "<manifest></manifest>"
If File.Exists("rpc.xml") Then
Dim manifestReader As StreamReader = File.OpenText("rpc.xml")
applicationManifest = manifestReader.ReadToEnd()
End If
If _secureEnv Is Nothing Then
If SecureEnvironment.IsUserActivated(New ContentUser(_currentUserId, AuthenticationType.Windows)) Then
_secureEnv = SecureEnvironment.Create(applicationManifest, New ContentUser(_currentUserId, AuthenticationType.Windows))
Else
_secureEnv = SecureEnvironment.Create(applicationManifest, AuthenticationType.Windows, UserActivationMode.Permanent)
End If
End If
注釈
他の System.Security.RightsManagement の種類と同様に、 SecureEnvironment は完全信頼アプリケーションでのみ使用できます。
プロパティ
| 名前 | 説明 |
|---|---|
| ApplicationManifest |
SecureEnvironmentの作成時に指定されたApplicationManifestを取得します。 |
| User |
SecureEnvironmentの作成時に指定されたユーザーまたはユーザー グループを取得します。 |
メソッド
| 名前 | 説明 |
|---|---|
| Create(String, AuthenticationType, UserActivationMode) |
アプリケーション権限マニフェスト、 AuthenticationType、および UserActivationModeを指定して、セキュリティで保護されたクライアント セッションを作成します。 |
| Create(String, ContentUser) |
特定の権限マニフェストを使用して、指定したユーザーのセキュリティで保護されたクライアント セッションを作成します。 |
| Dispose() |
SecureEnvironmentによって使用されるすべてのリソースを解放します。 |
| Dispose(Boolean) |
SecureEnvironmentによって使用されるアンマネージ リソースを解放し、必要に応じてマネージド リソースを解放します。 |
| Equals(Object) |
指定したオブジェクトが現在のオブジェクトと等しいかどうかを判断します。 (継承元 Object) |
| GetActivatedUsers() |
アクティブ化されたユーザーの一覧を返します。 |
| GetHashCode() |
既定のハッシュ関数として機能します。 (継承元 Object) |
| GetType() |
現在のインスタンスの Type を取得します。 (継承元 Object) |
| IsUserActivated(ContentUser) |
権限が管理されているコンテンツにアクセスするために、特定のユーザーがアクティブ化されているかどうかを示します。 |
| MemberwiseClone() |
現在の Objectの簡易コピーを作成します。 (継承元 Object) |
| RemoveActivatedUser(ContentUser) |
指定したユーザーのライセンス認証を削除します。 |
| ToString() |
現在のオブジェクトを表す文字列を返します。 (継承元 Object) |