Search Results for

    Show / Hide Table of Contents

    Class Url

    An url is the internal type used to address any resource on the controller.

    Inheritance
    System.Object
    Url
    BlockUrl
    Implements
    System.Collections.IEnumerable
    Namespace: ABB.Robotics
    Assembly: ABB.Robotics.Controllers.PC.dll
    Syntax
    public class Url : IEnumerable
    Remarks

    Only for internal use.

    Constructors

    Url(String, Int32)

    Private constructor to avoid external object construction.

    Declaration
    protected Url(string url, int padding)
    Parameters
    Type Name Description
    System.String url

    The url.

    System.Int32 padding

    The padding.

    Url(String, Int32, Boolean)

    Private constructor to avoid external object construction.

    Declaration
    protected Url(string url, int padding, bool incompleteUrl)
    Parameters
    Type Name Description
    System.String url

    The url to create object for.

    System.Int32 padding

    The padding of url object.

    System.Boolean incompleteUrl

    Flag to determine if incomplete urls are allowed.

    Fields

    DefaultPadding

    The default padding size.

    Declaration
    protected const int DefaultPadding = 3
    Field Value
    Type Description
    System.Int32
    Remarks

    Only for internal use.

    DefaultResizeValue

    The default resize value.

    Declaration
    protected const int DefaultResizeValue = 3
    Field Value
    Type Description
    System.Int32
    Remarks

    Only for internal use.

    Separator

    The separator used within a url.

    Declaration
    protected const char Separator = '/'
    Field Value
    Type Description
    System.Char
    Remarks

    Only for internal use.

    SeparatorString

    The separator as string.

    Declaration
    protected const string SeparatorString = "/"
    Field Value
    Type Description
    System.String
    Remarks

    Only for internal use.

    Properties

    InternalInsertAt

    internal .

    Declaration
    protected int InternalInsertAt { get; set; }
    Property Value
    Type Description
    System.Int32

    InternalUrl

    internal .

    Declaration
    protected string InternalUrl { get; }
    Property Value
    Type Description
    System.String

    Item[Int32]

    indexer for url to get the corresponding level in the url

    Declaration
    public string this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    System.String

    LastPart

    gets the LastPart of the url

    Declaration
    public string LastPart { get; }
    Property Value
    Type Description
    System.String

    LastPartAsName

    Returns the last part of the Url as a name, ie without the preceding /

    Declaration
    public string LastPartAsName { get; }
    Property Value
    Type Description
    System.String

    Length

    the length of the url

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    System.Int32

    RelativeSystemId

    Returns the URL relative to the sytem id. I.e "/RAPID" instead of "{systemId}/RAPID"

    Declaration
    public string RelativeSystemId { get; }
    Property Value
    Type Description
    System.String

    Methods

    Append(Url, String)

    Appends a single string to current url.

    Declaration
    public static Url Append(Url root, string part1)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String part1

    New part to add, must be prefixed with /

    Returns
    Type Description
    Url

    The new url.

    Append(Url, String, Boolean)

    Appends a single string to current url.

    Declaration
    public static Url Append(Url root, string part1, bool appendSlash)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String part1

    New part to add, must be prefixed with /

    System.Boolean appendSlash

    True to append slash.

    Returns
    Type Description
    Url

    The new url.

    Append(Url, String, String, Boolean)

    Appends a single string to current url.

    Declaration
    public static Url Append(Url root, string part1, string part2, bool appendSlash)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String part1

    New part to add, must be prefixed with /

    System.String part2

    New part to add, must be prefixed with /

    System.Boolean appendSlash

    True to append slash.

    Returns
    Type Description
    Url

    The new url.

    Append(Url, String, String, String, Boolean)

    Appends a single string to current url.

    Declaration
    public static Url Append(Url root, string part1, string part2, string part3, bool appendSlash)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String part1

    New part to add, must be prefixed with /

    System.String part2

    New part to add, must be prefixed with /

    System.String part3

    New part to add, must be prefixed with /

    System.Boolean appendSlash

    True to append slash.

    Returns
    Type Description
    Url

    The new url.

    Append(Url, String, String, String, String, Boolean)

    Appends a single string to current url.

    Declaration
    public static Url Append(Url root, string part1, string part2, string part3, string part4, bool appendSlash)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String part1

    New part to add, must be prefixed with /

    System.String part2

    New part to add, must be prefixed with /

    System.String part3

    New part to add, must be prefixed with /

    System.String part4

    New part to add, must be prefixed with /

    System.Boolean appendSlash

    True to append slash.

    Returns
    Type Description
    Url

    The new url.

    Append(Url, String[])

    Appends the content to the url, all items will get an appended slash.

    Declaration
    public static Url Append(Url root, params string[] parts)
    Parameters
    Type Name Description
    Url root

    Root url.

    System.String[] parts

    Parameter list.

    Returns
    Type Description
    Url

    The complete url.

    Build(String, String)

    Appends two strings into a correct url object.

    Declaration
    public static string Build(string s1, string s2)
    Parameters
    Type Name Description
    System.String s1

    String one.

    System.String s2

    String two.

    Returns
    Type Description
    System.String

    The url from the combined strings.

    Create(String)

    Creates a new url from a string.

    Declaration
    public static Url Create(string url)
    Parameters
    Type Name Description
    System.String url

    The string.

    Returns
    Type Description
    Url

    The url object.

    CreateChild(Url)

    Creates a "child" url object.

    Declaration
    public static Url CreateChild(Url parent)
    Parameters
    Type Name Description
    Url parent

    The parent url object.

    Returns
    Type Description
    Url

    The new Url object.

    CreateEmpty()

    Creates a new empty url object.

    Declaration
    public static Url CreateEmpty()
    Returns
    Type Description
    Url

    The empty url object.

    CreateEmpty(Int32)

    Creates a new empty url object.

    Declaration
    protected static Url CreateEmpty(int padding)
    Parameters
    Type Name Description
    System.Int32 padding

    The padding.

    Returns
    Type Description
    Url

    Equals(Object)

    Checks if this instance is equal to the supplied object instance that is passed to this method.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj

    The object to compare this instance with.

    Returns
    Type Description
    System.Boolean

    True if the objects are considered equal.

    Overrides
    System.Object.Equals(System.Object)

    Extract(String)

    This method extracts the formatted controller Url from any url string.

    Declaration
    public static string Extract(string url)
    Parameters
    Type Name Description
    System.String url

    Url to extract controller Url from-

    Returns
    Type Description
    System.String

    The url of the controller.

    GetEnumerator()

    IEnumerable implementation for Url.

    Declaration
    public IEnumerator GetEnumerator()
    Returns
    Type Description
    System.Collections.IEnumerator

    The enumerator object.

    GetHashCode()

    Gets the hash code of the url, this is the same as the hash code for a string with the same content, ie we use the GetHashCode() method on the build _url field to get this value.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    The hash code for the url.

    Overrides
    System.Object.GetHashCode()

    GetInternalParts()

    Gets the internal parts of the url as a string array.

    Declaration
    protected string[] GetInternalParts()
    Returns
    Type Description
    System.String[]

    The internal parts.

    GetParent()

    Gets the parent url.

    Declaration
    public Url GetParent()
    Returns
    Type Description
    Url

    The parent url.

    GetParent(Int32)

    Gets the parent url at specified level.

    Declaration
    public Url GetParent(int level)
    Parameters
    Type Name Description
    System.Int32 level

    Level or parent, 1 is immediate parent.

    Returns
    Type Description
    Url

    The parent url.

    ToString()

    \Returns the Url in string form.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String

    The url as string.

    Overrides
    System.Object.ToString()

    ToString(Int32)

    \Returns the Url in string form.

    Declaration
    public string ToString(int startIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The index to start at.

    Returns
    Type Description
    System.String

    The url as string.

    ToString(Int32, Int32)

    \Returns the Url in string form.

    Declaration
    public string ToString(int startIndex, int stopIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex

    The index to start extraction from.

    System.Int32 stopIndex

    The index to stop extraction from.

    Returns
    Type Description
    System.String

    The url as string.

    Operators

    Addition(Url, String)

    Add operator between a url and a string.

    Declaration
    public static Url operator +(Url url1, string url2)
    Parameters
    Type Name Description
    Url url1

    The url object.

    System.String url2

    The string.

    Returns
    Type Description
    Url

    The new url with the string appended.

    Equality(Url, Url)

    Equality operator between two urls.

    Declaration
    public static bool operator ==(Url x, Url y)
    Parameters
    Type Name Description
    Url x

    The left hand statement.

    Url y

    The right hand statement.

    Returns
    Type Description
    System.Boolean

    True if the urls are considered equal.

    Equality(Url, String)

    Equality operator between two urls.

    Declaration
    public static bool operator ==(Url x, string y)
    Parameters
    Type Name Description
    Url x

    The url object.

    System.String y

    The string object.

    Returns
    Type Description
    System.Boolean

    True if the string and url are considered equal.

    Equality(String, Url)

    Equality operator between two urls.

    Declaration
    public static bool operator ==(string x, Url y)
    Parameters
    Type Name Description
    System.String x

    The url object.

    Url y

    The string object.

    Returns
    Type Description
    System.Boolean

    True if the string and url are considered equal.

    Implicit(Url to String)

    implicit conversions from url to string handled by this method

    Declaration
    public static implicit operator string (Url url)
    Parameters
    Type Name Description
    Url url

    url to convert into a string

    Returns
    Type Description
    System.String

    the corresponding string

    Inequality(Url, Url)

    Inequality operator between two urls.

    Declaration
    public static bool operator !=(Url x, Url y)
    Parameters
    Type Name Description
    Url x

    The left hand statement.

    Url y

    The right hand statement.

    Returns
    Type Description
    System.Boolean

    True if objects are not equal.

    Inequality(Url, String)

    Inequality operator between a url and a string.

    Declaration
    public static bool operator !=(Url x, string y)
    Parameters
    Type Name Description
    Url x

    The url object.

    System.String y

    The string object.

    Returns
    Type Description
    System.Boolean

    True if the string and the url isn't considered equal.

    Inequality(String, Url)

    Inequality operator between a url and a string.

    Declaration
    public static bool operator !=(string x, Url y)
    Parameters
    Type Name Description
    System.String x

    The url object.

    Url y

    The string object.

    Returns
    Type Description
    System.Boolean

    True if the string and the url isn't considered equal.

    Implements

    System.Collections.IEnumerable
    In This Article
    Back to top Copyright © 2025 ABB