ActivationArguments.ActivationContext Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets the activation context for manifest-based activation of an application.

Namespace:   System.Runtime.Hosting
Assembly:  mscorlib (in mscorlib.dll)

public ActivationContext ActivationContext { get; }

Property Value

Type: System.ActivationContext

An object that identifies a manifest-based activation application.

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.

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);

.NET Framework
Available since 2.0
Return to top
Show: