Claim.Equals(Object) Method

Definition

判斷指定的物件是否表示與目前 Claim 物件相同的宣告。Determines whether the specified object represents the same claim as the current Claim object.

public:
 override bool Equals(System::Object ^ obj);
public override bool Equals (object obj);
override this.Equals : obj -> bool
Public Overrides Function Equals (obj As Object) As Boolean

Parameters

obj
Object

要與目前 Claim 比較的物件。The object to compare with the current Claim.

Returns

Boolean

如果 true 表示與目前 obj 相同的宣告則為 Claim,否則為 falsetrue if obj represents the same claim as the current Claim; otherwise false.

Remarks

這個方法會覆寫 Equals 方法,可比較 Claim 物件是否相同。This method overrides the Equals method to provide equality comparisons for Claim objects. 比較過程包含對 RightClaimTypeResource 屬性的值進行三項比較,The comparison consists of three comparisons on the values of the Right, ClaimType, and Resource properties. 針對 Resource 屬性使用的比較演算法需視 ClaimType 屬性的值而定。The comparison algorithm that is used on the Resource property depends upon the value of the ClaimType property. 下表詳細列出指定之宣告類型所使用的比較演算法。The following table details the comparison algorithm that is used for the specified claim type.

宣告類型Claim type 比較Comparison
Dns 針對資源且字串不區分大小寫的比較。Case insensitive string comparison on the resource.
Hash 以位元組逐一比較。Byte-by-byte comparison.
Rsa 針對演算法的模數和指數部分進行位元組逐一比較。Byte-by-byte comparison on the Modulus and Exponent parts of the algorithm.
Thumbprint 以位元組逐一比較。Byte-by-byte comparison.
Upn SID 比較。SID comparison.
X500DistinguishedName 正規化的 X.500 未經處理資料比較。Normalized X.500 raw data comparison.

Applies to