docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CollectionPath

    Represents a path to an element.

    Implements
    IEquatable<CollectionPath>
    IEquatable<string>
    Inherited Members
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Cloud.Assets
    Assembly: solution.dll
    Syntax
    public readonly struct CollectionPath : IEquatable<CollectionPath>, IEquatable<string>

    Constructors

    CollectionPath(string)

    Initializes and returns an instance of CollectionPath

    Declaration
    public CollectionPath(string path)
    Parameters
    Type Name Description
    string path

    A path.

    Properties

    IsEmpty

    Returns whether the path is empty.

    Declaration
    public bool IsEmpty { get; }
    Property Value
    Type Description
    bool

    Length

    Returns the length of the path.

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

    Methods

    BuildPath(params string[])

    Creates a string path in the format of a CollectionPath from the given inputs.

    Declaration
    public static string BuildPath(params string[] components)
    Parameters
    Type Name Description
    string[] components

    The individual elements of the path.

    Returns
    Type Description
    string

    A string path combining all inputs.

    CombinePaths(CollectionPath, CollectionPath)

    Creates a new path from the given paths.

    Declaration
    public static CollectionPath CombinePaths(CollectionPath startPath, CollectionPath relativePath)
    Parameters
    Type Name Description
    CollectionPath startPath

    The beginning of the new path.

    CollectionPath relativePath

    The end of the new path.

    Returns
    Type Description
    CollectionPath

    A new CollectionPath that is the combination of the inputs.

    Contains(string)

    Checks whether the path contains the given string.

    Declaration
    public bool Contains(string str)
    Parameters
    Type Name Description
    string str

    A string to verify.

    Returns
    Type Description
    bool

    True if the parameter string is contained within the path.

    EndsWith(string)

    Checks whether the path ends with the given string.

    Declaration
    public bool EndsWith(string str)
    Parameters
    Type Name Description
    string str

    A string to verify.

    Returns
    Type Description
    bool

    True if the parameter string matches the end of the path.

    Equals(object)

    Indicates whether this instance and a specified object are equal.

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

    The object to compare with the current instance.

    Returns
    Type Description
    bool

    true if obj and this instance are the same type and represent the same value; otherwise, false.

    Overrides
    ValueType.Equals(object)

    Equals(string)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(string str)
    Parameters
    Type Name Description
    string str
    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    Equals(CollectionPath)

    Indicates whether the current object is equal to another object of the same type.

    Declaration
    public bool Equals(CollectionPath other)
    Parameters
    Type Name Description
    CollectionPath other

    An object to compare with this object.

    Returns
    Type Description
    bool

    true if the current object is equal to the other parameter; otherwise, false.

    GetHashCode()

    Returns the hash code for this instance.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A 32-bit signed integer that is the hash code for this instance.

    Overrides
    ValueType.GetHashCode()

    GetPathComponents()

    Returns the components of the path.

    Declaration
    public string[] GetPathComponents()
    Returns
    Type Description
    string[]

    An array of string representing every element in the path.

    StartsWith(string)

    Checks whether the path starts with the given string.

    Declaration
    public bool StartsWith(string str)
    Parameters
    Type Name Description
    string str

    A string to verify.

    Returns
    Type Description
    bool

    True if the parameter string matches the beginning of the path.

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    ValueType.ToString()

    Operators

    operator ==(CollectionPath, CollectionPath)

    Declaration
    public static bool operator ==(CollectionPath a, CollectionPath b)
    Parameters
    Type Name Description
    CollectionPath a
    CollectionPath b
    Returns
    Type Description
    bool

    implicit operator CollectionPath(string)

    Declaration
    public static implicit operator CollectionPath(string a)
    Parameters
    Type Name Description
    string a
    Returns
    Type Description
    CollectionPath

    implicit operator string(CollectionPath)

    Declaration
    public static implicit operator string(CollectionPath a)
    Parameters
    Type Name Description
    CollectionPath a
    Returns
    Type Description
    string

    operator !=(CollectionPath, CollectionPath)

    Declaration
    public static bool operator !=(CollectionPath a, CollectionPath b)
    Parameters
    Type Name Description
    CollectionPath a
    CollectionPath b
    Returns
    Type Description
    bool

    Implements

    IEquatable<T>
    IEquatable<T>

    Extension Methods

    CollectionPathUtilities.GetLastComponentOfPath(CollectionPath)
    CollectionPathUtilities.GetParentPath(CollectionPath, int)
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)