Show / Hide Table of Contents

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
Object
ComponentTypeTagPair
Implements
IEquatable<ComponentTypeTagPair>
IMatchable<ComponentTypeTagPair>
Namespace: GoRogue.Components
Assembly: GoRogue.dll
Syntax
public sealed class ComponentTypeTagPair : ValueType, IEquatable<ComponentTypeTagPair>, IMatchable<ComponentTypeTagPair>

Constructors

ComponentTypeTagPair(Type, String)

Constructor.

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
Type Description
Type

Tag

The tag expected to be associated with a component of the specified type.

Declaration
public readonly string Tag
Field Value
Type Description
String

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
Type Name Description
ComponentTypeTagPair other
Returns
Type Description
Boolean

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
Type Description
Boolean

FromTuple((Type, String))

Converts the tuple to an equivalent ComponentTypeTagPair.

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

GetHashCode()

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

Declaration
public override int GetHashCode()
Returns
Type Description
Int32

Matches(ComponentTypeTagPair)

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

Declaration
public bool Matches(ComponentTypeTagPair other)
Parameters
Type Name Description
ComponentTypeTagPair other
Returns
Type Description
Boolean

ToString()

Returns a string representing the component type and its tag.

Declaration
public override string ToString()
Returns
Type Description
String

ToTuple()

Converts the pair to an equivalent tuple.

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

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
Type Name Description
ComponentTypeTagPair left
ComponentTypeTagPair right
Returns
Type Description
Boolean

Implicit(ComponentTypeTagPair to (Type, String))

Implicitly converts a ComponentTypeTagPair to an equivalent tuple.

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

Implicit((Type, String) to ComponentTypeTagPair)

Implicitly converts a tuple to its equivalent ComponentTypeTagPair.

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

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
Type Name Description
ComponentTypeTagPair left
ComponentTypeTagPair 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