Show / Hide Table of Contents

    Class GuidUtils

    Guid Utils

    Inheritance
    Object
    GuidUtils
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Microsoft.Graph.Communications.Common
    Assembly: Microsoft.Graph.Communications.Common.dll
    Syntax
    public static class GuidUtils

    Methods

    EnsureNotEmpty(Guid)

    Ensures Guid is not empty by generating a random guid if it is empty

    Declaration
    public static Guid EnsureNotEmpty(this Guid guid)
    Parameters
    Type Name Description
    Guid guid

    input guid

    Returns
    Type Description
    Guid

    A guaranteed guid that is not empty

    EnsureNotEmpty(Nullable<Guid>)

    Ensures Guid is not empty by generating a random guid if it is empty

    Declaration
    public static Guid EnsureNotEmpty(this Guid? guid)
    Parameters
    Type Name Description
    Nullable<Guid> guid

    input guid

    Returns
    Type Description
    Guid

    A guaranteed guid that is not empty

    ParseOrNew(String)

    Parse and return the guid if valid else return new guid

    Declaration
    public static Guid ParseOrNew(string input)
    Parameters
    Type Name Description
    String input

    input

    Returns
    Type Description
    Guid

    Guid of input or new guid

    Back to top Copyright (c) Microsoft Corporation. All rights reserved.