public CommerceSellableItemSearchResultProvider( ICommerceTypeLoader commerceTypeLoader, ICatalogContext context) { Assert.ArgumentNotNull(commerceTypeLoader, nameof(commerceTypeLoader)); Assert.ArgumentNotNull(context, nameof(context)); this.SearchIndex = commerceTypeLoader.CreateInstance <ICommerceSearchManager>() ?.GetIndex(context.CatalogName); }
public SearchQueryBuilder( ISitecoreContext sitecoreContext, ICommerceTypeLoader commerceTypeLoader) { Assert.ArgumentNotNull(sitecoreContext, nameof(sitecoreContext)); Assert.ArgumentNotNull(commerceTypeLoader, nameof(commerceTypeLoader)); this.sitecoreContext = sitecoreContext; this.commerceSearchManager = commerceTypeLoader.CreateInstance <ICommerceSearchManager>(); Assert.ArgumentNotNull(this.commerceSearchManager, nameof(this.commerceSearchManager)); }