FSUIPC Client DLL
.NET interface for FSUIPC
FsAirportCollection Class Reference

A strongly-typed list of Airports More...

Inherits IEnumerable< FsAirport >.

Public Member Functions

 FsAirportCollection ()
 Creates a new, empty collection of FsAirport objects More...
 
 FsAirportCollection (IEnumerable< FsAirport > Airports)
 Creates a new collection of FsAirport objects from another collection of FsAirports More...
 
void Add (FsAirport item)
 Adds an FsAirport object to this collection More...
 
void AddRange (IEnumerable< FsAirport > collection)
 Adds a collection of FsAirport objects to this collection More...
 
void Clear ()
 Clears the collection More...
 
FsAirportCollection FindAll (Predicate< FsAirport > Match)
 Gets a new list of airports that match the search criteria. More...
 
FsAirport Find (Predicate< FsAirport > Match)
 Gets a new list of airports that match the search criteria. More...
 
FsAirportCollection OrderBy< TKey > (Func< FsAirport, TKey > KeySelector)
 Gets a new list of airports ordered by the specified value More...
 
FsAirportCollection InRangeOfNauticalMiles (double DistanceNM)
 Gets a new list of airports that are within the specified distance. The list will be ordered by distance with the closest first. More...
 
FsAirportCollection InRangeOfKilometres (double DistanceKM)
 Gets a new list of airports that are within the specified distance. The list will be ordered by distance with the closest first. More...
 
FsAirportCollection WithRunway (Predicate< FsRunway > RunwayMatch)
 Gets a new list of airports that have at least one runway which matches the search criteria. More...
 
void LoadComponents (AirportComponents Components)
 Loads the specified component data for the airports in this collection. (e.g. Runways, Taxiways etc). More...
 
void LoadComponents (byte ClassInstance, AirportComponents Components)
 Loads the specified component data for the airports in this collection. (e.g. Runways, Taxiways etc). More...
 
void SetReferenceLocation (AirportComponents Components)
 Sets the reference location (from where distance and bearing information is calculated), for all airports in the collection, to the current player position. More...
 
void SetReferenceLocation (byte ClassInstance, AirportComponents Components)
 Sets the reference location (from where distance and bearing information is calculated), for all airports in the collection, to the current player position. More...
 
void SetReferenceLocation (FsAirport Airport, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated, for all airports in the collection. More...
 
void SetReferenceLocation (string ICAO, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated, for all airports in the collection. More...
 
void SetReferenceLocation (byte ClassInstance, string ICAO, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated, for all airports in the collection. More...
 
void SetReferenceLocation (FsLatitude NewLatitude, FsLongitude NewLongitude, double MagVar, AirportComponents Components)
 Sets the location from where distance and bearing information is calculated, for all airports in the collection. More...
 
IEnumerator< FsAirportGetEnumerator ()
 Returns an enumerator that will enumerator through all the airports More...
 
PlayerLocationInfo GetPlayerLocation (AirportComponents Components)
 Returns an object containing information about the current player location. This includes database object like any airport or gates the player is at. More...
 
PlayerLocationInfo GetPlayerLocation (byte ClassInstance, AirportComponents Components)
 Returns an object containing information about the current player location. This includes database object like any airport or gates the player is at. More...
 

Properties

FsAirport this[string ICAO] [get]
 Gets a single airport using the IACO code. Must be in upper case. More...
 
FsAirport this[int Index] [get]
 Gets a single airport using the index. More...
 
int Count [get]
 Gets the number of airports in the collection More...
 

Detailed Description

A strongly-typed list of Airports

Constructor & Destructor Documentation

◆ FsAirportCollection() [1/2]

FsAirportCollection ( )
inline

Creates a new, empty collection of FsAirport objects

◆ FsAirportCollection() [2/2]

FsAirportCollection ( IEnumerable< FsAirport Airports)
inline

Creates a new collection of FsAirport objects from another collection of FsAirports

Member Function Documentation

◆ Add()

void Add ( FsAirport  item)
inline

Adds an FsAirport object to this collection

◆ AddRange()

void AddRange ( IEnumerable< FsAirport collection)
inline

Adds a collection of FsAirport objects to this collection

Parameters
collection

◆ Clear()

void Clear ( )
inline

Clears the collection

◆ Find()

FsAirport Find ( Predicate< FsAirport Match)
inline

Gets a new list of airports that match the search criteria.

Parameters
MatchA delegate or Lambda expression that will test each runway.
Returns
The filtered collection of airports

◆ FindAll()

FsAirportCollection FindAll ( Predicate< FsAirport Match)
inline

Gets a new list of airports that match the search criteria.

Parameters
MatchA delegate or Lambda expression that will test each runway.
Returns
The filtered collection of airports

◆ GetEnumerator()

IEnumerator<FsAirport> GetEnumerator ( )
inline

Returns an enumerator that will enumerator through all the airports

◆ GetPlayerLocation() [1/2]

PlayerLocationInfo GetPlayerLocation ( AirportComponents  Components)
inline

Returns an object containing information about the current player location. This includes database object like any airport or gates the player is at.

Parameters
ComponentsThe components you want to process. e.g. if you want to know what gate the player is at you need to pass the Gate component.

If the requested components are not loaded for the Airport the player is at, they will be automatically loaded.

◆ GetPlayerLocation() [2/2]

PlayerLocationInfo GetPlayerLocation ( byte  ClassInstance,
AirportComponents  Components 
)
inline

Returns an object containing information about the current player location. This includes database object like any airport or gates the player is at.

Parameters
ComponentsThe components you want to process. e.g. if you want to know what gate the player is at you need to pass the Gate component.

If the requested components are not loaded for the Airport the player is at, they will be automatically loaded.

Parameters
ClassInstanceThe class instance of WideClient to connect to.

◆ InRangeOfKilometres()

FsAirportCollection InRangeOfKilometres ( double  DistanceKM)
inline

Gets a new list of airports that are within the specified distance. The list will be ordered by distance with the closest first.

Parameters
DistanceKMThe max distance for an airport to be included in Kilometres
Returns
The filtered collection of airports

◆ InRangeOfNauticalMiles()

FsAirportCollection InRangeOfNauticalMiles ( double  DistanceNM)
inline

Gets a new list of airports that are within the specified distance. The list will be ordered by distance with the closest first.

Parameters
DistanceNMThe max distance for an airport to be included in Nautical Miles
Returns
The filtered collection of airports

◆ LoadComponents() [1/2]

void LoadComponents ( AirportComponents  Components)
inline

Loads the specified component data for the airports in this collection. (e.g. Runways, Taxiways etc).

If a component is already loaded it will not be loaded again

Parameters
ComponentsThe components to load. Combine flags using the bitwise or operator. ( '|' in C#, 'or' in VB.NET )

◆ LoadComponents() [2/2]

void LoadComponents ( byte  ClassInstance,
AirportComponents  Components 
)
inline

Loads the specified component data for the airports in this collection. (e.g. Runways, Taxiways etc).

If a component is already loaded it will not be loaded again

Parameters
ComponentsThe components to load. Combine flags using the bitwise or operator. ( '|' in C#, 'or' in VB.NET )
ClassInstanceThe class instance of a WideClient.exe to connect to

◆ OrderBy< TKey >()

FsAirportCollection OrderBy< TKey > ( Func< FsAirport, TKey >  KeySelector)
inline

Gets a new list of airports ordered by the specified value

Parameters
KeySelectorA delegate or Lambda expression specify the value to sort on.
Returns
The filtered collection of airports

◆ SetReferenceLocation() [1/6]

void SetReferenceLocation ( AirportComponents  Components)
inline

Sets the reference location (from where distance and bearing information is calculated), for all airports in the collection, to the current player position.

Requires an open connection to FSUIPC

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [2/6]

void SetReferenceLocation ( byte  ClassInstance,
AirportComponents  Components 
)
inline

Sets the reference location (from where distance and bearing information is calculated), for all airports in the collection, to the current player position.

Requires an open connection to FSUIPC

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ClassInstanceThe ID of a specific class instance of WideClient
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [3/6]

void SetReferenceLocation ( FsAirport  Airport,
AirportComponents  Components 
)
inline

Sets the location from where distance and bearing information is calculated, for all airports in the collection.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
AirportThe Airport to use as the reference location.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [4/6]

void SetReferenceLocation ( string  ICAO,
AirportComponents  Components 
)
inline

Sets the location from where distance and bearing information is calculated, for all airports in the collection.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ICAOThe ICAO code of the airport to use as the reference location.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [5/6]

void SetReferenceLocation ( byte  ClassInstance,
string  ICAO,
AirportComponents  Components 
)
inline

Sets the location from where distance and bearing information is calculated, for all airports in the collection.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
ICAOThe ICAO code of the airport to use as the reference location.
ClassInstanceThe class instance of WideClient to connect to.
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ SetReferenceLocation() [6/6]

void SetReferenceLocation ( FsLatitude  NewLatitude,
FsLongitude  NewLongitude,
double  MagVar,
AirportComponents  Components 
)
inline

Sets the location from where distance and bearing information is calculated, for all airports in the collection.

Note that no components will be loaded by this method. The components passed in only control what components are processed.

Parameters
NewLatitudeThe Latitude of the reference location
NewLongitudeThe Longitude of the reference location
MagVarThe Magnetic Variation at the reference location
ComponentsThe Components you want to apply the reference location to. Pass None to only apply to the airport.

◆ WithRunway()

FsAirportCollection WithRunway ( Predicate< FsRunway RunwayMatch)
inline

Gets a new list of airports that have at least one runway which matches the search criteria.

The Runway data must have been loaded first

Parameters
RunwayMatchA delegate or Lambda expression that will test each runway.
Returns
The filtered collection of airports

Property Documentation

◆ Count

int Count
get

Gets the number of airports in the collection

◆ this[int Index]

FsAirport this[int Index]
get

Gets a single airport using the index.

Parameters
IndexThe index of the airport to retrieve

◆ this[string ICAO]

FsAirport this[string ICAO]
get

Gets a single airport using the IACO code. Must be in upper case.

Parameters
ICAOA string containing the ICAO code.
Returns