Share via


Uniquifier.Uniquify Method

Definition

Overloads

Uniquify(String, ISet<String>, String, 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.

Uniquify<T>(String, IReadOnlyDictionary<String,T>, String, 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<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, String, Int32)

Creates a unique identifier by appending a number to the given string.

Uniquify(String, ISet<String>, String, Int32)

Source:
Uniquifier.cs

Creates a unique identifier by appending a number to the given string.

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

Parameters

currentIdentifier
String

The base identifier.

otherIdentifiers
ISet<String>

A dictionary where the identifier will be used as part of the key.

suffix
String

An optional suffix to add after the uniquifier.

maxLength
Int32

The maximum length of the identifier.

Returns

A unique identifier.

Applies to

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

Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs

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<T>(String, IReadOnlyDictionary<String,T>, String, Int32)

Source:
Uniquifier.cs

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, string? suffix, int maxLength);
static member Uniquify : string * System.Collections.Generic.IReadOnlyDictionary<string, 'T> * string * int -> string
Public Shared Function Uniquify(Of T) (currentIdentifier As String, otherIdentifiers As IReadOnlyDictionary(Of String, T), suffix As String, 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.

suffix
String

An optional suffix to add after the uniquifier.

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)

Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs
Source:
Uniquifier.cs

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.

keySelector
Func<String,TKey>

Creates the key object from an identifier.

maxLength
Int32

The maximum length of the identifier.

Returns

A unique identifier.

Applies to

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

Source:
Uniquifier.cs

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, string? suffix, int maxLength);
static member Uniquify : string * System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value> * Func<string, 'Key> * string * int -> string
Public Shared Function Uniquify(Of TKey, TValue) (currentIdentifier As String, otherIdentifiers As IReadOnlyDictionary(Of TKey, TValue), keySelector As Func(Of String, TKey), suffix As String, 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.

keySelector
Func<String,TKey>

Creates the key object from an identifier.

suffix
String

An optional suffix to add after the uniquifier.

maxLength
Int32

The maximum length of the identifier.

Returns

A unique identifier.

Applies to