Struct ComponentTagPair
Assembly: GoRogue.dll
Syntax
[DataContract]
public readonly struct ComponentTagPair : IEquatable<ComponentTagPair>, IMatchable<ComponentTagPair>
Constructors
View Source
ComponentTagPair(object, string?)
Declaration
public ComponentTagPair(object component, string? tag)
Parameters
Fields
View Source
Component
Declaration
[DataMember]
public readonly object Component
Field Value
View Source
Tag
The tag associated with its component.
Declaration
[DataMember]
public readonly string? Tag
Field Value
Methods
View Source
Deconstruct(out object, out string?)
Supports C# Deconstruction syntax.
Declaration
public void Deconstruct(out object component, out string? tag)
Parameters
View Source
Equals(ComponentTagPair)
True if the given pair has the same component and tag; false otherwise.
Declaration
public bool Equals(ComponentTagPair other)
Parameters
Returns
View Source
Equals(object?)
True if the given object is a ComponentTagPair and has the same component and tag; false otherwise.
Declaration
public override bool Equals(object? obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
Overrides
View Source
FromTuple((object component, string? tag))
Converts the tuple to an equivalent ComponentTagPair.
Declaration
public static ComponentTagPair FromTuple((object component, 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(ComponentTagPair)
True if the given pair has the same component and tag; false otherwise.
Declaration
public bool Matches(ComponentTagPair other)
Parameters
Returns
View Source
ToString()
Returns a string representing the component and its tag
Declaration
public override string ToString()
Returns
Overrides
View Source
ToTuple()
Converts the pair to an equivalent tuple.
Declaration
public (object component, string? tag) ToTuple()
Returns
Operators
View Source
operator ==(ComponentTagPair, ComponentTagPair)
True if the given pairs have the same component and tag; false otherwise.
Declaration
public static bool operator ==(ComponentTagPair left, ComponentTagPair right)
Parameters
Returns
View Source
implicit operator (object component, string? tag)(ComponentTagPair)
Implicitly converts a ComponentTagPair to an equivalent tuple.
Declaration
public static implicit operator (object component, string? tag)(ComponentTagPair pair)
Parameters
Returns
View Source
implicit operator ComponentTagPair((object component, string? tag))
Implicitly converts a tuple to its equivalent ComponentTagPair.
Declaration
public static implicit operator ComponentTagPair((object component, string? tag) tuple)
Parameters
Returns
View Source
operator !=(ComponentTagPair, ComponentTagPair)
True if the given pairs have different components and/or tags; false otherwise.
Declaration
public static bool operator !=(ComponentTagPair left, ComponentTagPair right)
Parameters
Returns
Implements
Extension Methods