DataObjectIdentifierResolver.ExpandIdentifier Method
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.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
Public Overridable Function ExpandIdentifier ( _
typeName As String, _
partialIdentifier As Object(), _
refresh As Boolean _
) As Object()
public virtual Object[] ExpandIdentifier(
string typeName,
Object[] partialIdentifier,
bool refresh
)
public:
virtual array<Object^>^ ExpandIdentifier(
String^ typeName,
array<Object^>^ partialIdentifier,
bool refresh
)
abstract ExpandIdentifier :
typeName:string *
partialIdentifier:Object[] *
refresh:bool -> Object[]
override ExpandIdentifier :
typeName:string *
partialIdentifier:Object[] *
refresh:bool -> Object[]
public function ExpandIdentifier(
typeName : String,
partialIdentifier : Object[],
refresh : boolean
) : Object[]
Parameters
typeName
Type: System.StringThe name of a type of data object.
partialIdentifier
Type: array<System.Object[]A partial identifier of a data object.
refresh
Type: System.BooleanAn indication whether any cached expansion should be updated.
Return Value
Type: array<System.Object[]
Returns the complete, expanded identifier of the data object that matches the partial identifier passed in, or nulla null reference (Nothing in Visual Basic) if the identifier could not be expanded.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The typeName parameter is null. |
Remarks
Use this method to simulate how the data source expands identifiers. Therefore, it is expected that the method will use the same mechanism of resolution as the data source. If the input identifier represents an actual object on the data source, it is expected that this method will find that object. If it does not represent an object (that is, if it is an identifier of a to-be-created object), then it is expected that the method will complete the identifier in the same way that the data source would for such an object. For example, if a data source resolves 'authors' in 'CREATE TABLE authors' to 'pubs.dbo.authors,' then this method should do the same.
The refresh parameter indicates whether the method should update its cache to reflect the current data source context. This is most likely necessary if the data source context changes during the lifetime of a connection.
Normally a provider would not override this method directly. The base implementation makes calls into the QuickExpandIdentifier and possibly the SlowExpandIdentifier method, depending on cache state.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
DataObjectIdentifierResolver Class