Show / Hide Table of Contents

Class ComponentTagPair

A component from a IComponentCollection and its associated tag.

Inheritance
Object
ComponentTagPair
Implements
IEquatable<ComponentTagPair>
IMatchable<ComponentTagPair>
Namespace: GoRogue.Components
Assembly: GoRogue.dll
Syntax
public sealed class ComponentTagPair : ValueType, IEquatable<ComponentTagPair>, IMatchable<ComponentTagPair>

Constructors

ComponentTagPair(Object, String)

Constructor.

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

Fields

Component

The component.

Declaration
public readonly object Component
Field Value
Type Description
Object

Tag

The tag associated with its component.

Declaration
public readonly string Tag
Field Value
Type Description
String

Methods

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

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
Boolean

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
Boolean

FromTuple((Object, String))

Converts the tuple to an equivalent ComponentTagPair.

Declaration
public static ComponentTagPair FromTuple((object, string) tuple)
Parameters
Type Name Description
(, )<Object, String> tuple
Returns
Type Description
ComponentTagPair

GetHashCode()

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

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

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
Boolean

ToString()

Returns a string representing the component and its tag

Declaration
public override string ToString()
Returns
Type Description
String

ToTuple()

Converts the pair to an equivalent tuple.

Declaration
public (object, string) ToTuple()
Returns
Type Description
(, )<Object, String>

Operators

Equality(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
Boolean

Implicit(ComponentTagPair to (Object, String))

Implicitly converts a ComponentTagPair to an equivalent tuple.

Declaration
public static implicit operator (object, string)(ComponentTagPair pair)
Parameters
Type Name Description
ComponentTagPair pair
Returns
Type Description
(, )<Object, String>

Implicit((Object, String) to ComponentTagPair)

Implicitly converts a tuple to its equivalent ComponentTagPair.

Declaration
public static implicit operator ComponentTagPair((object, string) tuple)
Parameters
Type Name Description
(, )<Object, String> tuple
Returns
Type Description
ComponentTagPair

Inequality(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
Boolean

Implements

System.IEquatable<T>
IMatchable<T>

Extension Methods

Utility.Yield<T>(T)
In This Article
Back to top Generated by DocFX