ICustomFactory 接口 
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
使用户能够为扩展 MarshalByRefObject 的托管对象编写激活代码。
public interface class ICustomFactorypublic interface ICustomFactory[System.Runtime.InteropServices.ComVisible(true)]
public interface ICustomFactorytype ICustomFactory = interface[<System.Runtime.InteropServices.ComVisible(true)>]
type ICustomFactory = interfacePublic Interface ICustomFactory- 属性
注解
可以通过提供实现类的 ICustomFactory 代理类并使用 MarshalByRefObjectProxyAttribute来启用自定义激活。 激活类时,公共语言运行时会调用代理 CreateInstance 的 方法来激活类。
方法
| CreateInstance(Type) | 创建指定类型的新实例。 |