Share via


ActivationArguments.ActivationContext Eigenschaft

Definition

Ruft den Aktivierungskontext für die manifestbasierte Aktivierung einer Anwendung ab.

public:
 property ActivationContext ^ ActivationContext { ActivationContext ^ get(); };
public ActivationContext ActivationContext { get; }
member this.ActivationContext : ActivationContext
Public ReadOnly Property ActivationContext As ActivationContext

Eigenschaftswert

Ein Objekt, das eine manifestbasierte Aktivierungsanwendung identifiziert.

Beispiele

Das folgende Codebeispiel zeigt, wie Sie den Wert der ActivationContext -Eigenschaft von ActivationArguments für eine manifestbasierte Anwendung abrufen.

Dieses Codebeispiel ist Teil eines größeren Beispiels, das für die ActivationArguments-Klasse bereitgestellt wird.

// Get the ActivationArguments from the SetupInformation property of the domain.
ActivationArguments activationArgs = AppDomain.CurrentDomain.SetupInformation.ActivationArguments;
// Get the ActivationContext from the ActivationArguments.
ActivationContext actContext = activationArgs.ActivationContext;
Console.WriteLine("The ActivationContext.Form property value is: " +
    activationArgs.ActivationContext.Form);
Dim ac As ActivationContext = AppDomain.CurrentDomain.ActivationContext
' Get the ActivationArguments from the SetupInformation property of the domain.
Dim activationArgs As ActivationArguments = AppDomain.CurrentDomain.SetupInformation.ActivationArguments
' Get the ActivationContext from the ActivationArguments.
Dim actContext As ActivationContext = activationArgs.ActivationContext
Console.WriteLine("The ActivationContext.Form property value is: " + _
 activationArgs.ActivationContext.Form.ToString())

Hinweise

Das ActivationContext -Objekt enthält einen ApplicationIdentity und bietet internen Zugriff auf das Anwendungsmanifest. Der Aktivierungskontext wird während der manifestbasierten Aktivierung verwendet, um die Domänenrichtlinie einzurichten und ein anwendungsbasiertes Sicherheitsmodell bereitzustellen.

Gilt für: