UserActivationMode 列挙型

定義

権限管理のアクティブ化を要求する場合に必要となる、ユーザーの権利アカウント証明書の種類を指定します。

public enum class UserActivationMode
public enum UserActivationMode
type UserActivationMode = 
Public Enum UserActivationMode
継承
UserActivationMode

フィールド

Permanent 0

永続的な権利アカウント証明書。

Temporary 1

一時的な権利アカウント証明書。

次の例は、この列挙を使用して .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

注釈

のメソッドのSecureEnvironmentパラメーターCreateとして使用され、 UserActivationMode 権限アカウント証明書Temporary``Permanent要求することを指定します。

適用対象

こちらもご覧ください