共用方式為


OleComponent Class

Basic implementation of a disposable IOleComponent

This API is not CLS-compliant. 

Namespace:  Microsoft.VisualStudio.PlatformUI.OleComponentSupport
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'宣告
<CLSCompliantAttribute(False)> _
Public Class OleComponent _
    Inherits DisposableObject _
    Implements IOleComponent
'用途
Dim instance As OleComponent
[CLSCompliantAttribute(false)]
public class OleComponent : DisposableObject, 
    IOleComponent
[CLSCompliantAttribute(false)]
public ref class OleComponent : public DisposableObject, 
    IOleComponent
[<CLSCompliantAttribute(false)>]
type OleComponent =  
    class
        inherit DisposableObject
        interface IOleComponent
    end
public class OleComponent extends DisposableObject implements IOleComponent

Remarks

Defines virtual methods for derived classes to override in order to change behavior. Also defines a public event for each method that users can hook into to change behavior without deriving. Default implementations of virtual methods simply raise events in the presence of handlers. If you derive and override the methods and want the events to be raised call the base method before or after your override logic. Will call FRegisterComponent on construction and and FRevokeComponent on Dispose.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.PlatformUI.DisposableObject
    Microsoft.VisualStudio.PlatformUI.OleComponentSupport.OleComponent

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

OleComponent Members

Microsoft.VisualStudio.PlatformUI.OleComponentSupport Namespace