AppDomainSetup 类

定义

表示可以添加到 AppDomain 的实例的程序集绑定信息。Represents assembly binding information that can be added to an instance of AppDomain.

public ref class AppDomainSetup sealed : IAppDomainSetup
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.ComVisible(true)]
[System.Serializable]
public sealed class AppDomainSetup : IAppDomainSetup
type AppDomainSetup = class
    interface IAppDomainSetup
Public NotInheritable Class AppDomainSetup
Implements IAppDomainSetup
继承
AppDomainSetup
属性
实现

注解

更改AppDomainSetup实例的属性不会影响任何现有AppDomain的。Changing the properties of an AppDomainSetup instance does not affect any existing AppDomain. 当使用AppDomain AppDomainSetup实例作为参数调用方法时,它只会影响新创建的。CreateDomainIt can affect only the creation of a new AppDomain, when the CreateDomain method is called with the AppDomainSetup instance as a parameter.

此类实现 IAppDomainSetup 接口。This class implements the IAppDomainSetup interface.

注意

DisallowCodeDownload属性的默认值为 false。The default value for the DisallowCodeDownload property is false. 对于服务,此设置是不安全的。This setting is unsafe for services. 若要帮助防止服务下载部分受信任的代码,请将此属性设置为 trueTo help prevent services from downloading partially trusted code, set this property to true

构造函数

AppDomainSetup()

初始化 AppDomainSetup 类的新实例。Initializes a new instance of the AppDomainSetup class.

AppDomainSetup(ActivationArguments)

使用基于清单的应用程序域激活所需的指定激活参数初始化 AppDomainSetup 类的新实例。Initializes a new instance of the AppDomainSetup class with the specified activation arguments required for manifest-based activation of an application domain.

AppDomainSetup(ActivationContext)

使用指定的激活上下文(用于基于清单的应用程序域激活)初始化 AppDomainSetup 类的新实例。Initializes a new instance of the AppDomainSetup class with the specified activation context to use for manifest-based activation of an application domain.

属性

ActivationArguments

获取或设置与应用程序域的激活有关的数据。Gets or sets data about the activation of an application domain.

AppDomainInitializer

获取或设置 AppDomainInitializer 委托,该委托表示在初始化应用程序域时调用的回调方法。Gets or sets the AppDomainInitializer delegate, which represents a callback method that is invoked when the application domain is initialized.

AppDomainInitializerArguments

获取或设置传给 AppDomainInitializer 委托所表示的回调方法的参数。Gets or sets the arguments passed to the callback method represented by the AppDomainInitializer delegate. 在初始化应用程序域时将调用该回调方法。The callback method is invoked when the application domain is initialized.

AppDomainManagerAssembly

获取或设置程序集的显示名称,该程序集为使用 AppDomainSetup 对象创建的应用程序域提供应用程序域管理器的类型。Gets or sets the display name of the assembly that provides the type of the application domain manager for application domains created using this AppDomainSetup object.

AppDomainManagerType

获取或设置类型的全名,该类型可为使用此 AppDomainSetup 对象创建的应用程序域提供应用程序域管理器。Gets or sets the full name of the type that provides the application domain manager for application domains created using this AppDomainSetup object.

ApplicationBase

获取或设置包含该应用程序的目录的名称。Gets or sets the name of the directory containing the application.

ApplicationName

获取或设置应用程序的名称。Gets or sets the name of the application.

ApplicationTrust

获取或设置一个包含安全性和信任信息的对象。Gets or sets an object containing security and trust information.

CachePath

获取或设置特定于应用程序且从中对文件进行卷影复制的区域的名称。Gets or sets the name of an area specific to the application where files are shadow copied.

ConfigurationFile

获取或设置应用程序域的配置文件的名称。Gets or sets the name of the configuration file for an application domain.

DisallowApplicationBaseProbing

指定在搜索要加载的程序集时是否探测应用程序基路径和专用二进制路径。Specifies whether the application base path and private binary path are probed when searching for assemblies to load.

DisallowBindingRedirects

获取或设置一个值,该值指示应用程序域是否允许程序集绑定重定向。Gets or sets a value that indicates whether an application domain allows assembly binding redirection.

DisallowCodeDownload

获取或设置一个值,该值指示应用程序域是否允许通过 HTTP 下载程序集。Gets or sets a value that indicates whether HTTP download of assemblies is allowed for an application domain.

DisallowPublisherPolicy

获取或设置一个值,该值指示是否将配置文件的 <publisherPolicy> 部分应用于应用程序域。Gets or sets a value that indicates whether the <publisherPolicy> section of the configuration file is applied to an application domain.

DynamicBase

获取或设置动态生成的文件所在的目录的基目录。Gets or sets the base directory where the directory for dynamically generated files is located.

LicenseFile

获取或设置与此域关联的许可证文件的位置。Gets or sets the location of the license file associated with this domain.

LoaderOptimization

指定用于加载可执行文件的优化策略。Specifies the optimization policy used to load an executable.

PartialTrustVisibleAssemblies

获取或设置标以 NotVisibleByDefault 标志的程序集的列表,这些程序集对沙箱应用程序域中的部分信任代码可见。Gets or sets a list of assemblies marked with the NotVisibleByDefault flag that are made visible to partial-trust code running in a sandboxed application domain.

PrivateBinPath

获取或设置应用程序基目录下的目录列表,这些目录被探测以寻找其中的私有程序集。Gets or sets the list of directories under the application base directory that are probed for private assemblies.

PrivateBinPathProbe

获取或设置一个字符串值,用于在应用程序的搜索路径中包含 ApplicationBase,或者从搜索路径中排除该基路径而只在 PrivateBinPath 中进行搜索。Gets or sets a string value that includes or excludes ApplicationBase from the search path for the application, and searches only PrivateBinPath.

SandboxInterop

获取或设置一个值,该值指示是否在应用程序域中为互操作调用禁用接口缓存,从而对每个调用执行 QueryInterfaceGets or sets a value that indicates whether interface caching is disabled for interop calls in the application domain, so that a QueryInterface is performed on each call.

ShadowCopyDirectories

获取或设置目录的名称,这些目录包含要影像复制的程序集。Gets or sets the names of the directories containing assemblies to be shadow copied.

ShadowCopyFiles

获取或设置指示影像复制是打开还是关闭的字符串。Gets or sets a string that indicates whether shadow copying is turned on or off.

TargetFrameworkName

获取或设置为应用程序域指定目标版本和 .NET Framework 配置文件的字符串,以可由 FrameworkName(String) 构造函数分析的格式。Gets or sets a string that specifies the target version and profile of the .NET Framework for the application domain, in a format that can be parsed by the FrameworkName(String) constructor.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetConfigurationBytes()

返回由 SetConfigurationBytes(Byte[]) 方法设置的 XML 配置信息,这些信息优先于应用程序的 XML 配置信息。Returns the XML configuration information set by the SetConfigurationBytes(Byte[]) method, which overrides the application's XML configuration information.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
SetCompatibilitySwitches(IEnumerable<String>)

设置指定的开关,从而使应用程序域针对指定问题与早期版本的 .NET Framework 兼容。Sets the specified switches, making the application domain compatible with previous versions of the .NET Framework for the specified issues.

SetConfigurationBytes(Byte[])

提供应用程序域的 XML 配置信息,并替换应用程序的 XML 配置信息。Provides XML configuration information for the application domain, replacing the application's XML configuration information.

SetNativeFunction(String, Int32, IntPtr)

向通用语言运行时提供备用字符串比较功能实施。Provides the common language runtime with an alternate implementation of a string comparison function.

ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅