Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Provides a simplified way to support communication between an object and its site in the container.
Inheritance Hierarchy
System.Object
  Microsoft.VisualStudio.Data.ObjectWithSite
    Microsoft.VisualStudio.Data.DataObjectConceptMapper
    Microsoft.VisualStudio.Data.DataObjectEnumerator
    Microsoft.VisualStudio.Data.DataObjectRestrictionMapper
    Microsoft.VisualStudio.Data.DataProviderObjectFactory
    Microsoft.VisualStudio.Data.DataSourceInformation
    Microsoft.VisualStudio.Data.DataViewBrowseObjectProvider
    Microsoft.VisualStudio.Data.DataViewCommandHandler
    Microsoft.VisualStudio.Data.DSRefBuilder
Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Public Class ObjectWithSite _
    Implements IObjectWithSite
public class ObjectWithSite : IObjectWithSite
public ref class ObjectWithSite : IObjectWithSite
type ObjectWithSite =  
    class
        interface IObjectWithSite
    end
public class ObjectWithSite implements IObjectWithSite
The ObjectWithSite type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | ObjectWithSite() | Class constructor. Initializes a new instance of the ObjectWithSite class. | 
| .gif) | ObjectWithSite(Object) | Class constructor. Initializes a new instance of the ObjectWithSite class with a specified site object. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .gif) | Site | Retrieves or sets the object site. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | 
| .gif) | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | OnSiteChanged | Raises the SiteChanged event. | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
Top
Events
| Name | Description | |
|---|---|---|
| .gif) | SiteChanged | Event that is raised when the Site property is changed. | 
Top
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| .gif) .gif) | IObjectWithSite.GetSite | Retrieves the last site set using the IObjectWithSite.SetSite method. In cases where there is no known site, the object returns an exception. | 
| .gif) .gif) | IObjectWithSite.SetSite | Provides the site's pointer to the site object. | 
Top
Remarks
This class provides a simple implementation of the IObjectWithSite interface. Following managed coding standards, it provides an event that is raised when the site is changed. This allows a client or any derived class to apply custom logic when changes occur to the object site.
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.