Click or drag to resize

TrafficFetcher Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
The TrafficFetcher class is used to retrieve an up-to-date Traffic object based on traffic information from the Traffic's sources.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBase.TrafficTrafficFetcher

Namespace:  Telogis.GeoBase.Traffic
Assembly:  geobase.net (in geobase.net.dll) Version: 4.99.0.0
Syntax
public class TrafficFetcher

The TrafficFetcher type exposes the following members.

Constructors
  NameDescription
Public methodTrafficFetcher
Create a new TrafficFetcher
Top
Methods
  NameDescription
Public methodAddSource(IGenericTrafficSource)
Add a new ITrafficSource to the TrafficFetcher's traffic source list.
Public methodAddSource(IGenericTrafficSource, TimeSpan)
Add a new ITrafficSource to the TrafficFetcher's traffic source list.
Public methodAddSource(String, Type, TimeSpan, HandleDataDelegate)
Add a new traffic source to the TrafficFetcher's traffic source list.
Public methodAddSource(String, Type, TimeSpan, HandleDataDelegate, ICredentials)
Add a new traffic source to the TrafficFetcher's traffic source list.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetExpiry
Get the date/time that the traffic data is still valid.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLatestTraffic
Synchronously, get the latest traffic data update from the list of ITrafficSources.
Public methodGetLatestTraffic(DateTime) Obsolete.
Public methodGetLatestTraffic(TimeSpan)
Get the latest traffic data update from the list of ITrafficSource.
Public methodGetLatestTraffic(DateTime, TimeSpan) Obsolete.
Public methodGetLatestTrafficAsync
Asynchronously, get the latest traffic data update from the list of ITrafficSources, based on the given date/time.
Public methodGetLatestTrafficAsync(DateTime) Obsolete.
Public methodGetSourceByURL
Creates an ITrafficSource from the given URL.
Public methodGetSourcesByType
Creates an ITrafficSource from the given type.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInsertSource
Insert an ITrafficSource to the TrafficFetcher's traffic source list at the given position.
Public methodRemoveSourcesByType
Remove sources of the given type from ITrafficSource to the TrafficFetcher's source list.
Public methodRemoveSourcesByUrl
Remove sources with given URL from ITrafficSource to the TrafficFetcher's source list.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Events
  NameDescription
Public eventTrafficUpdated
This event handler is called when an update is received from an ITrafficSource. It might not be called on the thread that called GetLatestTraffic, so event handler implementations need to be careful not to use synchronous calls that might deadlock. For example, if GetLatestTraffic was called from a UI thread then the event handler must use BeginInvoke to update UI elements.
Top
Remarks

The TrafficFetcher class is used to retrieve an up-to-date Traffic object based on traffic information from the Traffic's sources. The TrafficFetcher does not automate the process of obtaining an updated Traffic, but instead, provides the GetLatestTraffic(DateTime) method, which can be called synchronously, or asynchronously.

For synchronous mode, set blocking to true. In this mode, the Traffic object will not be returned until all the ITrafficSources have been updated, or the timeout time has elapsed.

For asynchronous mode, set blocking to false, and wait until the TrafficUpdated event is called, signalling that the ITrafficSource data has been updated.

Related articles: Routing with Traffic.

See Also