Class ComponentTypeTagPair
A type of a component and the tag expected to be associated with a component of that type in a
IComponentCollection or map generation step.
Inheritance
ComponentTypeTagPair
Assembly: GoRogue.dll
Syntax
public sealed class ComponentTypeTagPair : ValueType, IEquatable<ComponentTypeTagPair>, IMatchable<ComponentTypeTagPair>
Constructors
ComponentTypeTagPair(Type, String)
Declaration
public ComponentTypeTagPair(Type componentType, string tag)
Parameters
Type |
Name |
Description |
Type |
componentType |
|
String |
tag |
|
Fields
ComponentType
The type of component expected.
Declaration
public readonly Type ComponentType
Field Value
Tag
The tag expected to be associated with a component of the specified type.
Declaration
public readonly string Tag
Field Value
Methods
Deconstruct(out Type, out String)
Supports C# Deconstruction syntax.
Declaration
public void Deconstruct(out Type componentType, out string tag)
Parameters
Type |
Name |
Description |
Type |
componentType |
|
String |
tag |
|
Equals(ComponentTypeTagPair)
True if the given pair has the same component type and tag; false otherwise.
Declaration
public bool Equals(ComponentTypeTagPair other)
Parameters
Returns
Equals(Object)
True if the given object is a ComponentTypeTagPair and has the same component type and tag; false otherwise.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
FromTuple((Type, String))
Converts the tuple to an equivalent ComponentTypeTagPair.
Declaration
public static ComponentTypeTagPair FromTuple((Type, string) tuple)
Parameters
Returns
GetHashCode()
Returns a hash code based on all of the pair's field's.
Declaration
public override int GetHashCode()
Returns
Matches(ComponentTypeTagPair)
True if the given pair has the same component type and tag; false otherwise.
Declaration
public bool Matches(ComponentTypeTagPair other)
Parameters
Returns
ToString()
Returns a string representing the component type and its tag.
Declaration
public override string ToString()
Returns
ToTuple()
Converts the pair to an equivalent tuple.
Declaration
public (Type, string) ToTuple()
Returns
Operators
Equality(ComponentTypeTagPair, ComponentTypeTagPair)
True if the given pairs have the same component type and tag; false otherwise.
Declaration
public static bool operator ==(ComponentTypeTagPair left, ComponentTypeTagPair right)
Parameters
Returns
Implicit(ComponentTypeTagPair to (Type, String))
Implicitly converts a ComponentTypeTagPair to an equivalent tuple.
Declaration
public static implicit operator (Type, string)(ComponentTypeTagPair pair)
Parameters
Returns
Implicit((Type, String) to ComponentTypeTagPair)
Implicitly converts a tuple to its equivalent ComponentTypeTagPair.
Declaration
public static implicit operator ComponentTypeTagPair((Type, string) tuple)
Parameters
Returns
Inequality(ComponentTypeTagPair, ComponentTypeTagPair)
True if the given pairs have different component types and/or tags; false otherwise.
Declaration
public static bool operator !=(ComponentTypeTagPair left, ComponentTypeTagPair right)
Parameters
Returns
Implements
Extension Methods