Show / Hide Table of Contents

Struct AreaConnectionPointPair

A pair of points in different areas that have been selected as connection points by an IConnectionPointSelector.

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

Constructors

View Source

AreaConnectionPointPair(Point, Point)

Constructor.

Declaration
public AreaConnectionPointPair(Point area1Position, Point area2Position)
Parameters
Type Name Description
Point area1Position
Point area2Position

Fields

View Source

Area1Position

The type of component expected.

Declaration
[DataMember]
public readonly Point Area1Position
Field Value
Type Description
Point
View Source

Area2Position

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

Declaration
[DataMember]
public readonly Point Area2Position
Field Value
Type Description
Point

Methods

View Source

Deconstruct(out Point, out Point)

Supports C# Deconstruction syntax.

Declaration
public void Deconstruct(out Point area1Position, out Point area2Position)
Parameters
Type Name Description
Point area1Position
Point area2Position
View Source

Equals(AreaConnectionPointPair)

True if the given pair contains the same points; false otherwise.

Declaration
public bool Equals(AreaConnectionPointPair other)
Parameters
Type Name Description
AreaConnectionPointPair other
Returns
Type Description
bool
View Source

Equals(object?)

True if the given object is a AreaConnectionPointPair and has the same points; 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((Point area1Position, Point area2Position))

Converts the tuple to an equivalent AreaConnectionPointPair.

Declaration
public static AreaConnectionPointPair FromTuple((Point area1Position, Point area2Position) tuple)
Parameters
Type Name Description
(Point area1Position, Point area2Position) tuple
Returns
Type Description
AreaConnectionPointPair
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(AreaConnectionPointPair)

True if the given pair contains the same points; false otherwise.

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

ToString()

Returns a string representing the two points.

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

ToTuple()

Converts the pair to an equivalent tuple.

Declaration
public (Point area1Position, Point area2Position) ToTuple()
Returns
Type Description
(Point area1Position, Point area2Position)

Operators

View Source

operator ==(AreaConnectionPointPair, AreaConnectionPointPair)

True if the given pairs have the same points; false otherwise.

Declaration
public static bool operator ==(AreaConnectionPointPair left, AreaConnectionPointPair right)
Parameters
Type Name Description
AreaConnectionPointPair left
AreaConnectionPointPair right
Returns
Type Description
bool
View Source

implicit operator (Point area1Position, Point area2Position)(AreaConnectionPointPair)

Implicitly converts an AreaConnectionPointPair to an equivalent tuple.

Declaration
public static implicit operator (Point area1Position, Point area2Position)(AreaConnectionPointPair pair)
Parameters
Type Name Description
AreaConnectionPointPair pair
Returns
Type Description
(Point area1Position, Point area2Position)
View Source

implicit operator AreaConnectionPointPair((Point area1Position, Point area2Position))

Implicitly converts a tuple to its equivalent AreaConnectionPointPair.

Declaration
public static implicit operator AreaConnectionPointPair((Point area1Position, Point area2Position) tuple)
Parameters
Type Name Description
(Point area1Position, Point area2Position) tuple
Returns
Type Description
AreaConnectionPointPair
View Source

operator !=(AreaConnectionPointPair, AreaConnectionPointPair)

True if the given pairs have different points for the first and second point, respectively; false otherwise.

Declaration
public static bool operator !=(AreaConnectionPointPair left, AreaConnectionPointPair right)
Parameters
Type Name Description
AreaConnectionPointPair left
AreaConnectionPointPair 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