IAircraftOnlineLookupProviderDoLookup Method |
Periodically called to fetch aircraft details from the online service.
Namespace: VirtualRadar.InterfaceAssembly: VirtualRadar.Interface (in VirtualRadar.Interface.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax bool DoLookup(
string[] icaos,
IList<AircraftOnlineLookupDetail> fetchedAircraft,
IList<string> missingIcaos
)
Function DoLookup (
icaos As String(),
fetchedAircraft As IList(Of AircraftOnlineLookupDetail),
missingIcaos As IList(Of String)
) As Boolean
bool DoLookup(
array<String^>^ icaos,
IList<AircraftOnlineLookupDetail^>^ fetchedAircraft,
IList<String^>^ missingIcaos
)
abstract DoLookup :
icaos : string[] *
fetchedAircraft : IList<AircraftOnlineLookupDetail> *
missingIcaos : IList<string> -> bool
Parameters
- icaos
- Type: SystemString
A collection of ICAOs to fetch. - fetchedAircraft
- Type: System.Collections.GenericIListAircraftOnlineLookupDetail
Add fetched aircraft records to this list. - missingIcaos
- Type: System.Collections.GenericIListString
Add ICAOs for aircraft that definitely do not have details to this list.
Return Value
Type:
BooleanTrue if the lookup was completed without errors, false if the online source appears to be offline or
having some problems. Missing ICAOs are not an error.
Remarks
This will be called on a background thread but two calls will never run simultaneously.
If the method allows web exceptions to bubble up then they will not be logged by the caller, it would spam the
log when the user is offline, but any other type of exception will be logged. If the method throws an exception
then it is always assumed to have failed, i.e. returned false. Try not to let exceptions bubble out after a
successful fetch.
If the online source cannot be reached or it returns an error then return false. Do not fill in either of the
lists, that way the ICAOs passed across will be presented later for another try. If you mark an ICAO as missing
when it is not then it could have ramifications elsewhere.
See Also