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.DatabaseAssembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax BaseStationAircraft GetOrInsertAircraftByCode(
string icao24,
Func<string, BaseStationAircraft> createNewAircraftFunc
)
Function GetOrInsertAircraftByCode (
icao24 As String,
createNewAircraftFunc As Func(Of String, BaseStationAircraft)
) As BaseStationAircraft
BaseStationAircraft^ GetOrInsertAircraftByCode(
String^ icao24,
Func<String^, BaseStationAircraft^>^ createNewAircraftFunc
)
abstract GetOrInsertAircraftByCode :
icao24 : string *
createNewAircraftFunc : Func<string, BaseStationAircraft> -> BaseStationAircraft
Parameters
- icao24
- Type: SystemString
- createNewAircraftFunc
- Type: SystemFuncString, BaseStationAircraft
Return Value
Type:
BaseStationAircraftRemarks
A lock is held over both the fetch and the insert, this is an atomic operation.
See Also