ModelCollationComparer 类

比较两个 String 对象、两个 ModelIdentifier 对象或两个 IList<T> 对象是否相等或二者之间的关系。

继承层次结构

System.Object
  Microsoft.Data.Schema.SchemaModel.ModelCollationComparer

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

语法

声明
Public Class ModelCollationComparer _
    Implements IEqualityComparer(Of String), IComparer(Of String),  _
    IEqualityComparer(Of ModelIdentifier), IComparer(Of ModelIdentifier), IEqualityComparer(Of IList(Of String)),  _
    IComparer(Of IList(Of String))
public class ModelCollationComparer : IEqualityComparer<string>, 
    IComparer<string>, IEqualityComparer<ModelIdentifier>, IComparer<ModelIdentifier>, 
    IEqualityComparer<IList<string>>, IComparer<IList<string>>
public ref class ModelCollationComparer : IEqualityComparer<String^>, 
    IComparer<String^>, IEqualityComparer<ModelIdentifier^>, IComparer<ModelIdentifier^>, 
    IEqualityComparer<IList<String^>^>, IComparer<IList<String^>^>
type ModelCollationComparer =  
    class
        interface IEqualityComparer<string>
        interface IComparer<string>
        interface IEqualityComparer<ModelIdentifier>
        interface IComparer<ModelIdentifier>
        interface IEqualityComparer<IList<string>>
        interface IComparer<IList<string>>
    end
public class ModelCollationComparer implements IEqualityComparer<String>, IComparer<String>, IEqualityComparer<ModelIdentifier>, IComparer<ModelIdentifier>, IEqualityComparer<IList<String>>, IComparer<IList<String>>

ModelCollationComparer 类型公开以下成员。

构造函数

  名称 说明
公共方法 ModelCollationComparer 使用所提供的排序规则初始化 ModelCollationComparer 类的新实例。

页首

属性

  名称 说明
公共属性 Collation

页首

方法

  名称 说明
公共方法 Compare(IList<String>, IList<String>) 比较两个指定的 String 对象列表,并返回一个整数,该整数指示二者在排序顺序中的相互关系。
公共方法 Compare(String, String) 比较两个指定的 String 对象,并返回一个整数,该整数指示二者在排序顺序中的相互关系。
公共方法 Compare(ModelIdentifier, ModelIdentifier) 比较两个指定的 ModelIdentifier 对象,并返回一个整数,该整数指示二者在排序顺序中的相互关系。
公共方法 Equals(Object) 确定指定的 Object 是否等于当前的 Object。 (继承自 Object。)
公共方法 Equals(IList<String>, IList<String>) 指示所提供的两个 string 类型列表是否相等。
公共方法 Equals(String, String) 指示两个字符串是否相等。
公共方法 Equals(ModelIdentifier, ModelIdentifier) 指示两个提供的标识符是否相等。
受保护的方法 Finalize 允许对象在“垃圾回收”回收之前尝试释放资源并执行其他清理操作。 (继承自 Object。)
公共方法 GetHashCode() 用作特定类型的哈希函数。 (继承自 Object。)
公共方法 GetHashCode(IList<String>) 用作所提供的 String 类型列表的哈希函数。
公共方法 GetHashCode(String) 用作所提供的 String 的哈希函数。
公共方法 GetHashCode(ModelIdentifier) 用作所提供的 ModelIdentifier 的哈希函数。
公共方法 GetType 获取当前实例的 Type。 (继承自 Object。)
受保护的方法 MemberwiseClone 创建当前 Object 的浅表副本。 (继承自 Object。)
公共方法 ToString 返回表示当前对象的字符串。 (继承自 Object。)

页首

线程安全

此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。

请参见

参考

Microsoft.Data.Schema.SchemaModel 命名空间

IEqualityComparer<T>

IComparer<T>

ModelIdentifier