ActivationArguments.ActivationContext Свойство

Определение

Возвращает контекст активации, предназначенный для активации приложения на основе манифеста.

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

Значение свойства

Объект, определяющий приложение, активируемое на основе манифеста.

Примеры

В следующем примере кода показано, как получить значение ActivationContext свойства из ActivationArguments для приложения на основе манифеста.

Этот пример входит в состав более крупного примера использования класса ActivationArguments.

// 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())

Комментарии

Объект ActivationContext содержит ApplicationIdentity и предоставляет доступ только для внутреннего доступа к манифесту приложения. Контекст активации используется во время активации на основе манифеста для настройки политики домена и предоставления модели безопасности на основе приложений.

Применяется к