RegistrationServices.UnregisterAssembly(Assembly) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
取消注册托管程序集中的类。
public:
virtual bool UnregisterAssembly(System::Reflection::Assembly ^ assembly);
public virtual bool UnregisterAssembly(System.Reflection.Assembly assembly);
[System.Security.SecurityCritical]
public virtual bool UnregisterAssembly(System.Reflection.Assembly assembly);
abstract member UnregisterAssembly : System.Reflection.Assembly -> bool
override this.UnregisterAssembly : System.Reflection.Assembly -> bool
[<System.Security.SecurityCritical>]
abstract member UnregisterAssembly : System.Reflection.Assembly -> bool
override this.UnregisterAssembly : System.Reflection.Assembly -> bool
Public Overridable Function UnregisterAssembly (assembly As Assembly) As Boolean
参数
- assembly
- Assembly
要注销的程序集。
返回
true 如果 assembly 包含已成功注销的类型,则为 ;否则 false ,如果程序集不包含符合条件的类型。
实现
- 属性
例外
assembly 是 null。
的全名 assembly 为 null.
-或-
标记的方法 ComUnregisterFunctionAttribute 不是 static。
-或-
在层次结构的给定级别标记 ComUnregisterFunctionAttribute 了多个方法。
-或-
标记 ComUnregisterFunctionAttribute 的方法的签名无效。
用户定义的自定义注销函数(标有 ComUnregisterFunctionAttribute 属性)将引发异常。
注解
UnregisterAssembly 删除以前添加 RegisterAssembly的指定程序集中的类型的注册表项。 此方法还调用程序集中找到的任何取消设置函数。