AppDomain 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
애플리케이션이 실행되는 격리된 환경인 애플리케이션 도메인을 나타냅니다. 이 클래스는 상속할 수 없습니다.
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 및 .NET 5 이상에서는 AppDomain 구현이 설계에 따라 제한되며 격리, 언로드 또는 보안 경계를 제공하지 않습니다. 이러한 버전에는 정확히 1 AppDomain개 있습니다. 격리 및 언로드를 통해 AssemblyLoadContext제공됩니다. 보안 경계는 프로세스 경계 및 적절한 원격 기술을 통해 제공해야 합니다.
여러 애플리케이션 도메인은 단일 프로세스에서 실행할 수 있습니다. 그러나 애플리케이션 도메인과 스레드 간에는 일대일 상관 관계가 없습니다. 여러 스레드는 단일 애플리케이션 도메인에 속할 수 있으며 지정된 스레드가 단일 애플리케이션 도메인에 국한되지는 않지만 지정된 시간에는 스레드가 단일 애플리케이션 도메인에서 실행됩니다.
애플리케이션 도메인은 메서드를 CreateDomain 사용하여 만들어집니다. AppDomain 인스턴스는 어셈블리(Assembly)를 로드하고 실행하는 데 사용됩니다. AppDomain 더 이상 사용하지 않는 경우 언로드할 수 있습니다.
이 클래스는 AppDomain 어셈블리가 로드될 때, 애플리케이션 도메인이 언로드될 때 또는 처리되지 않은 예외가 throw될 때 애플리케이션이 응답할 수 있도록 하는 이벤트 집합을 구현합니다.
애플리케이션 도메인 사용에 대한 자세한 내용은 애플리케이션 도메인을 참조하세요.
이 클래스는 MarshalByRefObject, _AppDomain및 IEvidenceFactory 인터페이스를 구현합니다.
개체에 대한 AppDomain 원격 래퍼를 만들면 안 됩니다. 이렇게 하면 원격 액세스와 같은 CreateInstance 메서드를 노출하고 그에 AppDomain대한 코드 액세스 보안을 효과적으로 삭제하는 원격 참조를 게시할 수 있습니다AppDomain. 원격 AppDomain 에 연결하는 악의적인 클라이언트는 액세스 권한이 있는 리소스에 AppDomain 액세스할 수 있습니다. 확장 MarshalByRefObject 되고 악의적인 클라이언트가 보안 시스템을 우회하는 데 사용할 수 있는 메서드를 구현하는 모든 형식에 대한 원격 래퍼를 만들지 마세요.
주의
AppDomainSetup.DisallowCodeDownload 속성의 기본값은 false입니다. 이 설정은 서비스에 안전하지 않습니다. 서비스가 부분적으로 신뢰할 수 있는 코드를 다운로드하지 못하도록 하려면 이 속성을 true.로 설정합니다.
속성
| Name | Description |
|---|---|
| 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 |
애플리케이션 도메인이 섀도 복사본 파일로 구성되었는지 여부를 나타냅니다. |
메서드
| Name | Description |
|---|---|
| AppendPrivatePath(String) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
지정된 디렉터리 이름을 프라이빗 경로 목록에 추가합니다. |
| ApplyPolicy(String) |
정책이 적용된 후 어셈블리 표시 이름을 반환합니다. |
| ClearPrivatePath() |
사용되지 않음.
사용되지 않음.
사용되지 않음.
프라이빗 어셈블리의 위치를 지정하는 경로를 빈 문자열("")로 다시 설정합니다. |
| ClearShadowCopyPath() |
사용되지 않음.
사용되지 않음.
사용되지 않음.
섀도 복사된 어셈블리가 포함된 디렉터리 목록을 빈 문자열("")로 다시 설정합니다. |
| CreateComInstanceFrom(String, String, Byte[], AssemblyHashAlgorithm) |
지정된 COM 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식과 형식의 이름을 포함하는 어셈블리를 포함하는 파일의 이름을 지정합니다. |
| CreateComInstanceFrom(String, String) |
지정된 COM 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식과 형식의 이름을 포함하는 어셈블리를 포함하는 파일의 이름을 지정합니다. |
| CreateDomain(String, Evidence, AppDomainSetup, PermissionSet, StrongName[]) |
지정된 이름, 증명 정보, 애플리케이션 도메인 설정 정보, 기본 권한 집합 및 완전히 신뢰할 수 있는 어셈블리의 배열을 사용하여 새 애플리케이션 도메인을 만듭니다. |
| CreateDomain(String, Evidence, AppDomainSetup) |
지정된 이름, 증명 정보 및 애플리케이션 도메인 설정 정보를 사용하여 새 애플리케이션 도메인을 만듭니다. |
| CreateDomain(String, Evidence, String, String, Boolean, AppDomainInitializer, String[]) |
증명 정보, 애플리케이션 기본 경로, 상대 검색 경로 및 어셈블리의 섀도 복사본을 애플리케이션 도메인에 로드할지 여부를 지정하는 매개 변수를 사용하여 지정된 이름으로 새 애플리케이션 도메인을 만듭니다. 애플리케이션 도메인이 초기화될 때 호출되는 콜백 메서드와 콜백 메서드를 전달할 문자열 인수 배열을 지정합니다. |
| CreateDomain(String, Evidence, String, String, Boolean) |
증명 정보, 애플리케이션 기본 경로, 상대 검색 경로 및 어셈블리의 섀도 복사본을 애플리케이션 도메인에 로드할지 여부를 지정하는 매개 변수를 사용하여 지정된 이름으로 새 애플리케이션 도메인을 만듭니다. |
| CreateDomain(String, Evidence) |
제공된 증거를 사용하여 지정된 이름의 새 애플리케이션 도메인을 만듭니다. |
| CreateDomain(String) |
사용되지 않음.
지정된 이름을 사용하여 새 애플리케이션 도메인을 만듭니다. |
| CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) |
사용되지 않음.
지정된 어셈블리에 정의된 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 바인더, 바인딩 플래그, 생성자 인수, 인수 해석에 사용되는 문화권별 정보, 활성화 특성 및 형식을 만들기 위한 권한 부여를 지정합니다. |
| CreateInstance(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) |
지정된 어셈블리에 정의된 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 바인더, 바인딩 플래그, 생성자 인수, 인수 해석에 사용되는 문화권별 정보 및 선택적 활성화 특성을 지정합니다. |
| CreateInstance(String, String, Object[]) |
지정된 어셈블리에 정의된 지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 활성화 특성의 배열을 지정합니다. |
| CreateInstance(String, String) |
지정된 어셈블리에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) |
사용되지 않음.
지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식의 이름과 형식을 찾아서 만드는 방법을 지정합니다. |
| CreateInstanceAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) |
형식 이름의 대/소문자를 무시할지 여부를 지정하여 지정된 어셈블리에 정의된 지정된 형식의 새 인스턴스를 만듭니다. 바인딩 특성 및 만들 형식을 선택하는 데 사용되는 바인더입니다. 생성자의 인수입니다. 문화권; 및 활성화 특성입니다. |
| CreateInstanceAndUnwrap(String, String, Object[]) |
지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식이 정의된 어셈블리, 형식 이름 및 활성화 특성 배열을 지정합니다. |
| CreateInstanceAndUnwrap(String, String) |
지정된 형식의 새 인스턴스를 만듭니다. 매개 변수는 형식이 정의된 어셈블리와 형식의 이름을 지정합니다. |
| CreateInstanceFrom(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) |
사용되지 않음.
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFrom(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) |
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFrom(String, String, Object[]) |
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFrom(String, String) |
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFromAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[], Evidence) |
사용되지 않음.
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFromAndUnwrap(String, String, Boolean, BindingFlags, Binder, Object[], CultureInfo, Object[]) |
형식 이름의 대/소문자를 무시할지 여부를 지정하여 지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. 바인딩 특성 및 만들 형식을 선택하는 데 사용되는 바인더입니다. 생성자의 인수입니다. 문화권; 및 활성화 특성입니다. |
| CreateInstanceFromAndUnwrap(String, String, Object[]) |
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateInstanceFromAndUnwrap(String, String) |
지정된 어셈블리 파일에 정의된 지정된 형식의 새 인스턴스를 만듭니다. |
| CreateObjRef(Type) |
원격 개체와 통신하는 데 사용되는 프록시를 생성하는 데 필요한 모든 관련 정보를 포함하는 개체를 만듭니다. (다음에서 상속됨 MarshalByRefObject) |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, Evidence, PermissionSet, PermissionSet, PermissionSet) |
사용되지 않음.
지정된 이름, 액세스 모드, 증명 정보 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, Evidence) |
사용되지 않음.
지정된 이름, 액세스 모드 및 증명 정보를 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, IEnumerable<CustomAttributeBuilder>, SecurityContextSource) |
지정된 이름, 액세스 모드 및 사용자 지정 특성을 사용하여 지정된 원본을 보안 컨텍스트에 사용하는 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, IEnumerable<CustomAttributeBuilder>) |
지정된 이름, 액세스 모드 및 사용자 지정 특성을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, PermissionSet, PermissionSet, PermissionSet) |
사용되지 않음.
지정된 이름, 액세스 모드 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Boolean, IEnumerable<CustomAttributeBuilder>) |
지정된 이름, 액세스 모드, 스토리지 디렉터리 및 동기화 옵션을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean, IEnumerable<CustomAttributeBuilder>) |
사용되지 않음.
지정된 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보, 권한 요청, 동기화 옵션 및 사용자 지정 특성을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet, Boolean) |
사용되지 않음.
지정된 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보, 권한 요청 및 동기화 옵션을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence, PermissionSet, PermissionSet, PermissionSet) |
사용되지 않음.
지정된 이름, 액세스 모드, 스토리지 디렉터리, 증명 정보 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, Evidence) |
사용되지 않음.
지정된 이름, 액세스 모드, 스토리지 디렉터리 및 증명 정보를 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String, PermissionSet, PermissionSet, PermissionSet) |
사용되지 않음.
지정된 이름, 액세스 모드, 스토리지 디렉터리 및 권한 요청을 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess, String) |
지정된 이름, 액세스 모드 및 스토리지 디렉터리를 사용하여 동적 어셈블리를 정의합니다. |
| DefineDynamicAssembly(AssemblyName, AssemblyBuilderAccess) |
지정된 이름 및 액세스 모드를 사용하여 동적 어셈블리를 정의합니다. |
| DoCallBack(CrossAppDomainDelegate) |
지정된 대리자가 식별하는 다른 애플리케이션 도메인에서 코드를 실행합니다. |
| Equals(Object) |
지정된 개체가 현재 개체와 같은지 여부를 확인합니다. (다음에서 상속됨 Object) |
| ExecuteAssembly(String, Evidence, String[], Byte[], AssemblyHashAlgorithm) |
사용되지 않음.
지정된 증명 정보, 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, Evidence, String[]) |
사용되지 않음.
지정된 증명 정보 및 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, Evidence) |
사용되지 않음.
지정된 증명 정보를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, String[], Byte[], AssemblyHashAlgorithm) |
사용되지 않음.
지정된 인수, 해시 값 및 해시 알고리즘을 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String, String[]) |
지정된 인수를 사용하여 지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssembly(String) |
지정된 파일에 포함된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(AssemblyName, Evidence, String[]) |
사용되지 않음.
지정된 증명 정보 및 인수를 AssemblyName사용하여 지정된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(AssemblyName, String[]) |
지정된 인수를 AssemblyName사용하여 지정된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(String, Evidence, String[]) |
사용되지 않음.
지정된 증명 정보 및 인수를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(String, Evidence) |
사용되지 않음.
지정된 증명 정보를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(String, String[]) |
지정된 인수를 사용하여 표시 이름이 지정된 어셈블리를 실행합니다. |
| ExecuteAssemblyByName(String) |
표시 이름이 지정된 어셈블리를 실행합니다. |
| GetAssemblies() |
이 애플리케이션 도메인의 실행 컨텍스트에 로드된 어셈블리를 가져옵니다. |
| GetCurrentThreadId() |
사용되지 않음.
사용되지 않음.
사용되지 않음.
사용되지 않음.
현재 스레드 식별자를 가져옵니다. |
| GetData(String) |
지정된 이름의 현재 애플리케이션 도메인에 저장된 값을 가져옵니다. |
| GetHashCode() |
기본 해시 함수로 사용됩니다. (다음에서 상속됨 Object) |
| GetLifetimeService() |
사용되지 않음.
이 인스턴스의 수명 정책을 제어하는 현재 수명 서비스 개체를 검색합니다. (다음에서 상속됨 MarshalByRefObject) |
| GetType() |
현재 인스턴스의 형식을 가져옵니다. |
| GetType() |
현재 인스턴스의 Type 가져옵니다. (다음에서 상속됨 Object) |
| InitializeLifetimeService() |
임대가 AppDomain 생성되지 않도록 하여 무한 수명을 제공합니다. |
| InitializeLifetimeService() |
사용되지 않음.
이 인스턴스의 수명 정책을 제어하는 수명 서비스 개체를 가져옵니다. (다음에서 상속됨 MarshalByRefObject) |
| IsCompatibilitySwitchSet(String) |
호환성 스위치가 설정되었는지 여부와 설정된 경우 지정된 호환성 스위치가 설정되었는지 여부를 나타내는 null 허용 부울 값을 가져옵니다. |
| IsDefaultAppDomain() |
애플리케이션 도메인이 프로세스의 기본 애플리케이션 도메인인지 여부를 나타내는 값을 반환합니다. |
| IsFinalizingForUnload() |
이 애플리케이션 도메인이 언로드 중인지 여부와 포함된 개체가 공용 언어 런타임에 의해 종료되고 있는지 여부를 나타냅니다. |
| Load(AssemblyName, Evidence) |
사용되지 않음.
지정된 해당 을 로드합니다 AssemblyAssemblyName. |
| Load(AssemblyName) |
지정된 해당 을 로드합니다 AssemblyAssemblyName. |
| Load(Byte[], Byte[], Evidence) |
사용되지 않음.
내보내Assembly기를 Assembly 포함하는 COFF(공용 개체 파일 형식) 기반 이미지를 로드합니다. 기호 Assembly 를 나타내는 원시 바이트도 로드됩니다. |
| Load(Byte[], Byte[]) |
내보내Assembly기를 Assembly 포함하는 COFF(공용 개체 파일 형식) 기반 이미지를 로드합니다. 기호 Assembly 를 나타내는 원시 바이트도 로드됩니다. |
| Load(Byte[]) |
내보내Assembly기를 Assembly 포함하는 COFF(공용 개체 파일 형식) 기반 이미지를 로드합니다. |
| Load(String, Evidence) |
사용되지 않음.
지정된 표시 이름을 로드합니다 Assembly . |
| Load(String) |
지정된 표시 이름을 로드합니다 Assembly . |
| MemberwiseClone() |
현재 Object단순 복사본을 만듭니다. (다음에서 상속됨 Object) |
| MemberwiseClone(Boolean) |
현재 MarshalByRefObject 개체의 단순 복사본을 만듭니다. (다음에서 상속됨 MarshalByRefObject) |
| ReflectionOnlyGetAssemblies() |
애플리케이션 도메인의 리플렉션 전용 컨텍스트에 로드된 어셈블리를 반환합니다. |
| SetAppDomainPolicy(PolicyLevel) |
사용되지 않음.
이 애플리케이션 도메인에 대한 보안 정책 수준을 설정합니다. |
| SetCachePath(String) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
지정된 디렉터리 경로를 어셈블리가 섀도 복사되는 위치로 설정합니다. |
| SetData(String, Object, IPermission) |
지정된 값을 지정된 애플리케이션 도메인 속성에 할당하고, 속성을 검색할 때 호출자를 요청할 수 있는 지정된 권한을 부여합니다. |
| SetData(String, Object) |
지정된 애플리케이션 도메인 속성에 지정된 값을 할당합니다. |
| SetDynamicBase(String) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
동적으로 생성된 파일이 저장되고 액세스되는 하위 디렉터리의 기본 디렉터리로 지정된 디렉터리 경로를 설정합니다. |
| SetPrincipalPolicy(PrincipalPolicy) |
스레드가 이 애플리케이션 도메인에서 실행하는 동안 보안 주체에 바인딩을 시도하는 경우 스레드에 보안 주체 및 ID 개체를 연결해야 하는 방법을 지정합니다. |
| SetShadowCopyFiles() |
사용되지 않음.
사용되지 않음.
사용되지 않음.
섀도 복사를 켭니다. |
| SetShadowCopyPath(String) |
사용되지 않음.
사용되지 않음.
사용되지 않음.
지정된 디렉터리 경로를 섀도 복사할 어셈블리의 위치로 설정합니다. |
| SetThreadPrincipal(IPrincipal) |
이 애플리케이션 도메인에서 실행하는 동안 보안 주체에 바인딩하려는 경우 스레드에 연결할 기본 보안 주체 개체를 설정합니다. |
| ToString() |
애플리케이션 도메인의 이름 및 컨텍스트 정책을 포함하는 문자열 표현을 가져옵니다. |
| Unload(AppDomain) |
사용되지 않음.
지정된 애플리케이션 도메인을 언로드합니다. |
이벤트
| Name | Description |
|---|---|
| AssemblyLoad |
어셈블리가 로드될 때 발생합니다. |
| AssemblyResolve |
어셈블리의 확인이 실패할 때 발생합니다. |
| DomainUnload |
언로드하려고 할 때 AppDomain 발생합니다. |
| FirstChanceException |
런타임이 호출 스택에서 애플리케이션 도메인의 예외 처리기를 검색하기 전에 관리 코드에서 예외가 throw되면 발생합니다. |
| ProcessExit |
기본 애플리케이션 도메인의 부모 프로세스가 종료되면 발생합니다. |
| ReflectionOnlyAssemblyResolve |
리플렉션 전용 컨텍스트에서 어셈블리의 확인이 실패할 때 발생합니다. |
| ResourceResolve |
리소스가 어셈블리에 유효한 연결된 리소스 또는 포함된 리소스가 아니므로 리소스 확인이 실패할 때 발생합니다. |
| TypeResolve |
형식의 확인이 실패할 때 발생합니다. |
| UnhandledException |
예외가 catch되지 않을 때 발생합니다. |
명시적 인터페이스 구현
| Name | Description |
|---|---|
| _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) |
개체에 의해 노출되는 속성 및 메서드에 대한 액세스를 제공합니다. |