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 移除先前由 S 新增 RegisterAssembly的指定組件中類型的登錄表。 此方法同時呼叫組裝中任何取消註冊函數。