DataObjectIdentifierResolver.ContractIdentifier 方法

缩小一个数据对象中的标识符与指定的类型和完整标识符和表示中的所有缓存协定是否应更新。

命名空间:  Microsoft.VisualStudio.Data
程序集:  Microsoft.VisualStudio.Data(在 Microsoft.VisualStudio.Data.dll 中)

语法

声明
Public Overridable Function ContractIdentifier ( _
    typeName As String, _
    fullIdentifier As Object(), _
    refresh As Boolean _
) As Object()
public virtual Object[] ContractIdentifier(
    string typeName,
    Object[] fullIdentifier,
    bool refresh
)
public:
virtual array<Object^>^ ContractIdentifier(
    String^ typeName, 
    array<Object^>^ fullIdentifier, 
    bool refresh
)
abstract ContractIdentifier : 
        typeName:string * 
        fullIdentifier:Object[] * 
        refresh:bool -> Object[] 
override ContractIdentifier : 
        typeName:string * 
        fullIdentifier:Object[] * 
        refresh:bool -> Object[] 
public function ContractIdentifier(
    typeName : String, 
    fullIdentifier : Object[], 
    refresh : boolean
) : Object[]

参数

  • typeName
    类型:System.String
    数据对象的类型的名称。
  • fullIdentifier
    类型:array<System.Object[]
    数据对象的完整标识符。
  • refresh
    类型:System.Boolean
    表示任何缓存的协定是否应更新。

返回值

类型:array<System.Object[]
返回数据对象的部分,显示收缩的唯一标识符。

异常

异常 条件
ArgumentNullException

typeName 参数为 null。

备注

使用此方法将完整的标识符并将其转换为唯一仍标识对象的最小可能的标识符。例如,在SQL Server,则连接作为用户dbo到pubs数据库,完整的标识符“pubs.dbo.authors”可以收缩到的简单窗体中,“作者”。

refresh 参数指示方法是否应更新其缓存反映当前数据源上下文。这可能是必需的数据源上下文在连接的生存期内,是否更改。

通常数据提供程序不会直接重写此方法。基实现调用 QuickContractIdentifier 和能 SlowContractIdentifier方法,根据缓存状态。

.NET Framework 安全性

请参见

参考

DataObjectIdentifierResolver 类

Microsoft.VisualStudio.Data 命名空间

QuickExpandIdentifier

SlowExpandIdentifier