Class TrackerFactoryExtensions
- Namespace
- VpnHood.Core.Client.VpnServices.Abstractions.Tracking
- Assembly
- VpnHood.Core.Client.VpnServices.Abstractions.dll
Provides the making of trackers from their factories, where a factory's failure costs only its tracker.
public static class TrackerFactoryExtensions
- Inheritance
-
TrackerFactoryExtensions
- Inherited Members
Methods
TryCreateTracker(IReadOnlyList<ITrackerFactory>, TrackerCreateParams)
Makes a tracker of each factory, and joins those that send anything.
public static ITracker? TryCreateTracker(this IReadOnlyList<ITrackerFactory> trackerFactories, TrackerCreateParams createParams)
Parameters
trackerFactoriesIReadOnlyList<ITrackerFactory>The factories.
createParamsTrackerCreateParamsThe client's ID, version and user agent, and the person's usage-data switch.
Returns
- ITracker
null where none sends anything; that one where one does; otherwise a composite that hands each the switch and the events.
TryCreateTracker(ITrackerFactory, TrackerCreateParams)
Makes a tracker, or one that sends nothing where the factory fails, which it logs.
public static ITracker TryCreateTracker(this ITrackerFactory trackerFactory, TrackerCreateParams createParams)
Parameters
trackerFactoryITrackerFactoryThe factory.
createParamsTrackerCreateParamsThe client's ID, version and user agent, and the person's usage-data switch.
Returns
- ITracker
The tracker, or one that sends nothing.