Table of Contents

Class Trip

Namespace
DotVgn.Common.Models
Assembly
DotVgn.Common.dll

Represents a trip between two stations.

public record Trip : IEquatable<Trip>
Inheritance
Trip
Implements
Inherited Members

Constructors

Trip(Trip)

protected Trip(Trip original)

Parameters

original Trip

Trip(string, string, string, IEnumerable<TripStop>)

Represents a trip between two stations.

public Trip(string Line, string Direction, string DirectionDescription, IEnumerable<TripStop> Stops)

Parameters

Line string

The line of the trip.

Direction string

The direction of the trip.

DirectionDescription string

The description of the direction.

Stops IEnumerable<TripStop>

All stops on this trip.

Properties

Direction

The direction of the trip.

public string Direction { get; init; }

Property Value

string

DirectionDescription

The description of the direction.

public string DirectionDescription { get; init; }

Property Value

string

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Line

The line of the trip.

public string Line { get; init; }

Property Value

string

Stops

All stops on this trip.

public IEnumerable<TripStop> Stops { get; init; }

Property Value

IEnumerable<TripStop>

Methods

Deconstruct(out string, out string, out string, out IEnumerable<TripStop>)

public void Deconstruct(out string Line, out string Direction, out string DirectionDescription, out IEnumerable<TripStop> Stops)

Parameters

Line string
Direction string
DirectionDescription string
Stops IEnumerable<TripStop>

Equals(Trip?)

public virtual bool Equals(Trip? other)

Parameters

other Trip

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

PrintMembers(StringBuilder)

protected virtual bool PrintMembers(StringBuilder builder)

Parameters

builder StringBuilder

Returns

bool

ToString()

public override string ToString()

Returns

string

Operators

operator ==(Trip?, Trip?)

public static bool operator ==(Trip? left, Trip? right)

Parameters

left Trip
right Trip

Returns

bool

operator !=(Trip?, Trip?)

public static bool operator !=(Trip? left, Trip? right)

Parameters

left Trip
right Trip

Returns

bool