Compartilhar via


DSRefBuilder Class

Allows you to create a Data Source Reference (DSRef) object that identifies one or more data objects.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.Framework.DataSiteableObject<IVsDataConnection>
    Microsoft.VisualStudio.Data.Framework.DSRefBuilder

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

Syntax

'Declaration
Public Class DSRefBuilder _
    Inherits DataSiteableObject(Of IVsDataConnection) _
    Implements IDSRefBuilder, IVsDataSupportObject(Of IDSRefBuilder)
public class DSRefBuilder : DataSiteableObject<IVsDataConnection>, 
    IDSRefBuilder, IVsDataSupportObject<IDSRefBuilder>
public ref class DSRefBuilder : public DataSiteableObject<IVsDataConnection^>, 
    IDSRefBuilder, IVsDataSupportObject<IDSRefBuilder^>
type DSRefBuilder =  
    class 
        inherit DataSiteableObject<IVsDataConnection>
        interface IDSRefBuilder 
        interface IVsDataSupportObject<IDSRefBuilder>
    end
public class DSRefBuilder extends DataSiteableObject<IVsDataConnection> implements IDSRefBuilder, IVsDataSupportObject<IDSRefBuilder>

The DSRefBuilder type exposes the following members.

Constructors

  Name Description
Public method DSRefBuilder() Initializes a new instance of the DSRefBuilder class.
Public method DSRefBuilder(IVsDataConnection) Initializes a new instance of the DSRefBuilder class with the data connection.

Top

Properties

  Name Description
Public property Site Gets or sets the object site. (Inherited from DataSiteableObject<T>.)

Top

Methods

  Name Description
Public method AppendToDSRef(Object, String, array<Object[]) Appends information about a data object with the specified type and identifier to a specified existing DSRef object.
Protected method AppendToDSRef(Object, String, array<Object[], array<Object[]) Appends information about a data object with the specified type and identifier to a specified existing DSRef object.
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 GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Protected method OnSiteChanged Raises the SiteChanged event. (Inherited from DataSiteableObject<T>.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Events

  Name Description
Public event SiteChanged Occurs when the Site property is changed. (Inherited from DataSiteableObject<T>.)

Top

Explicit Interface Implementations

  Name Description
Explicit interface implemetationPrivate method IVsDataSupportObject<IDSRefBuilder>.Invoke Invokes the method specified by the method name and passes it the specified arguments.

Top

Remarks

This particular implementation of the IDSRefBuilder interface uses information provided in a data provider's data object support XML file to append information to an existing DSRef object to enable drag-and-drop operations.

When specifying the IDSRefBuilder service with this implementation, a data provider should attach certain parameters to indicate which nodes should be created where, and which identifier parts should be used as values for the nodes. The top-level parameters identify nodes that appear directly underneath the root DSRef node. The format of sub-parameters under a given top-level parameter is as follows:

  • Parameter 1: The name of the node.

  • Parameter 2: The owner of the node.

  • Parameter 3: The node type (Table, Field, Trigger, ViewTrigger, ViewIndex, StoredProcedure, View, Synonym, Function, Index, or UserDefinedType).

  • Parameter 4: The extended type of the node, as a GUID.

  • Parameter 5: A collection of custom properties specified as child parameters, where the value is the GUID of the custom property and an embedded parameter contains the value.

  • Parameter 6: A collection of child nodes specified as child parameters.

When this class does not adequately service your data provider's requirements, you can inherit from it and specify your own class, although in most cases that will not be necessary.

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.Data.Framework Namespace