IVsDataObjectMemberComparer.Compare 方法 (String, array<Object , Int32, Object)

当实现由选件类,一个对象标识符部件与另一个指定的对象标识符部件比较。

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

语法

声明
Function Compare ( _
    typeName As String, _
    identifier As Object(), _
    identifierPart As Integer, _
    value As Object _
) As Integer
int Compare(
    string typeName,
    Object[] identifier,
    int identifierPart,
    Object value
)
int Compare(
    String^ typeName, 
    array<Object^>^ identifier, 
    int identifierPart, 
    Object^ value
)
abstract Compare : 
        typeName:string * 
        identifier:Object[] * 
        identifierPart:int * 
        value:Object -> int 
function Compare(
    typeName : String, 
    identifier : Object[], 
    identifierPart : int, 
    value : Object
) : int

参数

  • identifier
    类型:array<System.Object[]
    数组标识数据对象的标识符部件。
  • identifierPart
    类型:System.Int32
    从零开始的索引。指示标识符的哪个部分标识符数组中比较。
  • value
    类型:System.Object
    比较标识符部件的值设置为。

返回值

类型:System.Int32
值小于零,在标识符部件小于功能比指定的;零,如果标识符部件处理指定值相等;值大于零,如果标识符部件大于指定值。

备注

此方法应使用比较规则与数据源相同保证对象的正确的唯一性在客户端上。

您可以处理某些复杂的情况是完整的源标识符。整体例如,Microsoft SQL Server的最新版本允许SQL Server实例是在标识符比较,而SQL Server实例的特定数据库可能不区分大小写,反之亦然区分大小写。这意味着,当比较架构时或表(显示为第二和的第三部分,分别,在完整的表标识符,是第一个部分的名称数据库),此方法的实现必须使用第一个标识符部件确定哪个数据库表是因此,使用哪种比较。

.NET Framework 安全性

请参见

参考

IVsDataObjectMemberComparer 接口

Compare 重载

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空间