System Namespace
Represents an application domain, which is an isolated environment where applications execute. This class cannot be inherited.
Visibility |
Name |
Parameters |
Return Type |
public |
AppendPrivatePath |
(
String
path
)
|
Void
|
public |
ApplyPolicy |
(
String
assemblyName
)
|
String
|
public |
ClearPrivatePath |
( )
|
Void
|
public |
ClearShadowCopyPath |
( )
|
Void
|
public |
CreateComInstanceFrom |
(
String
assemblyFile
,
String
typeName
,
Byte
hashValue
,
AssemblyHashAlgorithm
hashAlgorithm
)
|
ObjectHandle
|
public |
CreateComInstanceFrom |
(
String
assemblyName
,
String
typeName
)
|
ObjectHandle
|
public static |
CreateDomain |
(
String
friendlyName
,
Evidence
securityInfo
,
String
appBasePath
,
String
appRelativeSearchPath
,
Boolean
shadowCopyFiles
,
AppDomainInitializer
adInit
,
String
adInitArgs
)
|
AppDomain
|
public static |
CreateDomain |
(
String
friendlyName
,
Evidence
securityInfo
,
AppDomainSetup
info
)
|
AppDomain
|
public static |
CreateDomain |
(
String
friendlyName
)
|
AppDomain
|
public static |
CreateDomain |
(
String
friendlyName
,
Evidence
securityInfo
,
String
appBasePath
,
String
appRelativeSearchPath
,
Boolean
shadowCopyFiles
)
|
AppDomain
|
public static |
CreateDomain |
(
String
friendlyName
,
Evidence
securityInfo
)
|
AppDomain
|
public static |
CreateDomain |
(
String
friendlyName
,
Evidence
securityInfo
,
AppDomainSetup
info
,
PermissionSet
grantSet
,
StrongName
fullTrustAssemblies
)
|
AppDomain
|
public |
CreateInstance |
(
String
assemblyName
,
String
typeName
,
Object
activationAttributes
)
|
ObjectHandle
|
public |
CreateInstance |
(
String
assemblyName
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
,
Evidence
securityAttributes
)
|
ObjectHandle
|
public |
CreateInstance |
(
String
assemblyName
,
String
typeName
)
|
ObjectHandle
|
public |
CreateInstance |
(
String
assemblyName
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
)
|
ObjectHandle
|
public |
CreateInstanceAndUnwrap |
(
String
assemblyName
,
String
typeName
,
Object
activationAttributes
)
|
Object
|
public |
CreateInstanceAndUnwrap |
(
String
assemblyName
,
String
typeName
)
|
Object
|
public |
CreateInstanceAndUnwrap |
(
String
assemblyName
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
)
|
Object
|
public |
CreateInstanceAndUnwrap |
(
String
assemblyName
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
,
Evidence
securityAttributes
)
|
Object
|
public |
CreateInstanceFrom |
(
String
assemblyFile
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
)
|
ObjectHandle
|
public |
CreateInstanceFrom |
(
String
assemblyFile
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
,
Evidence
securityAttributes
)
|
ObjectHandle
|
public |
CreateInstanceFrom |
(
String
assemblyFile
,
String
typeName
)
|
ObjectHandle
|
public |
CreateInstanceFrom |
(
String
assemblyFile
,
String
typeName
,
Object
activationAttributes
)
|
ObjectHandle
|
public |
CreateInstanceFromAndUnwrap |
(
String
assemblyName
,
String
typeName
,
Object
activationAttributes
)
|
Object
|
public |
CreateInstanceFromAndUnwrap |
(
String
assemblyName
,
String
typeName
)
|
Object
|
public |
CreateInstanceFromAndUnwrap |
(
String
assemblyFile
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
)
|
Object
|
public |
CreateInstanceFromAndUnwrap |
(
String
assemblyName
,
String
typeName
,
Boolean
ignoreCase
,
BindingFlags
bindingAttr
,
Binder
binder
,
Object
args
,
CultureInfo
culture
,
Object
activationAttributes
,
Evidence
securityAttributes
)
|
Object
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
Evidence
evidence
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
Evidence
evidence
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
Evidence
evidence
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
IEnumerable`1
assemblyAttributes
,
SecurityContextSource
securityContextSource
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
IEnumerable`1
assemblyAttributes
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
Evidence
evidence
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
Evidence
evidence
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
,
Boolean
isSynchronized
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
Evidence
evidence
,
PermissionSet
requiredPermissions
,
PermissionSet
optionalPermissions
,
PermissionSet
refusedPermissions
,
Boolean
isSynchronized
,
IEnumerable`1
assemblyAttributes
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
)
|
AssemblyBuilder
|
public |
DefineDynamicAssembly |
(
AssemblyName
name
,
AssemblyBuilderAccess
access
,
String
dir
,
Boolean
isSynchronized
,
IEnumerable`1
assemblyAttributes
)
|
AssemblyBuilder
|
public |
DoCallBack |
(
CrossAppDomainDelegate
callBackDelegate
)
|
Void
|
public |
ExecuteAssembly |
(
String
assemblyFile
,
String
args
)
|
Int32
|
public |
ExecuteAssembly |
(
String
assemblyFile
,
Evidence
assemblySecurity
,
String
args
,
Byte
hashValue
,
AssemblyHashAlgorithm
hashAlgorithm
)
|
Int32
|
public |
ExecuteAssembly |
(
String
assemblyFile
,
String
args
,
Byte
hashValue
,
AssemblyHashAlgorithm
hashAlgorithm
)
|
Int32
|
public |
ExecuteAssembly |
(
String
assemblyFile
,
Evidence
assemblySecurity
,
String
args
)
|
Int32
|
public |
ExecuteAssembly |
(
String
assemblyFile
)
|
Int32
|
public |
ExecuteAssembly |
(
String
assemblyFile
,
Evidence
assemblySecurity
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
String
assemblyName
,
Evidence
assemblySecurity
,
String
args
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
String
assemblyName
,
String
args
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
AssemblyName
assemblyName
,
String
args
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
AssemblyName
assemblyName
,
Evidence
assemblySecurity
,
String
args
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
String
assemblyName
)
|
Int32
|
public |
ExecuteAssemblyByName |
(
String
assemblyName
,
Evidence
assemblySecurity
)
|
Int32
|
public |
GetAssemblies |
( )
|
Assembly
|
public static |
GetCurrentThreadId |
( )
|
Int32
|
public |
GetData |
(
String
name
)
|
Object
|
public |
GetType |
( )
|
Type
|
public |
InitializeLifetimeService |
( )
|
Object
|
public |
IsCompatibilitySwitchSet |
(
String
value
)
|
Nullable`1
|
public |
IsDefaultAppDomain |
( )
|
Boolean
|
public |
IsFinalizingForUnload |
( )
|
Boolean
|
public |
Load |
(
Byte
rawAssembly
)
|
Assembly
|
public |
Load |
(
String
assemblyString
)
|
Assembly
|
public |
Load |
(
Byte
rawAssembly
,
Byte
rawSymbolStore
,
Evidence
securityEvidence
)
|
Assembly
|
public |
Load |
(
AssemblyName
assemblyRef
,
Evidence
assemblySecurity
)
|
Assembly
|
public |
Load |
(
String
assemblyString
,
Evidence
assemblySecurity
)
|
Assembly
|
public |
Load |
(
AssemblyName
assemblyRef
)
|
Assembly
|
public |
Load |
(
Byte
rawAssembly
,
Byte
rawSymbolStore
)
|
Assembly
|
public |
ReflectionOnlyGetAssemblies |
( )
|
Assembly
|
public |
SetAppDomainPolicy |
(
PolicyLevel
domainPolicy
)
|
Void
|
public |
SetCachePath |
(
String
path
)
|
Void
|
public |
SetData |
(
String
name
,
Object
data
)
|
Void
|
public |
SetData |
(
String
name
,
Object
data
,
IPermission
permission
)
|
Void
|
public |
SetDynamicBase |
(
String
path
)
|
Void
|
public |
SetPrincipalPolicy |
(
PrincipalPolicy
policy
)
|
Void
|
public |
SetShadowCopyFiles |
( )
|
Void
|
public |
SetShadowCopyPath |
(
String
path
)
|
Void
|
public |
SetThreadPrincipal |
(
IPrincipal
principal
)
|
Void
|
public |
ToString |
( )
|
String
|
public static |
Unload |
(
AppDomain
domain
)
|
Void
|
|
Application domains, which are represented by AppDomain objects, provide isolation, unloading, and security boundaries for executing managed code.
Multiple application domains can run in a single process; however, there is not a one-to-one correlation between application domains and threads. Several threads can belong to a single application domain, and while a given thread is not confined to a single application domain, at any given time, a thread executes in a single application domain.
Application domains are created using the CreateDomain method. AppDomain instances are used to load and execute assemblies ( Assembly ). When a AppDomain is no longer in use, it can be unloaded.
The AppDomain class implements a set of events that enable applications to respond when an assembly is loaded, when an application domain will be unloaded, or when an unhandled exception is thrown.
For more information about using application domains, see the list of Frequently Asked Questions at gotdotnet/team/clr/appdomainfaq.aspx
This class implements the MarshalByRefObject, _AppDomain, and IEvidenceFactory interfaces.
|
|