Editare

Partajați prin


IRegistrationServices.UnregisterAssembly(Assembly) Method

Definition

Unregisters the classes in a managed assembly.

public:
 bool UnregisterAssembly(System::Reflection::Assembly ^ assembly);
public bool UnregisterAssembly (System.Reflection.Assembly assembly);
[System.Security.SecurityCritical]
public bool UnregisterAssembly (System.Reflection.Assembly assembly);
abstract member UnregisterAssembly : System.Reflection.Assembly -> bool
[<System.Security.SecurityCritical>]
abstract member UnregisterAssembly : System.Reflection.Assembly -> bool
Public Function UnregisterAssembly (assembly As Assembly) As Boolean

Parameters

assembly
Assembly

The assembly to be unregistered.

Returns

true if assembly contains types that were successfully unregistered; otherwise false if the assembly contains no eligible types.

Attributes

Exceptions

assembly is null.

The full name of assembly is null.

-or-

A method marked with ComUnregisterFunctionAttribute is not static.

-or-

There is more than one method marked with ComUnregisterFunctionAttribute at a given level of the hierarchy.

-or-

The signature of the method marked with ComUnregisterFunctionAttribute is not valid.

Remarks

UnregisterAssembly removes the registry entries for the types in the specified assembly previously added by RegisterAssembly. This method also calls any unregistration functions found in the assembly.

Applies to