public virtual void ValidateRequest(HttpContextBase httpContext, ICustomerHost host) { if (httpContext == null) { throw new ArgumentNullException(nameof(httpContext)); } var customerInstance = host.GetOrStartCustomerInstance(httpContext.Request.Url); if (customerInstance == null) { CustomerNotFound(httpContext.Response); } else { // Make the Customer instance available for the request httpContext.Items[Constants.CurrentCustomerInstanceKey] = customerInstance; } }
public TestsHttpContextInitialize(Uri siteUri, User currentUser, ICustomerHost customerHost) { _siteUri = siteUri; _currentUser = currentUser; _customerHost = customerHost; }