Search Results for

    Show / Hide Table of Contents
    View Source

    Class UdiParser

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core
    Assembly: Umbraco.Core.dll
    Syntax
    public sealed class UdiParser

    Methods

    View Source

    GetKnownUdiTypes()

    Declaration
    public static Dictionary<string, UdiType> GetKnownUdiTypes()
    Returns
    Type Description
    Umbraco.Cms.Core.Dictionary<System.String, UdiType>
    View Source

    Parse(String)

    Converts the string representation of an entity identifier into the equivalent Udi instance.

    Declaration
    public static Udi Parse(string s)
    Parameters
    Type Name Description
    System.String s

    The string to convert.

    Returns
    Type Description
    Udi

    An Udi instance that contains the value that was parsed.

    View Source

    Parse(String, Boolean)

    Converts the string representation of an entity identifier into the equivalent Udi instance.

    Declaration
    public static Udi Parse(string s, bool knownTypes)
    Parameters
    Type Name Description
    System.String s

    The string to convert.

    System.Boolean knownTypes

    A value indicating whether to only deal with known types.

    Returns
    Type Description
    Udi

    An Udi instance that contains the value that was parsed.

    Remarks

    If knownTypes is true, and the string could not be parsed because the entity type was not known, the method succeeds but sets udito an UnknownTypeUdi value.

    If knownTypes is true, assemblies are not scanned for types, and therefore only builtin types may be known. Unless scanning already took place.

    View Source

    RegisterUdiType(String, UdiType)

    Registers a custom entity type.

    Declaration
    public static void RegisterUdiType(string entityType, UdiType udiType)
    Parameters
    Type Name Description
    System.String entityType
    UdiType udiType
    View Source

    ResetUdiTypes()

    Internal API for tests to resets all udi types back to only the known udi types.

    Declaration
    public static void ResetUdiTypes()
    View Source

    TryParse(String, Boolean, out Udi)

    Converts the string representation of an entity identifier into the equivalent Udi instance.

    Declaration
    public static bool TryParse(string s, bool knownTypes, out Udi udi)
    Parameters
    Type Name Description
    System.String s

    The string to convert.

    System.Boolean knownTypes

    A value indicating whether to only deal with known types.

    Udi udi

    An Udi instance that contains the value that was parsed.

    Returns
    Type Description
    System.Boolean

    A boolean value indicating whether the string could be parsed.

    Remarks

    If knownTypes is true, and the string could not be parsed because the entity type was not known, the method returns false but still sets udi to an UnknownTypeUdi value.

    If knownTypes is true, assemblies are not scanned for types, and therefore only builtin types may be known. Unless scanning already took place.

    View Source

    TryParse(String, out Udi)

    Converts the string representation of an entity identifier into the equivalent Udi instance.

    Declaration
    public static bool TryParse(string s, out Udi udi)
    Parameters
    Type Name Description
    System.String s

    The string to convert.

    Udi udi

    An Udi instance that contains the value that was parsed.

    Returns
    Type Description
    System.Boolean

    A boolean value indicating whether the string could be parsed.

    View Source

    TryParse<T>(String, out T)

    Converts the string representation of an entity identifier into the equivalent Udi instance.

    Declaration
    public static bool TryParse<T>(string s, out T udi)
        where T : Udi
    Parameters
    Type Name Description
    System.String s

    The string to convert.

    T udi

    An Udi instance that contains the value that was parsed.

    Returns
    Type Description
    System.Boolean

    A boolean value indicating whether the string could be parsed.

    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    • Methods
      • GetKnownUdiTypes()
      • Parse(String)
      • Parse(String, Boolean)
      • RegisterUdiType(String, UdiType)
      • ResetUdiTypes()
      • TryParse(String, Boolean, out Udi)
      • TryParse(String, out Udi)
      • TryParse<T>(String, out T)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX