Struct 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.
Assembly: GoRogue.dll
Syntax
[DataContract]
public readonly struct ComponentTypeTagPair : IEquatable<ComponentTypeTagPair>, IMatchable<ComponentTypeTagPair>
Constructors
View Source
ComponentTypeTagPair(Type, string?)
Declaration
public ComponentTypeTagPair(Type componentType, string? tag)
Parameters
Type |
Name |
Description |
Type |
componentType |
|
string |
tag |
|
Fields
View Source
ComponentType
The type of component expected.
Declaration
[DataMember]
public readonly Type ComponentType
Field Value
View Source
Tag
The tag expected to be associated with a component of the specified type.
Declaration
[DataMember]
public readonly string? Tag
Field Value
Methods
View Source
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 |
|
View Source
Equals(ComponentTypeTagPair)
True if the given pair has the same component type and tag; false otherwise.
Declaration
public bool Equals(ComponentTypeTagPair other)
Parameters
Returns
View Source
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
Overrides
View Source
FromTuple((Type componentType, string? tag))
Converts the tuple to an equivalent ComponentTypeTagPair.
Declaration
public static ComponentTypeTagPair FromTuple((Type componentType, string? tag) tuple)
Parameters
Returns
View Source
GetHashCode()
Returns a hash code based on all of the pair's field's.
Declaration
public override int GetHashCode()
Returns
Overrides
View Source
Matches(ComponentTypeTagPair)
True if the given pair has the same component type and tag; false otherwise.
Declaration
public bool Matches(ComponentTypeTagPair other)
Parameters
Returns
View Source
ToString()
Returns a string representing the component type and its tag.
Declaration
public override string ToString()
Returns
Overrides
View Source
ToTuple()
Converts the pair to an equivalent tuple.
Declaration
public (Type componentType, string? tag) ToTuple()
Returns
Operators
View Source
operator ==(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
View Source
implicit operator (Type componentType, string? tag)(ComponentTypeTagPair)
Implicitly converts a ComponentTypeTagPair to an equivalent tuple.
Declaration
public static implicit operator (Type componentType, string? tag)(ComponentTypeTagPair pair)
Parameters
Returns
View Source
implicit operator ComponentTypeTagPair((Type componentType, string? tag))
Implicitly converts a tuple to its equivalent ComponentTypeTagPair.
Declaration
public static implicit operator ComponentTypeTagPair((Type componentType, string? tag) tuple)
Parameters
Returns
View Source
operator !=(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