Class StationQuery
Represents the query parameters for searching stations. Provides fluent methods for convenient building of queries
public sealed record StationQuery : IEquatable<StationQuery>
- Inheritance
-
StationQuery
- Implements
- Inherited Members
Constructors
StationQuery()
public StationQuery()
Properties
Categories
Filter by station category
public string? Categories { get; set; }
Property Value
Remarks
Single values (1-7), ranges (e.g., "2-4"), or comma-separated (e.g., "1,3-5")
Eva
The EVA station number used as a unique identifier
public string? Eva { get; set; }
Property Value
Limit
The maximum number of hits to return
public int Limit { get; set; }
Property Value
Remarks
Default is 10_000
Names
Strings to search for station names
public string[]? Names { get; set; }
Property Value
- string[]
Remarks
Wildcards '*' and '?' are supported
Offset
Offset of the first hit returned
public int Offset { get; set; }
Property Value
Remarks
Default is 0
Operator
Logical operator for combining multiple filters
public LogicalOperator Operator { get; set; }
Property Value
Remarks
Default is And
Ril
The RIL100 identifier of the station
public string? Ril { get; set; }
Property Value
State
Filter by German federal state
public FederalState? State { get; set; }
Property Value
Methods
CombineAs(LogicalOperator)
Sets the logical operator for combining multiple filters
public StationQuery CombineAs(LogicalOperator @operator)
Parameters
operatorLogicalOperatorLogical operator
Returns
- StationQuery
The current StationQuery instance for fluent chaining
Equals(StationQuery?)
public bool Equals(StationQuery? other)
Parameters
otherStationQuery
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
InFederalState(FederalState)
Filters stations by federal state
public StationQuery InFederalState(FederalState state)
Parameters
stateFederalStateGerman federal state
Returns
- StationQuery
The current StationQuery instance for fluent chaining
LimitTo(int)
Sets the maximum number of results to return
public StationQuery LimitTo(int limit)
Parameters
limitintMaximum results
Returns
- StationQuery
The current StationQuery instance for fluent chaining
Skip(int)
Sets the number of results to skip for pagination
public StationQuery Skip(int offset)
Parameters
offsetintNumber of results to skip
Returns
- StationQuery
The current StationQuery instance for fluent chaining
ToString()
public override string ToString()
Returns
WithCategories(string)
Sets the station category filter
public StationQuery WithCategories(string categories)
Parameters
categoriesstringOne or more category specifications: integers, ranges, or comma-separated values
Returns
- StationQuery
The current StationQuery instance for fluent chaining
Remarks
You can specify a single category, a range (e.g., "2-4") or a list of categories (e.g., "1,3-5"). Categories must be between 1 and 7
Exceptions
- ArgumentException
Thrown if any category is invalid or out of range (1-7)
WithEva(string)
Filters stations by EVA number
public StationQuery WithEva(string eva)
Parameters
evastringEVA station number
Returns
- StationQuery
The current StationQuery instance for fluent chaining
WithNames(params string[])
Sets the station names or fragments to search for
public StationQuery WithNames(params string[] names)
Parameters
namesstring[]One or more station name patterns
Returns
- StationQuery
The current StationQuery instance for fluent chaining
Remarks
Appends a trailing '*' automatically if no wildcard is present
Exceptions
- ArgumentException
Thrown if no names are provided
WithRil(string)
Filters stations by RIL100 identifier
public StationQuery WithRil(string ril)
Parameters
rilstringRIL100 identifier
Returns
- StationQuery
The current StationQuery instance for fluent chaining
Operators
operator ==(StationQuery?, StationQuery?)
public static bool operator ==(StationQuery? left, StationQuery? right)
Parameters
leftStationQueryrightStationQuery
Returns
operator !=(StationQuery?, StationQuery?)
public static bool operator !=(StationQuery? left, StationQuery? right)
Parameters
leftStationQueryrightStationQuery