Share via


GlobalObjectProvider Class

Provides a base class for accessing one or more global object types.

This API is not CLS-compliant. 

Inheritance Hierarchy

System.Object
  System.MarshalByRefObject
    Microsoft.VisualStudio.Shell.Design.GlobalObjectProvider

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
<ComVisibleAttribute(True)> _
Public MustInherit Class GlobalObjectProvider _
    Inherits MarshalByRefObject _
    Implements IDisposable, IObjectWithSite
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public abstract class GlobalObjectProvider : MarshalByRefObject, 
    IDisposable, IObjectWithSite
[CLSCompliantAttribute(false)]
[ComVisibleAttribute(true)]
public ref class GlobalObjectProvider abstract : public MarshalByRefObject, 
    IDisposable, IObjectWithSite
[<AbstractClass>]
[<CLSCompliantAttribute(false)>]
[<ComVisibleAttribute(true)>]
type GlobalObjectProvider =  
    class
        inherit MarshalByRefObject
        interface IDisposable
        interface IObjectWithSite
    end
public abstract class GlobalObjectProvider extends MarshalByRefObject implements IDisposable, IObjectWithSite

The GlobalObjectProvider type exposes the following members.

Constructors

  Name Description
Protected method GlobalObjectProvider Initializes a new instance of GlobalObjectProvider.

Top

Methods

  Name Description
Public method CreateObjRef Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.)
Public method Dispose() Disposes this global object provider.
Protected method Dispose(Boolean) Disposes this object and its resources.
Public method Equals Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public method GetGlobalObjects(Project) Gets a collection of global objects for the specified project.
Public method GetGlobalObjects(Project, Type) Gets a collection of global objects for the specified project that match the specified type.
Protected method GetGlobalObjectsCore When overridden in a derived class, returns a collection of global objects for the specified project that match the specified type.
Public method GetGlobalTypes Gets a collection of global types for the specified project that match the specified type.
Protected method GetGlobalTypesCore Gets a collection of global types for the specified project that match the specified type.
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetLifetimeService Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method GetService Gets the requested service.
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method InitializeLifetimeService Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.)
Protected method MemberwiseClone() Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method MemberwiseClone(Boolean) Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.)
Protected method OnCollectionChanged Raises the CollectionChanged event.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event CollectionChanged Occurs when there is a change to the collection of global object or global types.

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IObjectWithSite.GetSite Gets the service provider.
Explicit interface implemetationPrivate method IObjectWithSite.SetSite Sets the IserviceProvider.

Top

Remarks

The GlobalObjectProvider class provides information on the global objects available to the current project; for example, the class provides a list of global objects to the global object service. There is one global object provider for all project-level resource files, and another for each strongly typed dataset.

In the Visual Studio design-time environment, global object providers are created through the Visual Studio ILocalRegistry construct and are sited through IObjectWithSite during creation. When a provider is no longer needed by a global object service, the global object service disposes of the provider.

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

Microsoft.VisualStudio.Shell.Design Namespace

GlobalObject

GlobalType

GlobalObjectService