편집

다음을 통해 공유


AppDomainManager.CreateDomain(String, Evidence, AppDomainSetup) Method

Definition

Returns a new or existing application domain.

public:
 virtual AppDomain ^ CreateDomain(System::String ^ friendlyName, System::Security::Policy::Evidence ^ securityInfo, AppDomainSetup ^ appDomainInfo);
public virtual AppDomain CreateDomain (string friendlyName, System.Security.Policy.Evidence securityInfo, AppDomainSetup appDomainInfo);
[System.Security.SecurityCritical]
public virtual AppDomain CreateDomain (string friendlyName, System.Security.Policy.Evidence securityInfo, AppDomainSetup appDomainInfo);
abstract member CreateDomain : string * System.Security.Policy.Evidence * AppDomainSetup -> AppDomain
override this.CreateDomain : string * System.Security.Policy.Evidence * AppDomainSetup -> AppDomain
[<System.Security.SecurityCritical>]
abstract member CreateDomain : string * System.Security.Policy.Evidence * AppDomainSetup -> AppDomain
override this.CreateDomain : string * System.Security.Policy.Evidence * AppDomainSetup -> AppDomain
Public Overridable Function CreateDomain (friendlyName As String, securityInfo As Evidence, appDomainInfo As AppDomainSetup) As AppDomain

Parameters

friendlyName
String

The friendly name of the domain.

securityInfo
Evidence

An object that contains evidence mapped through the security policy to establish a top-of-stack permission set.

appDomainInfo
AppDomainSetup

An object that contains application domain initialization information.

Returns

A new or existing application domain.

Attributes

Remarks

The friendly name, specified by the friendlyName parameter, can be displayed in user interfaces to identify the domain. For more information, see the FriendlyName property.

The default CreateDomain method calls the protected CreateDomainHelper method to create the AppDomain. Overrides of this method do not need to call the CreateDomainHelper method but can return an existing domain.

Notes to Inheritors

When you inherit from the AppDomainManager class and override the CreateDomain(String, Evidence, AppDomainSetup) method, you can perform custom application domain initialization activities before calling the CreateDomainHelper(String, Evidence, AppDomainSetup) method, or not call the helper method at all. For example, you could modify the evidence passed in as securityInfo, update the fields of the associated AppDomainSetup, or reuse an exiting domain.

Applies to