MetaName
References[IoId("00000000-b73f-472f-82f8-36e0cfdab6f4")]
public sealed class MetaName : IComparable<MetaName>, IEquatable<MetaName>, IStorable
Represents an immutable data name. We recommend not constructing new names all the time, but instead to have a collection of static names which are used over and over again. This will both result in performance increases and fewer naming mistakes.
Constructors
MetaName
#obsoleteUse MetaName.Create() instead.
Create a new non-transformable name from a collection of strings.
Parameters:
| elements (params string[]) | Elements of name. The elements may not contain periods or the wildcard symbols '*' and '?'. We recommend using CamelCase alpha-numeric characters without whitespace. |
Fields
Properties
Indexers
Methods
AppendElement
#Create a new name whch is similar to this one plus an extra element.
Parameters:
| element (string) | Element to append. |
Returns: New name.
CompareTo
#Comparison test. This test ignores the IsTransformable property.
Parameters:
| other (MetaName) | Name to compare to. |
Returns: Comparison result.
Create
#Gets a name made from a collection of strings.
Create
#Gets a name made from a single name element.
Create
#Gets a non-transformable name made from a collection of strings.
Parameters:
| elements (params string[]) | Elements of name. The elements may not contain periods or the wildcard symbols '*' and '?'. We recommend using CamelCase alpha-numeric characters without whitespace. |
Create
#Gets a non-transformable name made from a single name element.
Parameters:
| element (string) | One and only element of name. The element may not contain periods or the wildcard symbols '*' and '?'. |
Equals
#Test for equality. This test ignores the IsTransformable property.
Parameters:
| other (MetaName) | UserDataName to compare against. |
Returns: True if objects are equal, false if not.
Equals
#Test for equality.
Parameters:
| obj (object) | TextElements to compare against. |
Returns: True if objects are equal, false if not.
Overrides: Object.Equals
Match
#Test to see whether this name matches a pattern. Matching is always case-insensitive.
Parameters:
| pattern (string) | Pattern to match. |
Returns: True if pattern matches this name.
Parse
#Creates a new name from a full path. Periods in the path will be used as splitting indices. The path should not contain consecutive periods or the wildcard symbols '*' and '?'. We recommend using CamelCase alpha-numeric characters without whitespace.
Parameters:
| path (string) | Path to parse. |
Returns: Name that represents the path.
RemoveLastElement
#Create a new name which is similar to this one minus the last element. Names with only one element cannot be reduced.
Returns: New name.
ToArray
#Gets an array of strings which mimics the elements in this name.
Returns: Array of name element.
TryParse
#Creates a new name from a full path. Periods in the path will be used as splitting indices. The path should not contain consecutive periods or the wildcard symbols '*' and '?'. We recommend using CamelCase alpha-numeric characters without whitespace.
Parameters:
| path (string) | Path to parse. |
Returns: Name that represents the path.
Operators
Convertors
| Operation | Result | Description | ||
|---|---|---|---|---|
| implicit | string | MetaName | Convert a string into a MetaName, using TryParse(string). | |