共用方式為


ActivationArguments.ActivationContext 屬性

定義

取得啟動內容,用於應用程式的資訊清單架構啟動過程。

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

屬性值

物件,識別以資訊清單為基礎的啟動應用程式。

範例

下列程式碼範例示範如何從 ActivationArguments 取得資訊清單型應用程式的 屬性值 ActivationContext

此程式碼範例是針對 類別提供的較大範例的 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 並提供應用程式資訊清單的僅限內部存取權。 在以資訊清單為基礎的啟用期間,會使用啟用內容來設定網域原則,並提供以應用程式為基礎的安全性模型。

適用於