Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class Microsoft.​IdentityModel.​Tokens.​UniqueId

Assembly: Microsoft.IdentityModel.Tokens

Inheritance: object → UniqueId

Generates unique IDs.

Methods

public static string
CreateUniqueId​()
Creates a unique ID suitable for use in an xml:id field. The value is not hard to guess but is unique.
Returns The unique ID.
public static string
CreateUniqueId​(string prefix)
Creates a unique ID similar to that created by CreateNonRandomId, but instead of an underscore, the supplied prefix is used.
Returns The unique ID, with the given prefix.
prefix The prefix to use.
public static string
CreateRandomId​()
Creates a unique, random ID suitable for use in an xml:id field. The value is hard to guess and unique.
Returns The unique ID.
public static string
CreateRandomId​(string prefix)
Creates a unique, random ID similar to that created by CreateRandomId, but instead of an underscore, the supplied prefix is used.
Returns The random URI.
prefix The prefix to use.
public static System.​Uri
CreateRandomUri​()
Creates a unique, random ID suitable for use as a URI. The value is hard to guess and unique. The URI is in the urn:uuid: namespace.
Returns The random URI.
public bool
Equals​(object obj)
Inherited from object
protected void
Finalize​()
Inherited from object
public int
GetHashCode​()
Inherited from object
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object
public string
ToString​()
Inherited from object