IVsDataSiteableObject<T> Interface

Represents an object that can be sited with a specific type.

Namespace:  Microsoft.VisualStudio.Data.Core
Assembly:  Microsoft.VisualStudio.Data.Core (in Microsoft.VisualStudio.Data.Core.dll)

Syntax

'Declaration
Public Interface IVsDataSiteableObject(Of T)
public interface IVsDataSiteableObject<T>
generic<typename T>
public interface class IVsDataSiteableObject
type IVsDataSiteableObject<'T> =  interface end
JScript does not support generic types or methods.

Type Parameters

  • T
    The type of the parameter.

The IVsDataSiteableObject<T> type exposes the following members.

Properties

  Name Description
Public property Site Gets or sets the site.

Top

Remarks

The Data Designer Extensibility (DDEX) architecture relies heavily on the creation of DDEX provider support entity objects by means of a provider object factory. The creation of these objects is followed by one or more operations to put them within some larger context. The mechanism used to supply context to these objects is to site the object together with one or more additional objects. Additional objects could include an "owner" of the provider object (for example, a data connection object). Or the additional object could just be a global service provider object to enable the provider object access to all other Visual Studio services. Note that it is common for DDEX support entities to have multiple sites.

Examples

The following code demonstrates a customization of the DDEX implementation of the IVsDataConnectionProperties support entity. The code includes an implementation of the IVsDataSiteableObject<T> interface for both the IVsDataProvider object that created it and a global service provider object.

using System;
using Microsoft.VisualStudio.Data.Core;
using Microsoft.VisualStudio.Data.Framework;

internal class MyConnectionProperties : DataConnectionProperties,
    IVsDataSiteableObject<IVsDataProvider>,
    IVsDataSiteableObject<IServiceProvider>
{
    private IVsDataProvider _provider;
    private IServiceProvider _serviceProvider;

    IVsDataProvider IVsDataSiteableObject<IVsDataProvider>.Site
    {
        get
        {
            return _provider;
        }
        set
        {
            _provider = value;
        }
    }

    IServiceProvider IVsDataSiteableObject<IServiceProvider>.Site
    {
        get
        {
            return _serviceProvider;
        }
        set
        {
            _serviceProvider = value;
        }
    }
}

See Also

Reference

Microsoft.VisualStudio.Data.Core Namespace