Language

Uniquifier.Uniquify Method

Definition

Overloads

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

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

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

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

Uniquify(String, ISet<String>, Int32, 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<T>(String, Dictionary<String,T>, Int32, String, Int32)

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

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

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

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

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

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

Source:
Uniquifier.cs
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(String, HashSet<String>, Int32, 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.HashSet<string> otherIdentifiers, int maxLength, string? suffix = default, int uniquifier = 1);
static member Uniquify : string * System.Collections.Generic.HashSet<string> * int * string * int -> string
Public Shared Function Uniquify (currentIdentifier As String, otherIdentifiers As HashSet(Of String), maxLength As Integer, Optional suffix As String = Nothing, Optional uniquifier As Integer = 1) As String

Parameters

currentIdentifier
String

The base identifier.

otherIdentifiers
HashSet<String>

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

maxLength
Int32

The maximum length of the identifier.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

Returns

A unique identifier.

Applies to

Uniquify(String, ISet<String>, Int32, 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, int maxLength, string? suffix = default, int uniquifier = 1);
static member Uniquify : string * System.Collections.Generic.ISet<string> * int * string * int -> string
Public Shared Function Uniquify (currentIdentifier As String, otherIdentifiers As ISet(Of String), maxLength As Integer, Optional suffix As String = Nothing, Optional uniquifier As Integer = 1) As String

Parameters

currentIdentifier
String

The base identifier.

otherIdentifiers
ISet<String>

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

maxLength
Int32

The maximum length of the identifier.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

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
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
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<T>(String, Dictionary<String,T>, Int32, 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.Dictionary<string,T> otherIdentifiers, int maxLength, string? suffix = default, int uniquifier = 1);
static member Uniquify : string * System.Collections.Generic.Dictionary<string, 'T> * int * string * int -> string
Public Shared Function Uniquify(Of T) (currentIdentifier As String, otherIdentifiers As Dictionary(Of String, T), maxLength As Integer, Optional suffix As String = Nothing, Optional uniquifier As Integer = 1) As String

Type Parameters

T

The type of the object the identifier maps to.

Parameters

currentIdentifier
String

The base identifier.

otherIdentifiers
Dictionary<String,T>

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

maxLength
Int32

The maximum length of the identifier.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

Returns

A unique identifier.

Applies to

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

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

Returns

A unique identifier.

Applies to

Uniquify<T>(String, Dictionary<String,T>, Func<ReadOnlySpan<Char>,ReadOnlySpan<Char>>, Int32, 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.Dictionary<string,T> otherIdentifiers, Func<ReadOnlySpan<char>,ReadOnlySpan<char>> keySelector, int maxLength, string? suffix = default, int uniquifier = 1);
static member Uniquify : string * System.Collections.Generic.Dictionary<string, 'T> * Func<ReadOnlySpan<char>, ReadOnlySpan<char>> * int * string * int -> string
Public Shared Function Uniquify(Of T) (currentIdentifier As String, otherIdentifiers As Dictionary(Of String, T), keySelector As Func(Of ReadOnlySpan(Of Char), ReadOnlySpan(Of Char)), maxLength As Integer, Optional suffix As String = Nothing, Optional uniquifier As Integer = 1) As String

Type Parameters

T

The type of the object the identifier maps to.

Parameters

currentIdentifier
String

The base identifier.

otherIdentifiers
Dictionary<String,T>

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

keySelector
Func<ReadOnlySpan<Char>,ReadOnlySpan<Char>>

Creates the key object from an identifier.

maxLength
Int32

The maximum length of the identifier.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

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
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
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

Uniquify<TKey,TValue>(String, IReadOnlyDictionary<TKey,TValue>, Func<String,TKey>, Int32, 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, int maxLength, string? suffix = default, int uniquifier = 1);
static member Uniquify : string * System.Collections.Generic.IReadOnlyDictionary<'Key, 'Value> * Func<string, 'Key> * int * 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), maxLength As Integer, Optional suffix As String = Nothing, Optional uniquifier As Integer = 1) 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.

suffix
String

An optional suffix to add after the uniquifier.

uniquifier
Int32

An optional starting number for the uniquifier.

Returns

A unique identifier.

Applies to