DataObjectIdentifierResolver Class
Provides the ability to expand and contract an identifier for a specified data object.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.DataObjectIdentifierResolver
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
‘선언
<GuidAttribute("B933535B-7DA2-4a7b-8A44-94E4DB31E947")> _
Public Class DataObjectIdentifierResolver
[GuidAttribute("B933535B-7DA2-4a7b-8A44-94E4DB31E947")]
public class DataObjectIdentifierResolver
[GuidAttribute(L"B933535B-7DA2-4a7b-8A44-94E4DB31E947")]
public ref class DataObjectIdentifierResolver
[<GuidAttribute("B933535B-7DA2-4a7b-8A44-94E4DB31E947")>]
type DataObjectIdentifierResolver = class end
public class DataObjectIdentifierResolver
The DataObjectIdentifierResolver type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DataObjectIdentifierResolver | Class constructor. Initializes an instance of the DataObjectIdentifierResolver class. |
Top
Methods
Name | Description | |
---|---|---|
ContractIdentifier | Contracts an identifier for a data object with the specified type and complete identifier and an indication whether or not any cached contraction should be updated. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
ExpandIdentifier | Expands an identifier for a data object with the specified type and partially complete identifier and an indication whether any cached expansion should be updated. | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
QuickContractIdentifier | Applies an algorithm for quickly contracting an identifier, if possible. | |
QuickExpandIdentifier | Applies an algorithm for quickly expanding an identifier, if possible. | |
SlowContractIdentifier | Contracts an identifier by whatever means are available. | |
SlowExpandIdentifier | Expands an identifier by whatever means are available. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Fields
Name | Description | |
---|---|---|
Default | Provides a DataObjectIdentifierResolver object instance that is used by default when a provider-specific implementation does not exist. |
Top
Remarks
Typically the identifier of an object on a data source consists of an identifying string that gets passed into commands. For example, in the SQL statement SELECT * FROM mytable, the string "mytable" is a unique identifier of a data object in the context under which the statement is running.
Most often, a data source has a containment mechanism for objects, such as a catalog, schema, or package. However, such containment mechanisms introduce the need for multi-part identifiers, as a single name no longer suffices for uniquely identifying objects. For example, Oracle differs from SQL Server in grouping objects under different users, requiring that unique identifiers for data objects be qualified with user names.
However, a data source typically has a context that is applied to a given connection; this context normally depends on the user, or on which part of the system is being used. This context often eliminates the need to fully qualify all identifiers. For example, to identify a table object on an Oracle server, the full qualification requires both a user name and a table name; however, the Oracle context is such that a certain user is always the default. Thus, if a table is only identified by its name, the default user is assumed.
The DataObjectIdentifierResolver class provides a way to translate between the fully qualified form of an identifier (its expanded form) and its minimal form, which uses only those identifier parts that are absolutely required to uniquely identifier the object (its contracted form).
Since a translation from one form to another may require information about its context from the data source, there are potential performance problems if expansion and contraction are heavily required by a consumer. For this reason, this class provides a simple method of caching expansions and resolutions for specific inputs which can be used if performance becomes a problem.
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.