AppDomain 클래스

정의

애플리케이션이 실행되는 격리된 환경인 애플리케이션 도메인을 나타냅니다. 이 클래스는 상속될 수 없습니다.

public ref class AppDomain sealed : MarshalByRefObject
public ref class AppDomain : MarshalByRefObject
public ref class AppDomain sealed : MarshalByRefObject, _AppDomain, System::Security::IEvidenceFactory
public sealed class AppDomain : MarshalByRefObject
public class AppDomain : MarshalByRefObject
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
public sealed class AppDomain : MarshalByRefObject, _AppDomain, System.Security.IEvidenceFactory
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class AppDomain : MarshalByRefObject, _AppDomain, System.Security.IEvidenceFactory
type AppDomain = class
    inherit MarshalByRefObject
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
type AppDomain = class
    inherit MarshalByRefObject
    interface _AppDomain
    interface IEvidenceFactory
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.ComVisible(true)>]
type AppDomain = class
    inherit MarshalByRefObject
    interface _AppDomain
    interface IEvidenceFactory
Public NotInheritable Class AppDomain
Inherits MarshalByRefObject
Public Class AppDomain
Inherits MarshalByRefObject
Public NotInheritable Class AppDomain
Inherits MarshalByRefObject
Implements _AppDomain, IEvidenceFactory
상속
특성
구현

예제

이 예제에서는 새 AppDomain를 만들고 새 에서 형식을 인스턴스화하고 해당 AppDomain형식의 개체와 통신하는 방법을 보여줍니다. 또한 이 예제에서는 개체가 가비지 수집되도록 하는 를 언로드 AppDomain 하는 방법을 보여 있습니다.

using namespace System;
using namespace System::Reflection;
using namespace System::Threading;
using namespace System::Security::Policy;

// Because this class is derived from MarshalByRefObject, a proxy 
// to a MarshalByRefType object can be returned across an AppDomain 
// boundary.
ref class MarshalByRefType : MarshalByRefObject
{
public:
    //  Call this method via a proxy.
    void SomeMethod(String^ callingDomainName)
    {
        // Get this AppDomain's settings and display some of them.
        AppDomainSetup^ ads = AppDomain::CurrentDomain->SetupInformation;
        Console::WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}", 
            ads->ApplicationName, 
            ads->ApplicationBase, 
            ads->ConfigurationFile
        );

        // Display the name of the calling AppDomain and the name 
        // of the second domain.
        // NOTE: The application's thread has transitioned between 
        // AppDomains.
        Console::WriteLine("Calling from '{0}' to '{1}'.", 
            callingDomainName, 
            Thread::GetDomain()->FriendlyName
        );
    };
};

void main()
{
    // Get and display the friendly name of the default AppDomain.
    String^ callingDomainName = Thread::GetDomain()->FriendlyName;
    Console::WriteLine(callingDomainName);

    // Get and display the full name of the EXE assembly.
    String^ exeAssembly = Assembly::GetEntryAssembly()->FullName;
    Console::WriteLine(exeAssembly);

    // Construct and initialize settings for a second AppDomain.
    AppDomainSetup^ ads = gcnew AppDomainSetup();
    ads->ApplicationBase = AppDomain::CurrentDomain->BaseDirectory;

    ads->DisallowBindingRedirects = false;
    ads->DisallowCodeDownload = true;
    ads->ConfigurationFile = 
        AppDomain::CurrentDomain->SetupInformation->ConfigurationFile;

    // Create the second AppDomain.
    AppDomain^ ad2 = AppDomain::CreateDomain("AD #2", 
        AppDomain::CurrentDomain->Evidence, ads);

    // Create an instance of MarshalbyRefType in the second AppDomain. 
    // A proxy to the object is returned.
    MarshalByRefType^ mbrt = 
        (MarshalByRefType^) ad2->CreateInstanceAndUnwrap(
            exeAssembly, 
            MarshalByRefType::typeid->FullName
        );

    // Call a method on the object via the proxy, passing the 
    // default AppDomain's friendly name in as a parameter.
    mbrt->SomeMethod(callingDomainName);

    // Unload the second AppDomain. This deletes its object and 
    // invalidates the proxy object.
    AppDomain::Unload(ad2);
    try
    {
        // Call the method again. Note that this time it fails 
        // because the second AppDomain was unloaded.
        mbrt->SomeMethod(callingDomainName);
        Console::WriteLine("Sucessful call.");
    }
    catch(AppDomainUnloadedException^)
    {
        Console::WriteLine("Failed call; this is expected.");
    }
}

/* This code produces output similar to the following: 

AppDomainX.exe
AppDomainX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
AppName=, AppBase=C:\AppDomain\bin, ConfigFile=C:\AppDomain\bin\AppDomainX.exe.config
Calling from 'AppDomainX.exe' to 'AD #2'.
Failed call; this is expected.
 */
using System;
using System.Reflection;
using System.Threading;

class Module1
{
    public static void Main()
    {
        // Get and display the friendly name of the default AppDomain.
        string callingDomainName = Thread.GetDomain().FriendlyName;
        Console.WriteLine(callingDomainName);

        // Get and display the full name of the EXE assembly.
        string exeAssembly = Assembly.GetEntryAssembly().FullName;
        Console.WriteLine(exeAssembly);

        // Construct and initialize settings for a second AppDomain.
        AppDomainSetup ads = new AppDomainSetup();
        ads.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory;

        ads.DisallowBindingRedirects = false;
        ads.DisallowCodeDownload = true;
        ads.ConfigurationFile =
            AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;

        // Create the second AppDomain.
        AppDomain ad2 = AppDomain.CreateDomain("AD #2", null, ads);

        // Create an instance of MarshalbyRefType in the second AppDomain.
        // A proxy to the object is returned.
        MarshalByRefType mbrt =
            (MarshalByRefType) ad2.CreateInstanceAndUnwrap(
                exeAssembly,
                typeof(MarshalByRefType).FullName
            );

        // Call a method on the object via the proxy, passing the
        // default AppDomain's friendly name in as a parameter.
        mbrt.SomeMethod(callingDomainName);

        // Unload the second AppDomain. This deletes its object and
        // invalidates the proxy object.
        AppDomain.Unload(ad2);
        try
        {
            // Call the method again. Note that this time it fails
            // because the second AppDomain was unloaded.
            mbrt.SomeMethod(callingDomainName);
            Console.WriteLine("Sucessful call.");
        }
        catch(AppDomainUnloadedException)
        {
            Console.WriteLine("Failed call; this is expected.");
        }
    }
}

// Because this class is derived from MarshalByRefObject, a proxy
// to a MarshalByRefType object can be returned across an AppDomain
// boundary.
public class MarshalByRefType : MarshalByRefObject
{
    //  Call this method via a proxy.
    public void SomeMethod(string callingDomainName)
    {
        // Get this AppDomain's settings and display some of them.
        AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation;
        Console.WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}",
            ads.ApplicationName,
            ads.ApplicationBase,
            ads.ConfigurationFile
        );

        // Display the name of the calling AppDomain and the name
        // of the second domain.
        // NOTE: The application's thread has transitioned between
        // AppDomains.
        Console.WriteLine("Calling from '{0}' to '{1}'.",
            callingDomainName,
            Thread.GetDomain().FriendlyName
        );
    }
}

/* This code produces output similar to the following:

AppDomainX.exe
AppDomainX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
AppName=, AppBase=C:\AppDomain\bin, ConfigFile=C:\AppDomain\bin\AppDomainX.exe.config
Calling from 'AppDomainX.exe' to 'AD #2'.
Failed call; this is expected.
 */
open System
open System.Reflection
open System.Threading

// Because this class is derived from MarshalByRefObject, a proxy
// to a MarshalByRefType object can be returned across an AppDomain
// boundary.
type MarshalByRefType() =
    inherit MarshalByRefObject()
    
    //  Call this method via a proxy.
    member _.SomeMethod(callingDomainName) =
        // Get this AppDomain's settings and display some of them.
        let ads = AppDomain.CurrentDomain.SetupInformation
        printfn $"AppName={ads.ApplicationName}, AppBase={ads.ApplicationBase}, ConfigFile={ads.ConfigurationFile}"

        // Display the name of the calling AppDomain and the name
        // of the second domain.
        // NOTE: The application's thread has transitioned between
        // AppDomains.
        printfn $"Calling from '{callingDomainName}' to '{Thread.GetDomain().FriendlyName}'."

// Get and display the friendly name of the default AppDomain.
let callingDomainName = Thread.GetDomain().FriendlyName
printfn $"{callingDomainName}"

// Get and display the full name of the EXE assembly.
let exeAssembly = Assembly.GetEntryAssembly().FullName
printfn $"{exeAssembly}"

// Construct and initialize settings for a second AppDomain.
let ads = AppDomainSetup()
ads.ApplicationBase <- AppDomain.CurrentDomain.BaseDirectory

ads.DisallowBindingRedirects <- false
ads.DisallowCodeDownload <- true
ads.ConfigurationFile <-
    AppDomain.CurrentDomain.SetupInformation.ConfigurationFile

// Create the second AppDomain.
let ad2 = AppDomain.CreateDomain("AD #2", null, ads)

// Create an instance of MarshalbyRefType in the second AppDomain.
// A proxy to the object is returned.
let mbrt =
    ad2.CreateInstanceAndUnwrap(
        exeAssembly,
        typeof<MarshalByRefType>.FullName) :?> MarshalByRefType

// Call a method on the object via the proxy, passing the
// default AppDomain's friendly name in as a parameter.
mbrt.SomeMethod callingDomainName

// Unload the second AppDomain. This deletes its object and
// invalidates the proxy object.
AppDomain.Unload ad2
try
    // Call the method again. Note that this time it fails
    // because the second AppDomain was unloaded.
    mbrt.SomeMethod callingDomainName
    printfn "Sucessful call."
with :? AppDomainUnloadedException ->
    printfn "Failed call this is expected."

(* This code produces output similar to the following:

AppDomainX.exe
AppDomainX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
AppName=, AppBase=C:\AppDomain\bin, ConfigFile=C:\AppDomain\bin\AppDomainX.exe.config
Calling from 'AppDomainX.exe' to 'AD #2'.
Failed call this is expected.
 *)
Imports System.Reflection
Imports System.Threading

Module Module1
    Sub Main()

        ' Get and display the friendly name of the default AppDomain.
        Dim callingDomainName As String = Thread.GetDomain().FriendlyName
        Console.WriteLine(callingDomainName)

        ' Get and display the full name of the EXE assembly.
        Dim exeAssembly As String = [Assembly].GetEntryAssembly().FullName
        Console.WriteLine(exeAssembly)

        ' Construct and initialize settings for a second AppDomain.
        Dim ads As New AppDomainSetup()
        ads.ApplicationBase = AppDomain.CurrentDomain.BaseDirectory
        ads.DisallowBindingRedirects = False
        ads.DisallowCodeDownload = True
        ads.ConfigurationFile = _
            AppDomain.CurrentDomain.SetupInformation.ConfigurationFile

        ' Create the second AppDomain.
        Dim ad2 As AppDomain = AppDomain.CreateDomain("AD #2", Nothing, ads)

        ' Create an instance of MarshalbyRefType in the second AppDomain. 
        ' A proxy to the object is returned.
        Dim mbrt As MarshalByRefType = CType( _
            ad2.CreateInstanceAndUnwrap(exeAssembly, _
                 GetType(MarshalByRefType).FullName), MarshalByRefType)

        ' Call a method on the object via the proxy, passing the default 
        ' AppDomain's friendly name in as a parameter.
        mbrt.SomeMethod(callingDomainName)

        ' Unload the second AppDomain. This deletes its object and 
        ' invalidates the proxy object.
        AppDomain.Unload(ad2)
        Try
            ' Call the method again. Note that this time it fails because 
            ' the second AppDomain was unloaded.
            mbrt.SomeMethod(callingDomainName)
            Console.WriteLine("Sucessful call.")
        Catch e As AppDomainUnloadedException
            Console.WriteLine("Failed call; this is expected.")
        End Try

    End Sub
End Module

' Because this class is derived from MarshalByRefObject, a proxy 
' to a MarshalByRefType object can be returned across an AppDomain 
' boundary.
Public Class MarshalByRefType
    Inherits MarshalByRefObject

    '  Call this method via a proxy.
    Public Sub SomeMethod(ByVal callingDomainName As String)

        ' Get this AppDomain's settings and display some of them.
        Dim ads As AppDomainSetup = AppDomain.CurrentDomain.SetupInformation
        Console.WriteLine("AppName={0}, AppBase={1}, ConfigFile={2}", _
            ads.ApplicationName, ads.ApplicationBase, ads.ConfigurationFile)

        ' Display the name of the calling AppDomain and the name 
        ' of the second domain.
        ' NOTE: The application's thread has transitioned between 
        ' AppDomains.
        Console.WriteLine("Calling from '{0}' to '{1}'.", _
            callingDomainName, Thread.GetDomain().FriendlyName)
    End Sub
End Class

'This code produces output similar to the following:
' 
' AppDomainX.exe
' AppDomainX, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
' AppName=, AppBase=C:\AppDomain\bin, ConfigFile=C:\AppDomain\bin\AppDomainX.exe.config
' Calling from 'AppDomainX.exe' to 'AD #2'.
' Failed call; this is expected.

설명

으로 표현 되는 애플리케이션 도메인 AppDomain 개체를 관리 되는 코드를 실행 하는 것에 대 한 격리, 언로드 및 보안 경계를 제공할 수 있습니다.

  • 애플리케이션 도메인을 사용 하 여 프로세스를 중단 시킬 수 있는 작업을 격리 하기. 작업을 실행하는 의 AppDomain 상태가 불안정 AppDomain 해지면 프로세스에 영향을 주지 않고 을 언로드할 수 있습니다. 이는 프로세스를 다시 시작하지 않고 장기간 실행해야 하는 경우에 중요합니다. 또한 데이터를 공유 해야 하는 작업을 격리 하기 애플리케이션 도메인을 사용할 수 있습니다.

  • 어셈블리 기본 애플리케이션 도메인에 로드 된 경우 프로세스를 실행 하는 동안 메모리에서 언로드할 수 없습니다. 그러나을 로드 하는 어셈블리를 실행 하는 두 번째 애플리케이션 도메인을 열면 해당 애플리케이션 도메인이 언로드될 때 어셈블리 로드 아닙니다. 이 기술을 사용하여 종종 큰 DLL을 사용하는 장기 실행 프로세스의 작업 집합을 최소화합니다.

참고

.NET Core에서 AppDomain 구현은 의도적으로 제한되며 격리, 언로드 또는 보안 경계를 제공하지 않습니다. .NET Core의 경우 정확히 하나의 AppDomain가 있습니다. 격리 및 언로딩은 을 통해 AssemblyLoadContext제공됩니다. 보안 경계는 프로세스 경계 및 적절한 원격 기술을 통해 제공해야 합니다.

여러 애플리케이션 도메인은 단일 프로세스;에서 실행할 수 있습니다. 그러나 애플리케이션 도메인과 스레드 간에 한 일 상관 하지 않습니다. 여러 스레드를 단일 애플리케이션 도메인에 속할 수 있습니다 하 고 스레드는 단일 애플리케이션 도메인에서 실행 동안 지정 된 스레드가 지정된 된 시간에 단일 애플리케이션 도메인에 한정 되지 않습니다.

애플리케이션 도메인을 사용 하 여 만들어집니다는 CreateDomain 메서드. AppDomain 인스턴스는 어셈블리(Assembly)를 로드하고 실행하는 데 사용됩니다. AppDomain 가 더 이상 사용되지 않는 경우 언로드할 수 있습니다.

AppDomain 클래스 또는 처리 되지 않은 예외가 throw 되 면 애플리케이션 도메인으로 로드 됩니다 하는 경우 어셈블리 로드 될 때 응답 하도록 애플리케이션을 사용 하도록 설정 하는 이벤트의 집합을 구현 합니다.

애플리케이션 도메인 사용에 대 한 자세한 내용은 참조 하세요. 애플리케이션 도메인합니다.

이 클래스는 MarshalByRefObject, _AppDomainIEvidenceFactory 인터페이스를 구현합니다.

개체에 대한 AppDomain 원격 래퍼를 만들면 안 됩니다. 이렇게 하면 원격 액세스와 같은 CreateInstance 메서드를 노출하고 해당 AppDomain에 대한 코드 액세스 보안을 효과적으로 삭제하는 에 대한 원격 참조를 게시할 AppDomain수 있습니다. 원격 AppDomain 에 연결하는 악의적인 클라이언트는 자체 액세스 권한이 있는 모든 리소스에 AppDomain 액세스할 수 있습니다. 확장 MarshalByRefObject 되고 악의적인 클라이언트가 보안 시스템을 우회하는 데 사용할 수 있는 메서드를 구현하는 모든 형식에 대한 원격 래퍼를 만들지 마세요.

주의

기본값은 AppDomainSetup.DisallowCodeDownload 속성은 false합니다. 이 설정은 서비스에 안전하지 않습니다. 서비스가 부분적으로 신뢰할 수 있는 코드를 다운로드하지 못하도록 하려면 이 속성을 로 true설정합니다.

속성

ActivationContext

현재 애플리케이션 도메인의 활성화 컨텍스트를 가져옵니다.

ApplicationIdentity

애플리케이션 도메인에서 애플리케이션의 ID를 가져옵니다.

ApplicationTrust

애플리케이션에 부여된 권한 및 해당 애플리케이션을 실행할 수 있는 신뢰 수준이 있는지를 설명하는 정보를 가져옵니다.

BaseDirectory

어셈블리 확인자에서 어셈블리를 조사하는 데 사용하는 기본 디렉터리를 가져옵니다.

CurrentDomain

현재 Thread에 대한 현재 애플리케이션 도메인을 가져옵니다.

DomainManager

애플리케이션 도메인이 초기화될 때 호스트에서 제공한 도메인 관리자를 가져옵니다.

DynamicDirectory

어셈블리 확인자에서 동적으로 만든 어셈블리를 조사하는 데 사용하는 디렉터리를 가져옵니다.

Evidence

이 애플리케이션 도메인과 관련된 Evidence를 가져옵니다.

FriendlyName

이 애플리케이션 도메인의 이름을 가져옵니다.

Id

프로세스 내 애플리케이션 도메인을 고유하게 식별하는 정수를 가져옵니다.

IsFullyTrusted

현재 애플리케이션 도메인에 로드된 어셈블리가 완전 신뢰로 실행되는지를 나타내는 값을 가져옵니다.

IsHomogenous

애플리케이션 도메인에 로드된 모든 어셈블리에 부여된 권한 집합이 현재 애플리케이션 도메인에 있는지를 나타내는 값을 가져옵니다.

MonitoringIsEnabled

현재 프로세스에 애플리케이션 도메인의 CPU 및 메모리 모니터링을 사용할 수 있는지를 나타내는 값을 가져오거나 설정합니다. 프로세스에 모니터링을 사용할 수 있는 경우 사용하지 못하도록 설정할 수 없습니다.

MonitoringSurvivedMemorySize

현재 애플리케이션 도메인에서 참조하도록 알려진 마지막 컬렉션 후에도 유지되는 바이트 수를 가져옵니다.

MonitoringSurvivedProcessMemorySize

프로세스의 모든 애플리케이션 도메인에 대한 마지막 컬렉션에서 유지된 총 바이트 수를 가져옵니다.

MonitoringTotalAllocatedMemorySize

애플리케이션 도메인이 만들어진 후 실행된 모든 메모리 할당의 총 크기(바이트)를 수집된 메모리의 크기를 제외하지 않고 가져옵니다.

MonitoringTotalProcessorTime

프로세스가 시작된 후 현재 애플리케이션 도메인에서 실행되는 동안 모든 스레드에서 사용된 총 프로세서 시간을 가져옵니다.

PermissionSet
사용되지 않음.

샌드박스가 적용된 애플리케이션 도메인의 권한 집합을 가져옵니다.

RelativeSearchPath

어셈블리 확인자에서 프라이빗 어셈블리를 조사할 기본 디렉터리 아래의 경로를 가져옵니다.

SetupInformation

이 인스턴스의 애플리케이션 도메인 구성 정보를 가져옵니다.

ShadowCopyFiles

애플리케이션 도메인이 파일을 섀도 복사하도록 구성되어 있는지를 나타내는 표시를 가져옵니다.

메서드

AppendPrivatePath(String)
사용되지 않음.
사용되지 않음.
사용되지 않음.

지정된 디렉터리 이름을 전용 경로 목록에 추가합니다.

ApplyPolicy(String)

정책이 적용된 후 어셈블리 표시 이름을 반환합니다.

ClearPrivatePath()
사용되지 않음.
사용되지 않음.
사용되지 않음.

프라이빗 어셈블리의 위치를 지정하는 경로를 빈 문자열("")로 다시 설정합니다.

ClearShadowCopyPath()
사용되지 않음.
사용되지 않음.
사용되지 않음.

섀도 복사된 어셈블리를 포함하는 디렉터리 목록을 빈 문자열("")로 다시 설정합니다.

CreateComInstanceFrom(String, String)

지정한 COM 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식 및 형식 이름을 포함하는 어셈블리가 포함된 파일 이름을 지정합니다.

CreateComInstanceFrom(String, String, Byte[], AssemblyHashAlgorithm)

지정한 COM 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식 및 형식 이름을 포함하는 어셈블리가 포함된 파일 이름을 지정합니다.

CreateDomain(String)
사용되지 않음.

지정한 이름을 가진 새 애플리케이션 도메인을 만듭니다.

CreateDomain(String, Evidence)

제공된 증명 정보를 사용하여 지정한 이름을 가진 새 애플리케이션 도메인을 만듭니다.

CreateDomain(String, Evidence, AppDomainSetup)

지정한 이름, 증명 정보 및 애플리케이션 도메인 설치 정보를 사용하여 새 애플리케이션 도메인을 만듭니다.

CreateDomain(String, Evidence, AppDomainSetup, PermissionSet, StrongName[])

지정한 이름, 증명 정보, 애플리케이션 도메인 설치 정보, 기본 권한 집합 및 완전히 신뢰할 수 있는 어셈블리의 배열을 사용하여 새 애플리케이션 도메인을 만듭니다.

CreateDomain(String, Evidence, String, String, Boolean)

어셈블리의 섀도 복사본이 애플리케이션 도메인에 로드되는지를 지정하는 매개 변수, 증명 정보, 애플리케이션 기본 경로 및 상대 검색 경로를 사용하여 지정한 이름을 가진 새 애플리케이션 도메인을 만듭니다.

CreateDomain(String, Evidence, String, String, Boolean, AppDomainInitializer, String[])

어셈블리의 섀도 복사본이 애플리케이션 도메인에 로드되는지를 지정하는 매개 변수, 증명 정보, 애플리케이션 기본 경로 및 상대 검색 경로를 사용하여 지정한 이름을 가진 새 애플리케이션 도메인을 만듭니다. 애플리케이션 도메인이 초기화될 때 호출되는 콜백 메서드와 콜백 메서드를 전달할 문자열 인수의 배열을 지정합니다.

CreateInstance(String, String)

지정된 어셈블리에 정의되어 있는 지정된 형식의 새 인스턴스를 만듭니다.

CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[])

지정된 어셈블리에 정의되어 있는 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 바인더, 바인딩 플래그, 생성자 인수, 인수 해석에 사용되는 문화권별 정보 및 선택적 활성화 특성을 지정합니다.

CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)
사용되지 않음.

지정된 어셈블리에 정의되어 있는 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수에서는 바인더, 바인딩 플래그, 생성자 인수, 인수 해석에 사용되는 문화권별 정보, 활성화 특성 및 형식을 만들기 위한 인증을 지정합니다.

CreateInstance(String, String, Object[])

지정된 어셈블리에 정의되어 있는 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수에서는 활성화 특성의 배열을 지정합니다.

CreateInstanceAndUnwrap(String, String)

지정한 형식의 새 인스턴스를 만듭니다. 매개 변수에서는 형식이 정의되는 어셈블리와 해당 형식의 이름을 지정합니다.

CreateInstanceAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[])

형식 이름의 대/소문자를 구분할지 여부, 만들 형식을 선택하는 데 사용되는 바인더와 바인딩 특성, 생성자의 인수, 문화권 및 활성화 특성을 지정하여, 지정한 어셈블리에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)
사용되지 않음.

지정한 형식의 새 인스턴스를 만듭니다. 매개 변수에서는 형식의 이름 및 형식을 찾고 만들 수 있는 방법을 지정합니다.

CreateInstanceAndUnwrap(String, String, Object[])

지정한 형식의 새 인스턴스를 만듭니다. 매개 변수에서는 형식이 정의되는 어셈블리, 해당 형식의 이름 및 활성화 특성의 배열을 지정합니다.

CreateInstanceFrom(String, String)

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFrom(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[])

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFrom(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)
사용되지 않음.

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFrom(String, String, Object[])

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFromAndUnwrap(String, String)

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFromAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[])

형식 이름의 대/소문자를 구분할지 여부, 만들 형식을 선택하는 데 사용되는 바인더와 바인딩 특성, 생성자의 인수, 문화권 및 활성화 특성을 지정하여, 지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFromAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence)
사용되지 않음.

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateInstanceFromAndUnwrap(String, String, Object[])

지정한 어셈블리 파일에 정의된 지정한 형식의 새 인스턴스를 만듭니다.

CreateObjRef(Type)

원격 개체와 통신하는 데 사용되는 프록시 생성에 필요한 모든 관련 정보가 들어 있는 개체를 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess)

지정한 이름 및 액세스 모드를 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, Evidence)
사용되지 않음.

지정한 이름, 액세스 모드 및 증명 정보를 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, Evidence, PermissionSet, PermissionSet, PermissionSet)
사용되지 않음.

지정한 이름, 액세스 모드, 증명 정보 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, IEnumerable<CustomAttributeBuilder>)

지정한 이름, 액세스 모드 및 사용자 지정 특성을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, IEnumerable<CustomAttributeBuilder>, SecurityContextSource)

지정한 이름, 액세스 모드 및 사용자 지정 특성과 보안 컨텍스트에 대해 지정한 소스를 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, PermissionSet, PermissionSet, PermissionSet)
사용되지 않음.

지정한 이름, 액세스 모드 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String)

지정한 이름, 액세스 모드 및 스토리지 디렉터리를 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Boolean, IEnumerable<CustomAttributeBuilder>)

지정한 이름, 액세스 모드, 스토리지 디렉터리 및 동기화 옵션을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence)
사용되지 않음.

지정한 이름, 액세스 모드, 스토리지 디렉터리 및 증명 정보를 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet)
사용되지 않음.

지정한 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean)
사용되지 않음.

지정한 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보, 권한 요청 및 동기화 옵션을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean, IEnumerable<CustomAttributeBuilder>)
사용되지 않음.

지정한 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보, 권한 요청, 동기화 옵션 및 사용자 지정 특성을 사용하여 동적 어셈블리를 정의합니다.

DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, PermissionSet, PermissionSet, PermissionSet)
사용되지 않음.

지정한 이름, 액세스 모드, 스토리지 디렉터리 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다.

DoCallBack(CrossAppDomainDelegate)

지정한 대리자에서 식별한 다른 애플리케이션 도메인에 있는 코드를 실행합니다.

Equals(Object)

지정된 개체가 현재 개체와 같은지 확인합니다.

(다음에서 상속됨 Object)
ExecuteAssembly(String)

지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssembly(String, Evidence)
사용되지 않음.

지정한 증명 정보를 사용하여 지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssembly(String, Evidence, String[])
사용되지 않음.

지정한 증명 정보 및 인수를 사용하여 지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssembly(String, Evidence, String[], Byte[], AssemblyHashAlgorithm)
사용되지 않음.

지정한 증명 정보, 인수, 해시 값 및 해시 알고리즘을 사용하여 지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssembly(String, String[])

지정한 인수를 사용하여 지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm)
사용되지 않음.

지정한 인수, 해시 값 및 해시 알고리즘을 사용하여 지정한 파일에 포함된 어셈블리를 실행합니다.

ExecuteAssemblyByName(AssemblyName, Evidence, String[])
사용되지 않음.

지정한 증거와 인수를 사용하여 AssemblyName이 지정된 어셈블리를 실행합니다.

ExecuteAssemblyByName(AssemblyName, String[])

지정한 인수를 사용하여 AssemblyName이 지정된 어셈블리를 실행합니다.

ExecuteAssemblyByName(String)

표시 이름이 지정된 어셈블리를 실행합니다.

ExecuteAssemblyByName(String, Evidence)
사용되지 않음.

지정한 증명 정보를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다.

ExecuteAssemblyByName(String, Evidence, String[])
사용되지 않음.

지정한 증명 정보와 인수를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다.

ExecuteAssemblyByName(String, String[])

지정한 인수를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다.

GetAssemblies()

이 애플리케이션 도메인의 실행 컨텍스트에 로드된 어셈블리를 가져옵니다.

GetCurrentThreadId()
사용되지 않음.
사용되지 않음.
사용되지 않음.
사용되지 않음.

현재 스레드 식별자를 가져옵니다.

GetData(String)

지정한 이름에 대해 현재 애플리케이션 도메인에 저장된 값을 가져옵니다.

GetHashCode()

기본 해시 함수로 작동합니다.

(다음에서 상속됨 Object)
GetLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 현재의 수명 서비스 개체를 검색합니다.

(다음에서 상속됨 MarshalByRefObject)
GetType()

현재 인스턴스의 형식을 가져옵니다.

GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
InitializeLifetimeService()

임대가 만들어지는 것을 방지하여 AppDomain에 영구적 수명을 제공합니다.

InitializeLifetimeService()
사용되지 않음.

이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다.

(다음에서 상속됨 MarshalByRefObject)
IsCompatibilitySwitchSet(String)

호환성 스위치가 설정되어 있는지를 확인하고 설정되어 있으면 지정한 호환성 스위치가 설정되어 있는지를 나타내는 nullable 부울 값을 가져옵니다.

IsDefaultAppDomain()

애플리케이션 도메인이 해당 프로세스에 대한 기본 애플리케이션 도메인인지를 나타내는 값을 반환합니다.

IsFinalizingForUnload()

이 애플리케이션 도메인의 언로드 여부 및 공용 언어 런타임에서 이 애플리케이션 도메인에 포함된 개체를 종료하고 있는지를 나타냅니다.

Load(AssemblyName)

AssemblyName이 지정된 Assembly를 로드합니다.

Load(AssemblyName, Evidence)
사용되지 않음.

AssemblyName이 지정된 Assembly를 로드합니다.

Load(Byte[])

내보낸 Assembly가 들어 있는 COFF(Common Object File Format) 기반 이미지를 사용한 Assembly를 로드합니다.

Load(Byte[], Byte[])

내보낸 Assembly가 들어 있는 COFF(Common Object File Format) 기반 이미지를 사용한 Assembly를 로드합니다. Assembly에 대한 기호를 나타내는 원시 바이트도 로드됩니다.

Load(Byte[], Byte[], Evidence)
사용되지 않음.

내보낸 Assembly가 들어 있는 COFF(Common Object File Format) 기반 이미지를 사용한 Assembly를 로드합니다. Assembly에 대한 기호를 나타내는 원시 바이트도 로드됩니다.

Load(String)

표시 이름이 지정된 Assembly를 로드합니다.

Load(String, Evidence)
사용되지 않음.

표시 이름이 지정된 Assembly를 로드합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
MemberwiseClone(Boolean)

현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다.

(다음에서 상속됨 MarshalByRefObject)
ReflectionOnlyGetAssemblies()

애플리케이션 도메인의 리플렉션 전용 컨텍스트로 로드된 어셈블리를 반환합니다.

SetAppDomainPolicy(PolicyLevel)
사용되지 않음.

이 애플리케이션 도메인의 보안 정책 수준을 설정합니다.

SetCachePath(String)
사용되지 않음.
사용되지 않음.
사용되지 않음.

지정한 디렉터리 경로를 어셈블리가 섀도 복사되는 위치로 설정합니다.

SetData(String, Object)

지정한 애플리케이션 도메인 속성에 지정한 값을 할당합니다.

SetData(String, Object, IPermission)

속성을 검색할 때 호출자의 요청에 대해 지정된 권한을 사용하여 지정한 애플리케이션 도메인 속성에 지정한 값을 할당합니다.

SetDynamicBase(String)
사용되지 않음.
사용되지 않음.
사용되지 않음.

지정한 디렉터리 경로를 동적으로 생성된 파일을 저장하고 액세스하는 하위 디렉터리의 기본 디렉터리로 설정합니다.

SetPrincipalPolicy(PrincipalPolicy)

이 애플리케이션 도메인에서 실행되는 동안 스레드가 특정 보안 주체에 바인딩하려는 경우 Principal 개체 및 Identity 개체를 스레드에 연결하는 방법을 지정합니다.

SetShadowCopyFiles()
사용되지 않음.
사용되지 않음.
사용되지 않음.

섀도 복사를 설정합니다.

SetShadowCopyPath(String)
사용되지 않음.
사용되지 않음.
사용되지 않음.

지정한 디렉터리 경로를 어셈블리가 섀도 복사되는 위치로 설정합니다.

SetThreadPrincipal(IPrincipal)

이 애플리케이션 도메인에서 실행되는 동안 스레드가 특정 보안 주체에 바인딩하려는 경우 스레드에 연결되는 기본 Principal 개체를 설정합니다.

ToString()

애플리케이션 도메인과 컨텍스트 정책의 이름이 포함된 문자열 표현을 가져옵니다.

Unload(AppDomain)
사용되지 않음.

지정한 애플리케이션 도메인을 언로드합니다.

이벤트

AssemblyLoad

어셈블리가 로드될 때 발생합니다.

AssemblyResolve

어셈블리를 확인하지 못할 경우 발생합니다.

DomainUnload

AppDomain이 언로드되려고 할 때 발생합니다.

FirstChanceException

애플리케이션 도메인에서 런타임이 예외 처리기에 대한 호출 스택을 검색하기 전에 관리 코드에서 예외가 throw될 경우 발생합니다.

ProcessExit

기본 애플리케이션 도메인의 부모 프로세스가 종료하면 이 이벤트가 발생합니다.

ReflectionOnlyAssemblyResolve

어셈블리 전용 컨텍스트에서 어셈블리 확인이 실패하면 이 이벤트가 발생합니다.

ResourceResolve

리소스가 어셈블리에서 올바르게 링크되거나 포함된 리소스가 아니어서 리소스 확인이 실패하면 이 이벤트가 발생합니다.

TypeResolve

형식을 확인하지 못할 경우 발생합니다.

UnhandledException

예외가 catch되지 않으면 발생합니다.

명시적 인터페이스 구현

_AppDomain.GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr)

이름 집합을 해당하는 디스패치 식별자 집합에 매핑합니다.

_AppDomain.GetTypeInfo(UInt32, UInt32, IntPtr)

인터페이스의 형식 정보를 가져오는 데 사용할 수 있는 개체의 형식 정보를 검색합니다.

_AppDomain.GetTypeInfoCount(UInt32)

개체에서 제공하는 형식 정보 인터페이스의 수를 검색합니다(0 또는 1).

_AppDomain.Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr)

개체에서 노출하는 메서드와 속성에 대한 액세스를 제공합니다.

적용 대상

추가 정보