ICustomFactory 接口

定义

使用户能够为扩展 MarshalByRefObject 的托管对象编写激活代码。Enables users to write activation code for managed objects that extend MarshalByRefObject.

public interface class ICustomFactory
[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomFactory
type ICustomFactory = interface
Public Interface ICustomFactory
属性

注解

您可以通过提供一个代理类来启用自定义激活,该代理类可实现 ICustomFactory 并使用 ProxyAttributeMarshalByRefObject 类进行特性化。You can enable custom activation by providing a proxy class that implements ICustomFactory and attributing the MarshalByRefObject class with the ProxyAttribute. 激活该类后,公共语言运行时将调用代理的 CreateInstance 方法,以激活类。When the class is activated, the proxy's CreateInstance method is called by the common language runtime to activate the class.

方法

CreateInstance(Type)

创建指定类型的新实例。Creates a new instance of the specified type.

适用于