public override void FixtureSetup() { base.FixtureSetup(); _entityCollectionService = DbPreTestDataWorker.EntityCollectionService; _customerService = DbPreTestDataWorker.CustomerService; _resolver = EntityCollectionProviderResolver.Current; _providerKey = _resolver.GetProviderKey <StaticCustomerCollectionProvider>(); }
/// <summary> /// Initializes a new instance of the <see cref="MerchelloHelper"/> class. /// </summary> /// <param name="merchelloContext"> /// The merchello context. /// </param> /// <param name="enableDataModifiers"> /// The enable data modifiers. /// </param> /// <param name="conversionType"> /// The conversion type. /// </param> /// <param name="queryManager"> /// The proxy service resolver. /// </param> /// <param name="collectionProviderResolver"> /// The <see cref="IEntityCollectionProviderResolver"/> /// </param> internal MerchelloHelper( IMerchelloContext merchelloContext, bool enableDataModifiers, DetachedValuesConversionType conversionType, IProxyQueryManager queryManager, IEntityCollectionProviderResolver collectionProviderResolver) { Ensure.ParameterNotNull(merchelloContext, "ServiceContext cannot be null"); Ensure.ParameterNotNull(queryManager, "The query manager was null"); Ensure.ParameterNotNull(collectionProviderResolver, "The IEntityCollectionProviderResolver was null"); _enableDataModifiers = enableDataModifiers; _queryProvider = new Lazy <ICachedQueryProvider>(() => new CachedQueryProvider(merchelloContext, _enableDataModifiers, conversionType)); _validationHelper = new Lazy <IValidationHelper>(() => new ValidationHelper()); this.Initialize(merchelloContext, queryManager, collectionProviderResolver); }
/// <summary> /// Initializes the manager. /// </summary> /// <param name="merchelloContext"> /// The merchello Context. /// </param> /// <param name="collectionProviderResolver"> /// The <see cref="IEntityCollectionProviderResolver"/>. /// </param> private void Initialize(IMerchelloContext merchelloContext, IEntityCollectionProviderResolver collectionProviderResolver) { _productFilterGroupService = new Lazy<IProductFilterGroupQuery>(() => this.QueryManager.Instance<ProductFilterGroupQuery>(new object[] { merchelloContext })); }
/// <summary> /// Initializes a new instance of the <see cref="FilterGroupManager"/> class. /// </summary> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/>. /// </param> /// <param name="queryManager"> /// The <see cref="IProxyQueryManager"/>. /// </param> /// <param name="collectionProviderResolver"> /// The <see cref="IEntityCollectionProviderResolver"/>. /// </param> public FilterGroupManager(IMerchelloContext merchelloContext, IProxyQueryManager queryManager, IEntityCollectionProviderResolver collectionProviderResolver) : base(merchelloContext, queryManager) { Ensure.ParameterNotNull(collectionProviderResolver, "The IEntityCollectionProviderResolver was null"); this.Initialize(merchelloContext, collectionProviderResolver); }
public override void FixtureSetup() { base.FixtureSetup(); _entityCollectionService = DbPreTestDataWorker.EntityCollectionService; _customerService = DbPreTestDataWorker.CustomerService; _resolver = EntityCollectionProviderResolver.Current; _providerKey = _resolver.GetProviderKey<StaticCustomerCollectionProvider>(); }
/// <summary> /// Initializes the service. /// </summary> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/>. /// </param> /// <param name="resolver"> /// The <see cref="IEntityCollectionProviderResolver"/>. /// </param> private void Initialize(IMerchelloContext merchelloContext, IEntityCollectionProviderResolver resolver) { this._filterProviderKeys = resolver.GetProviderKeys<IEntityFilterGroupProvider>().ToArray(); this._primedTree = new PrimedProductFilterGroupTree(merchelloContext, this.All); }
/// <summary> /// Initializes the service. /// </summary> /// <param name="merchelloContext"> /// The <see cref="IMerchelloContext"/>. /// </param> /// <param name="resolver"> /// The <see cref="IEntityCollectionProviderResolver"/>. /// </param> private void Initialize(IMerchelloContext merchelloContext, IEntityCollectionProviderResolver resolver) { this._filterProviderKeys = resolver.GetProviderKeys <IEntityFilterGroupProvider>().ToArray(); this._primedTree = new PrimedProductFilterGroupTree(merchelloContext, this.All); }
/// <summary> /// Initializes the MerchelloHelper. /// </summary> /// <param name="merchelloContext"> /// The merchello context. /// </param> /// <param name="queryManager"> /// The resolver. /// </param> /// <param name="collectionProviderResolver"> /// The collection Provider Resolver. /// </param> private void Initialize(IMerchelloContext merchelloContext, IProxyQueryManager queryManager, IEntityCollectionProviderResolver collectionProviderResolver) { this.Collections = new CollectionManager(merchelloContext, queryManager); this.Filters = new FilterGroupManager(merchelloContext, queryManager, collectionProviderResolver); }
/// <summary> /// Initializes the manager. /// </summary> /// <param name="merchelloContext"> /// The merchello Context. /// </param> /// <param name="collectionProviderResolver"> /// The <see cref="IEntityCollectionProviderResolver"/>. /// </param> private void Initialize(IMerchelloContext merchelloContext, IEntityCollectionProviderResolver collectionProviderResolver) { _productFilterGroupService = new Lazy <IProductFilterGroupQuery>(() => this.QueryManager.Instance <ProductFilterGroupQuery>(new object[] { merchelloContext })); }
/// <summary> /// Initializes a new instance of the <see cref="MerchelloHelper"/> class. /// </summary> /// <param name="merchelloContext"> /// The merchello context. /// </param> /// <param name="enableDataModifiers"> /// The enable data modifiers. /// </param> /// <param name="conversionType"> /// The conversion type. /// </param> /// <param name="queryManager"> /// The proxy service resolver. /// </param> /// <param name="collectionProviderResolver"> /// The <see cref="IEntityCollectionProviderResolver"/> /// </param> internal MerchelloHelper( IMerchelloContext merchelloContext, bool enableDataModifiers, DetachedValuesConversionType conversionType, IProxyQueryManager queryManager, IEntityCollectionProviderResolver collectionProviderResolver) { Ensure.ParameterNotNull(merchelloContext, "ServiceContext cannot be null"); Ensure.ParameterNotNull(queryManager, "The query manager was null"); Ensure.ParameterNotNull(collectionProviderResolver, "The IEntityCollectionProviderResolver was null"); _enableDataModifiers = enableDataModifiers; _queryProvider = new Lazy<ICachedQueryProvider>(() => new CachedQueryProvider(merchelloContext, _enableDataModifiers, conversionType)); _validationHelper = new Lazy<IValidationHelper>(() => new ValidationHelper()); this.Initialize(merchelloContext, queryManager, collectionProviderResolver); }