Search Results for

    Show / Hide Table of Contents

    Class GuidUtility

    Provides methods for easy workign with guids

    Inheritance
    System.Object
    GuidUtility
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic
    Assembly: Simplic.CoreLib.dll
    Syntax
    public static class GuidUtility

    Fields

    | Improve this Doc View Source

    DnsNamespace

    The namespace for fully-qualified domain names (from RFC 4122, Appendix C).

    Declaration
    public static readonly Guid DnsNamespace
    Field Value
    Type Description
    System.Guid
    | Improve this Doc View Source

    IsoOidNamespace

    The namespace for ISO OIDs (from RFC 4122, Appendix C).

    Declaration
    public static readonly Guid IsoOidNamespace
    Field Value
    Type Description
    System.Guid
    | Improve this Doc View Source

    UrlNamespace

    The namespace for URLs (from RFC 4122, Appendix C).

    Declaration
    public static readonly Guid UrlNamespace
    Field Value
    Type Description
    System.Guid

    Methods

    | Improve this Doc View Source

    Create(Guid, String)

    Creates a name-based UUID using the algorithm from RFC 4122 §4.3.

    Declaration
    public static Guid Create(Guid namespaceId, string name)
    Parameters
    Type Name Description
    System.Guid namespaceId

    The ID of the namespace.

    System.String name

    The name (within that namespace).

    Returns
    Type Description
    System.Guid

    A UUID derived from the namespace and name.

    Remarks

    See Generating a deterministic GUID.

    | Improve this Doc View Source

    Create(Guid, String, Int32)

    Creates a name-based UUID using the algorithm from RFC 4122 §4.3.

    Declaration
    public static Guid Create(Guid namespaceId, string name, int version)
    Parameters
    Type Name Description
    System.Guid namespaceId

    The ID of the namespace.

    System.String name

    The name (within that namespace).

    System.Int32 version

    The version number of the UUID to create; this value must be either 3 (for MD5 hashing) or 5 (for SHA-1 hashing).

    Returns
    Type Description
    System.Guid

    A UUID derived from the namespace and name.

    Remarks

    See Generating a deterministic GUID.

    | Improve this Doc View Source

    Create(String)

    Creates a name-base UUID using IsoOidNamespace and intern md5 hash

    Declaration
    public static Guid Create(string name)
    Parameters
    Type Name Description
    System.String name
    Returns
    Type Description
    System.Guid
    | Improve this Doc View Source

    GetNewIfNullOrEmpty(Nullable<Guid>)

    Create a new guid if it is currently null or empty

    Declaration
    public static Guid GetNewIfNullOrEmpty(Guid? guid)
    Parameters
    Type Name Description
    System.Nullable<System.Guid> guid

    Input guid

    Returns
    Type Description
    System.Guid

    Return the existing guid if it not null or a 0-Guid, else it's creating a new one

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx