Table of Contents

Class Departure

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

Represents a specific departure from a station.

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

Constructors

Departure(Departure)

protected Departure(Departure original)

Parameters

original Departure

Departure(string, string, string, string, DateTime, DateTime, DateTime, TransportType, int, string)

Represents a specific departure from a station.

public Departure(string Line, string StopPoint, string Direction, string DirectionDescription, DateTime Date, DateTime DepartureTimePlanned, DateTime DepartureTimeActual, TransportType TransportType, int TripNumber, string OccupationLevel)

Parameters

Line string

The line on which the vehicle departs.

StopPoint string

The point at which the vehicle stops. (e.g., Platform 1)

Direction string

The direction the vehicle drives to. (VGN uses "Richtung1", "Richtung2" etc.)

DirectionDescription string

The Final destination name.

Date DateTime

The date of the departure.

DepartureTimePlanned DateTime

Time on which departure was planned.

DepartureTimeActual DateTime

Time on which departure is in real life.

TransportType TransportType

The transport type.

TripNumber int

VGN internal trip number.

OccupationLevel string

The level of occupation in the vehicle.

Properties

Date

The date of the departure.

public DateTime Date { get; init; }

Property Value

DateTime

DepartureTimeActual

Time on which departure is in real life.

public DateTime DepartureTimeActual { get; init; }

Property Value

DateTime

DepartureTimePlanned

Time on which departure was planned.

public DateTime DepartureTimePlanned { get; init; }

Property Value

DateTime

Direction

The direction the vehicle drives to. (VGN uses "Richtung1", "Richtung2" etc.)

public string Direction { get; init; }

Property Value

string

DirectionDescription

The Final destination name.

public string DirectionDescription { get; init; }

Property Value

string

EqualityContract

protected virtual Type EqualityContract { get; }

Property Value

Type

Line

The line on which the vehicle departs.

public string Line { get; init; }

Property Value

string

OccupationLevel

The level of occupation in the vehicle.

public string OccupationLevel { get; init; }

Property Value

string

StopPoint

The point at which the vehicle stops. (e.g., Platform 1)

public string StopPoint { get; init; }

Property Value

string

TransportType

The transport type.

public TransportType TransportType { get; init; }

Property Value

TransportType

TripNumber

VGN internal trip number.

public int TripNumber { get; init; }

Property Value

int

Methods

Deconstruct(out string, out string, out string, out string, out DateTime, out DateTime, out DateTime, out TransportType, out int, out string)

public void Deconstruct(out string Line, out string StopPoint, out string Direction, out string DirectionDescription, out DateTime Date, out DateTime DepartureTimePlanned, out DateTime DepartureTimeActual, out TransportType TransportType, out int TripNumber, out string OccupationLevel)

Parameters

Line string
StopPoint string
Direction string
DirectionDescription string
Date DateTime
DepartureTimePlanned DateTime
DepartureTimeActual DateTime
TransportType TransportType
TripNumber int
OccupationLevel string

Equals(Departure?)

public virtual bool Equals(Departure? other)

Parameters

other Departure

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 ==(Departure?, Departure?)

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

Parameters

left Departure
right Departure

Returns

bool

operator !=(Departure?, Departure?)

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

Parameters

left Departure
right Departure

Returns

bool