ActivationArguments.ActivationContext Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the activation context for manifest-based activation of an application.
public:
property ActivationContext ^ ActivationContext { ActivationContext ^ get(); };
public ActivationContext ActivationContext { get; }
member this.ActivationContext : ActivationContext
Public ReadOnly Property ActivationContext As ActivationContext
Property Value
An object that identifies a manifest-based activation application.
Examples
The following code example shows how to obtain the value of the ActivationContext property from the ActivationArguments for a manifest-based application.
This code example is part of a larger example provided for the ActivationArguments class.
// 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())
Remarks
The ActivationContext object contains an ApplicationIdentity and provides internal-only access to the application manifest. The activation context is used during manifest-based activation to set up the domain policy and provide an application-based security model.