共用方式為


Uniquifier.Uniquify 方法

定義

多載

Uniquify<T>(String, IReadOnlyDictionary<String,T>, Int32)

藉由將數位附加至指定的字串,以建立唯一識別碼。

Uniquify<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, Int32)

藉由將數位附加至指定的字串,以建立唯一識別碼。

Uniquify<T>(String, IReadOnlyDictionary<String,T>, Int32)

藉由將數位附加至指定的字串,以建立唯一識別碼。

public static string Uniquify<T> (string currentIdentifier, System.Collections.Generic.IReadOnlyDictionary<string,T> otherIdentifiers, int maxLength);
static member Uniquify : string * System.Collections.Generic.IReadOnlyDictionary<string, 'T> * int -> string
Public Shared Function Uniquify(Of T) (currentIdentifier As String, otherIdentifiers As IReadOnlyDictionary(Of String, T), maxLength As Integer) As String

類型參數

T

識別碼所對應之物件的型別。

參數

currentIdentifier
String

基底識別碼。

otherIdentifiers
IReadOnlyDictionary<String,T>

識別碼將做為索引鍵的字典。

maxLength
Int32

識別碼的最大長度。

傳回

唯一識別碼。

適用於

Uniquify<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, Int32)

藉由將數位附加至指定的字串,以建立唯一識別碼。

public static string Uniquify<TKey,TValue> (string currentIdentifier, System.Collections.Generic.IReadOnlyDictionary<TKey,TValue> otherIdentifiers, Func<string,TKey> keySelector, int maxLength);
static member Uniquify : string * System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value> * Func<string, 'Key> * int -> string
Public Shared Function Uniquify(Of TKey, TValue) (currentIdentifier As String, otherIdentifiers As IReadOnlyDictionary(Of TKey, TValue), keySelector As Func(Of String, TKey), maxLength As Integer) As String

類型參數

TKey

包含識別碼的索引鍵類型。

TValue

識別碼所對應之物件的型別。

參數

currentIdentifier
String

基底識別碼。

otherIdentifiers
IReadOnlyDictionary<TKey,TValue>

識別碼將做為索引鍵一部分的字典。

keySelector
Func<String,TKey>

從識別碼建立金鑰組象。

maxLength
Int32

識別碼的最大長度。

傳回

唯一識別碼。

適用於