public CookieBasedABTestService(
     HttpContextBase httpContext,
     IFeatureFlagService featureFlagService,
     IABTestEnrollmentFactory enrollmentFactory,
     IContentObjectService contentObjectService,
     ICookieComplianceService cookieComplianceService,
     ITelemetryService telemetryService,
     ILogger <CookieBasedABTestService> logger)
 {
     _httpContext             = httpContext ?? throw new ArgumentNullException(nameof(httpContext));
     _featureFlagService      = featureFlagService ?? throw new ArgumentNullException(nameof(featureFlagService));
     _enrollmentFactory       = enrollmentFactory ?? throw new ArgumentNullException(nameof(enrollmentFactory));
     _contentObjectService    = contentObjectService ?? throw new ArgumentNullException(nameof(contentObjectService));
     _cookieComplianceService = cookieComplianceService ?? throw new ArgumentNullException(nameof(cookieComplianceService));
     _telemetryService        = telemetryService ?? throw new ArgumentNullException(nameof(telemetryService));
     _logger         = logger ?? throw new ArgumentNullException(nameof(logger));
     _lazyEnrollment = new Lazy <ABTestEnrollment>(DetermineEnrollment);
 }
 public static void Initialize(ICookieComplianceService cookieComplianceService, ILogger logger)
 {
     Instance = cookieComplianceService ?? throw new ArgumentNullException(nameof(cookieComplianceService));
     Logger   = logger ?? throw new ArgumentNullException(nameof(logger));
 }