Click or drag to resize
IBaseStationDatabaseGetOrInsertAircraftByCode Method
Fetches an aircraft by its ICAO code. If there is no record for the aircraft then the createNewAircraftFunc method is called to build a new record, and that is inserted.

Namespace: VirtualRadar.Interface.Database
Assembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
BaseStationAircraft GetOrInsertAircraftByCode(
	string icao24,
	Func<string, BaseStationAircraft> createNewAircraftFunc
)

Parameters

icao24
Type: SystemString
createNewAircraftFunc
Type: SystemFuncString, BaseStationAircraft

Return Value

Type: BaseStationAircraft
Remarks
A lock is held over both the fetch and the insert, this is an atomic operation.
See Also