IVsDataSiteableObject<T> Generic 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

'宣言
Public Interface IVsDataSiteableObject(Of T)
'使用
Dim instance As IVsDataSiteableObject(Of T)
public interface IVsDataSiteableObject<T>
generic<typename T>
public interface class IVsDataSiteableObject
JScript does not support generic types or methods.

Type Parameters

  • T

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

IVsDataSiteableObject<T> Members

Microsoft.VisualStudio.Data.Core Namespace