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
특성

예제

다음 코드 예제에는 현재를 가져오는 방법을 보여 줍니다 ActivationArguments 에서 개체를 AppDomainSetup 에 대 한는 AppDomain 매니페스트 기반 애플리케이션입니다.

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 클래스입니다.

매니페스트 기반 활성화 모델 활성화에 대 한 어셈블리 보다는 애플리케이션 매니페스트를 사용합니다. 매니페스트는 애플리케이션, 종속성, 보안 요구 사항 및 등 완벽 하 게 설명 합니다. 매니페스트 모델, 특히 웹 애플리케이션의 어셈블리 기반 정품 인증 모델을 통해 몇 가지 장점이 있습니다. 예를 들어 매니페스트는 사용자를 애플리케이션 코드를 다운로드 하기 전에 실행을 허용할지 여부를 결정할 수 있도록 하는 애플리케이션의 보안 요구 사항을 포함 합니다. 또한 매니페스트는 애플리케이션 종속성에 대 한 정보를 포함합니다.

생성자

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)

적용 대상