Show / Hide Table of Contents

Struct ComponentTagPair

A component from a IComponentCollection and its associated tag.

Implements
IEquatable<ComponentTagPair>
IMatchable<ComponentTagPair>
Inherited Members
object.GetType()
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: GoRogue.Components
Assembly: GoRogue.dll
Syntax
[DataContract]
public readonly struct ComponentTagPair : IEquatable<ComponentTagPair>, IMatchable<ComponentTagPair>

Constructors

View Source

ComponentTagPair(object, string?)

Constructor.

Declaration
public ComponentTagPair(object component, string? tag)
Parameters
Type Name Description
object component
string tag

Fields

View Source

Component

The component.

Declaration
[DataMember]
public readonly object Component
Field Value
Type Description
object
View Source

Tag

The tag associated with its component.

Declaration
[DataMember]
public readonly string? Tag
Field Value
Type Description
string

Methods

View Source

Deconstruct(out object, out string?)

Supports C# Deconstruction syntax.

Declaration
public void Deconstruct(out object component, out string? tag)
Parameters
Type Name Description
object component
string tag
View Source

Equals(ComponentTagPair)

True if the given pair has the same component and tag; false otherwise.

Declaration
public bool Equals(ComponentTagPair other)
Parameters
Type Name Description
ComponentTagPair other
Returns
Type Description
bool
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
Type Description
bool
Overrides
ValueType.Equals(object)
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
Type Name Description
(object component, string tag) tuple
Returns
Type Description
ComponentTagPair
View Source

GetHashCode()

Returns a hash code based on all of the pair's field's.

Declaration
public override int GetHashCode()
Returns
Type Description
int
Overrides
ValueType.GetHashCode()
View Source

Matches(ComponentTagPair)

True if the given pair has the same component and tag; false otherwise.

Declaration
public bool Matches(ComponentTagPair other)
Parameters
Type Name Description
ComponentTagPair other
Returns
Type Description
bool
View Source

ToString()

Returns a string representing the component and its tag

Declaration
public override string ToString()
Returns
Type Description
string
Overrides
ValueType.ToString()
View Source

ToTuple()

Converts the pair to an equivalent tuple.

Declaration
public (object component, string? tag) ToTuple()
Returns
Type Description
(object component, string tag)

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
Type Name Description
ComponentTagPair left
ComponentTagPair right
Returns
Type Description
bool
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
Type Name Description
ComponentTagPair pair
Returns
Type Description
(object component, string tag)
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
Type Name Description
(object component, string tag) tuple
Returns
Type Description
ComponentTagPair
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
Type Name Description
ComponentTagPair left
ComponentTagPair right
Returns
Type Description
bool

Implements

IEquatable<T>
IMatchable<T>

Extension Methods

Utility.Yield<T>(T)
  • View Source
In this article
Back to top Generated by DocFX