RegistrationServices.UnregisterAssembly(Assembly) 方法

定義

取消註冊 Managed 組件中的類別。

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

要取消註冊的組件。

傳回

Boolean

如果 assembly 含有成功取消註冊的型別,則為 true,否則為 false (如果組件沒有包含合適的型別)。

實作

屬性

例外狀況

assemblynull

assembly 的完整名稱是 null

-或- 以 ComUnregisterFunctionAttribute 標記的方法不是 static

-或- 在階層架構的指定層級中,有一個以上的方法是以 ComUnregisterFunctionAttribute 標記。

-或- 以 ComUnregisterFunctionAttribute 標記之方法的簽章無效。

使用者定義的自訂移除註冊函式 (使用 ComUnregisterFunctionAttribute 屬性標記) 擲回例外狀況。

備註

UnregisterAssembly 移除先前所加入之指定元件中的類型登錄專案 RegisterAssembly 。 這個方法也會呼叫在元件中找到的任何取消註冊函式。

適用於