Share via


ActivationArguments クラス

定義

アプリケーションのマニフェストに基づくアクティベーション用のデータを提供します。 このクラスは継承できません。

public ref class ActivationArguments sealed
public ref class ActivationArguments sealed : System::Security::Policy::EvidenceBase
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class ActivationArguments
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class ActivationArguments : System.Security.Policy.EvidenceBase
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type ActivationArguments = class
[<System.Runtime.InteropServices.ComVisible(true)>]
[<System.Serializable>]
type ActivationArguments = class
    inherit EvidenceBase
Public NotInheritable Class ActivationArguments
Public NotInheritable Class ActivationArguments
Inherits EvidenceBase
継承
ActivationArguments
継承
ActivationArguments
属性

次のコード例は、マニフェスト ベースのアプリケーションの の からAppDomainSetupAppDomain現在ActivationArgumentsの オブジェクトを取得する方法を示しています。

using System;
using System.Collections;
using System.Text;
using System.Security.Policy;
using System.Reflection;
using System.Security;
using System.Runtime.Hosting;

namespace ActivationContextSample
{
    public class Program : MarshalByRefObject
    {
        public static void Main(string[] args)
        {
            // Get the AppDomainManager from the current domain.
            AppDomainManager domainMgr = AppDomain.CurrentDomain.DomainManager;
            // Get the ApplicationActivator from the AppDomainManager.
            ApplicationActivator appActivator = domainMgr.ApplicationActivator;
            Console.WriteLine("Assembly qualified name from the application activator.");
            Console.WriteLine(appActivator.GetType().AssemblyQualifiedName);
            // 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);
            Console.Read();
        }
    
        public void Run()
        {
            Main(new string[] { });
            Console.ReadLine();
        }
    }
}
Imports System.Collections
Imports System.Text
Imports System.Security.Policy
Imports System.Reflection
Imports System.Security
Imports System.Security.Permissions
Imports System.Runtime.Hosting



Public Class Program
    Inherits MarshalByRefObject

    <SecurityPermission(SecurityAction.LinkDemand, ControlDomainPolicy:=True)> _
    Public Shared Sub Main(ByVal args() As String)
        ' Get the AppDomainManager from the current domain.
        Dim domainMgr As AppDomainManager = AppDomain.CurrentDomain.DomainManager
        ' Get the ApplicationActivator from the AppDomainManager.
        Dim appActivator As ApplicationActivator = domainMgr.ApplicationActivator
        Console.WriteLine("Assembly qualified name from the application activator.")
        Console.WriteLine(appActivator.GetType().AssemblyQualifiedName)
        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())
        Console.Read()

    End Sub

    <SecurityPermission(SecurityAction.LinkDemand, ControlDomainPolicy:=True)> _
    Public Sub Run()
        Main(New String() {})
        Console.ReadLine()

    End Sub
End Class

注釈

クラスは ActivationArguments 、 クラスによって AppDomainSetup 使用されます。

マニフェスト ベースのアクティブ化モデルでは、アクティブ化にアセンブリではなくアプリケーション マニフェストが使用されます。 マニフェストは、アプリケーション、その依存関係、セキュリティ要件などを完全に記述します。 マニフェスト モデルには、特に Web アプリケーションの場合、アセンブリ ベースのアクティブ化モデルよりもいくつかの利点があります。 たとえば、マニフェストにはアプリケーションのセキュリティ要件が含まれています。これにより、ユーザーはコードをダウンロードする前にアプリケーションの実行を許可するかどうかを決定できます。 マニフェストには、アプリケーションの依存関係に関する情報も含まれています。

コンストラクター

ActivationArguments(ActivationContext)

アクティベーション コンテキストを指定して、ActivationArguments クラスの新しいインスタンスを初期化します。

ActivationArguments(ActivationContext, String[])

アクティベーション コンテキストとアクティベーション データを指定して、ActivationArguments クラスの新しいインスタンスを初期化します。

ActivationArguments(ApplicationIdentity)

アプリケーション ID を指定して、ActivationArguments クラスの新しいインスタンスを初期化します。

ActivationArguments(ApplicationIdentity, String[])

アプリケーション ID とアクティベーション データを指定して、ActivationArguments クラスの新しいインスタンスを初期化します。

プロパティ

ActivationContext

アプリケーションのマニフェストに基づくアクティベーション用のアクティベーション コンテキストを取得します。

ActivationData

ホストからアクティベーション データを取得します。

ApplicationIdentity

マニフェストに基づいてアクティベートされるアプリケーションのアプリケーション ID を取得します。

メソッド

Clone()

現在の ActivationArguments オブジェクトのコピーを生成します。

Equals(Object)

指定されたオブジェクトが現在のオブジェクトと等しいかどうかを判断します。

(継承元 Object)
GetHashCode()

既定のハッシュ関数として機能します。

(継承元 Object)
GetType()

現在のインスタンスの Type を取得します。

(継承元 Object)
MemberwiseClone()

現在の Object の簡易コピーを作成します。

(継承元 Object)
ToString()

現在のオブジェクトを表す文字列を返します。

(継承元 Object)

適用対象