Uniquifier.Uniquify Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
Uniquify<T>(String, IReadOnlyDictionary<String,T>, Int32) |
Creates a unique identifier by appending a number to the given string. |
Uniquify<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, Int32) |
Creates a unique identifier by appending a number to the given string. |
Uniquify<T>(String, IReadOnlyDictionary<String,T>, Int32)
Creates a unique identifier by appending a number to the given string.
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
Type Parameters
- T
The type of the object the identifier maps to.
Parameters
- currentIdentifier
- String
The base identifier.
- otherIdentifiers
- IReadOnlyDictionary<String,T>
A dictionary where the identifier will be used as a key.
- maxLength
- Int32
The maximum length of the identifier.
Returns
A unique identifier.
Applies to
Uniquify<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, Int32)
Creates a unique identifier by appending a number to the given string.
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
Type Parameters
- TKey
The type of the key that contains the identifier.
- TValue
The type of the object the identifier maps to.
Parameters
- currentIdentifier
- String
The base identifier.
- otherIdentifiers
- IReadOnlyDictionary<TKey,TValue>
A dictionary where the identifier will be used as part of the key.
- maxLength
- Int32
The maximum length of the identifier.
Returns
A unique identifier.
Applies to
Entity Framework