Partager via


DataObjectIdentifierConverter Class

Provides the ability to convert data source–specific object identifiers from strings to identifier parts, and from identifier parts to strings.

Inheritance Hierarchy

System.Object
  Microsoft.VisualStudio.Data.Framework.DataSiteableObject<IVsDataConnection>
    Microsoft.VisualStudio.Data.Framework.DataObjectIdentifierConverter
      Microsoft.VisualStudio.Data.Framework.AdoDotNet.AdoDotNetObjectIdentifierConverter

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

Syntax

'Declaration
Public MustInherit Class DataObjectIdentifierConverter _
    Inherits DataSiteableObject(Of IVsDataConnection) _
    Implements IVsDataObjectIdentifierConverter
public abstract class DataObjectIdentifierConverter : DataSiteableObject<IVsDataConnection>, 
    IVsDataObjectIdentifierConverter
public ref class DataObjectIdentifierConverter abstract : public DataSiteableObject<IVsDataConnection^>, 
    IVsDataObjectIdentifierConverter
[<AbstractClass>]
type DataObjectIdentifierConverter =  
    class 
        inherit DataSiteableObject<IVsDataConnection>
        interface IVsDataObjectIdentifierConverter 
    end
public abstract class DataObjectIdentifierConverter extends DataSiteableObject<IVsDataConnection> implements IVsDataObjectIdentifierConverter

The DataObjectIdentifierConverter type exposes the following members.

Constructors

  Name Description
Protected method DataObjectIdentifierConverter() Initializes a new instance of the DataObjectIdentifierConverter class.
Protected method DataObjectIdentifierConverter(IVsDataConnection) Initializes a parameterized instance of the DataObjectIdentifierConverter class, specifying a data connection object.

Top

Properties

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

Top

Methods

  Name Description
Protected method BuildString Builds a string version of an identifier.
Public method ConvertToArray Converts a formatted string identifier into its equivalent set of identifier parts.
Public method ConvertToString(String, array<Object[]) Converts a set of identifier parts into a formatted string identifier.
Public method ConvertToString(String, array<Object[], DataObjectIdentifierFormat) Converts a set of identifier parts into a formatted string identifier, using the specified formatting option.
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.)
Protected method FormatPart Formats a specified identifier part.
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>.)
Protected method SplitIntoParts Divides a string version of an identifier into a set of identifier parts converted into the expected format.
Public method ToString Returns a string that represents the current object. (Inherited from Object.)
Protected method UnformatPart Removes formatting applied to a given identifier part.

Top

Events

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

Top

Remarks

Typically, the identifier of an object on a data source consists of a string that is used in commands that get executed. For example, in the SQL statement SELECT * FROM mytable, the string mytable is the unique identifier of an object in the context under which the statement is running.

Typically a data source has some kind of containment mechanism for objects, such as a catalog, schema, or package. This introduces the need for multiple-part identifiers because a single name no longer suffices for uniquely identifying objects. For example, an Oracle server groups different objects under different users, causing the unique identifier of an object to be qualified with a user name.

Because the format of such multiple-part identifiers can vary from one data source to another, there has to be a way to convert a given string into its set of parts and vice versa. This class provides such a mechanism.

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

DataObjectIdentifierResolver