ActivationArguments.ActivationContext Egenskap
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
Hämtar aktiveringskontexten för manifestbaserad aktivering av ett program.
public:
property ActivationContext ^ ActivationContext { ActivationContext ^ get(); };
public ActivationContext ActivationContext { get; }
member this.ActivationContext : ActivationContext
Public ReadOnly Property ActivationContext As ActivationContext
Egenskapsvärde
Ett objekt som identifierar ett manifestbaserat aktiveringsprogram.
Exempel
I följande kodexempel visas hur du hämtar värdet ActivationContext för egenskapen från ActivationArguments för ett manifestbaserat program.
Det här kodexemplet är en del av ett större exempel för ActivationArguments klassen.
// 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())
Kommentarer
Objektet ActivationContext innehåller en ApplicationIdentity och ger åtkomst endast internt till programmanifestet. Aktiveringskontexten används under manifestbaserad aktivering för att konfigurera domänprincipen och tillhandahålla en programbaserad säkerhetsmodell.