UserActivationMode UserActivationMode UserActivationMode UserActivationMode Enum

Definizione

Specifica il tipo di certificato per account con diritti (RAC, Rights Account Certificate) utente da richiedere per l'attivazione di Rights Management.Specifies the type of user Rights Account Certificate to request for rights management activation.

public enum class UserActivationMode
public enum UserActivationMode
type UserActivationMode = 
Public Enum UserActivationMode
Ereditarietà
UserActivationModeUserActivationModeUserActivationModeUserActivationMode

Campi

Permanent Permanent Permanent Permanent 0

Certificato per account con diritti permanente.A permanent Rights Account Certificate.

Temporary Temporary Temporary Temporary 1

Certificato per account con diritti temporaneo.A temporary Rights Account Certificate.

Esempi

Nell'esempio seguente viene illustrato come utilizzare questa enumerazione per creare un SecureEnvironmentoggetto.The following example shows how to use this enumeration to create a 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

Commenti

Usato come parametro per il metodo Create di un oggetto SecureEnvironment, UserActivationMode specifica di richiedere un Temporary certificato per Permanent l'account o con diritti.Used as a parameter to the Create method of a SecureEnvironment, UserActivationMode specifies to request either a Temporary or Permanent Rights Account Certificate.

Si applica a

Vedi anche