/// <summary>
 /// Instantiates a new instance of <see cref="ServiceManager"/>.
 /// </summary>
 public ServiceManager()
 {
     PostData         = true;
     dispatchingTasks = new List <Task>();
     hits             = new Queue <Hit>();
     DispatchPeriod   = TimeSpan.Zero;
     IsSecure         = true;
     hitTokenBucket   = new TokenBucket(60, .5);
 }
 internal Tracker(string propertyId, PlatformInfoProvider platformInfoProvider, AnalyticsEngine analyticsEngine)
 {
     this.analyticsEngine      = analyticsEngine;
     this.platformInfoProvider = platformInfoProvider;
     engine = new PayloadFactory()
     {
         PropertyId           = propertyId,
         AnonymousClientId    = platformInfoProvider.AnonymousClientId,
         DocumentEncoding     = platformInfoProvider.DocumentEncoding,
         ScreenColorDepthBits = platformInfoProvider.ScreenColorDepthBits,
         ScreenResolution     = platformInfoProvider.ScreenResolution,
         UserLanguage         = platformInfoProvider.UserLanguage,
         ViewportSize         = platformInfoProvider.ViewPortResolution
     };
     platformInfoProvider.ViewPortResolutionChanged += platformTrackingInfo_ViewPortResolutionChanged;
     platformInfoProvider.ScreenResolutionChanged   += platformTrackingInfo_ScreenResolutionChanged;
     SampleRate     = 100.0F;
     hitTokenBucket = new TokenBucket(60, .5);
 }
 internal Tracker(string propertyId, PlatformInfoProvider platformInfoProvider, AnalyticsEngine analyticsEngine)
 {
     this.analyticsEngine = analyticsEngine;
     this.platformInfoProvider = platformInfoProvider;
     engine = new PayloadFactory()
     {
         PropertyId = propertyId,
         AnonymousClientId = platformInfoProvider.AnonymousClientId,
         DocumentEncoding = platformInfoProvider.DocumentEncoding,
         ScreenColorDepthBits = platformInfoProvider.ScreenColorDepthBits,
         ScreenResolution = platformInfoProvider.ScreenResolution,
         UserLanguage = platformInfoProvider.UserLanguage,
         ViewportSize = platformInfoProvider.ViewPortResolution
     };
     platformInfoProvider.ViewPortResolutionChanged += platformTrackingInfo_ViewPortResolutionChanged;
     platformInfoProvider.ScreenResolutionChanged += platformTrackingInfo_ScreenResolutionChanged;
     SampleRate = 100.0F;
     hitTokenBucket = new TokenBucket(60, .5);
 }