Click or drag to resize
IAircraftOnlineLookupProviderDoLookup Method
Periodically called to fetch aircraft details from the online service.

Namespace: VirtualRadar.Interface
Assembly: 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
)

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: Boolean
True 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