本文整理汇总了C#中Merchello.Core.Persistence.RepositoryFactory类的典型用法代码示例。如果您正苦于以下问题:C# RepositoryFactory类的具体用法?C# RepositoryFactory怎么用?C# RepositoryFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoryFactory类属于Merchello.Core.Persistence命名空间,在下文中一共展示了RepositoryFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GatewayProviderService
internal GatewayProviderService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory,
IShipMethodService shipMethodService, IShipRateTierService shipRateTierService,
IShipCountryService shipCountryService, IInvoiceService invoiceService, IOrderService orderService, ITaxMethodService taxMethodService,
IPaymentService paymentService, IPaymentMethodService paymentMethodService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(shipMethodService, "shipMethodService");
Mandate.ParameterNotNull(shipRateTierService, "shipRateTierService");
Mandate.ParameterNotNull(shipCountryService, "shipCountryService");
Mandate.ParameterNotNull(taxMethodService, "countryTaxRateService");
Mandate.ParameterNotNull(paymentService, "paymentService");
Mandate.ParameterNotNull(paymentMethodService, "paymentMethodService");
Mandate.ParameterNotNull(invoiceService, "invoiceService");
Mandate.ParameterNotNull(orderService, "orderService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
_shipMethodService = shipMethodService;
_shipRateTierService = shipRateTierService;
_shipCountryService = shipCountryService;
_invoiceService = invoiceService;
_orderService = orderService;
_taxMethodService = taxMethodService;
_paymentService = paymentService;
_paymentMethodService = paymentMethodService;
}
示例2: DetachedContentTypeService
/// <summary>
/// Initializes a new instance of the <see cref="DetachedContentTypeService"/> class.
/// </summary>
/// <param name="provider">
/// The provider.
/// </param>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
public DetachedContentTypeService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
}
示例3: AnonymousCustomerService
/// <summary>
/// Initializes a new instance of the <see cref="AnonymousCustomerService"/> class.
/// </summary>
/// <param name="provider">
/// The provider.
/// </param>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
public AnonymousCustomerService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
}
示例4: NotificationMessageService
public NotificationMessageService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
}
示例5: ShipMethodService
internal ShipMethodService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
}
示例6: ProductVariantService
/// <summary>
/// Initializes a new instance of the <see cref="ProductVariantService"/> class.
/// </summary>
/// <param name="provider">
/// The provider.
/// </param>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
public ProductVariantService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
}
示例7: TaxMethodService
public TaxMethodService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, IStoreSettingService storeSettingService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(storeSettingService, "settingsService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
_storeSettingService = storeSettingService;
}
示例8: WarehouseService
/// <summary>
/// Initializes a new instance of the <see cref="WarehouseService"/> class.
/// </summary>
/// <param name="provider">
/// The provider.
/// </param>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
/// <param name="warehouseCatalogService">
/// The warehouse Catalog Service.
/// </param>
public WarehouseService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, IWarehouseCatalogService warehouseCatalogService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(warehouseCatalogService, "warehouseCatalogService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
_warehouseCatalogService = warehouseCatalogService;
}
示例9: OrderService
public OrderService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, IStoreSettingService storeSettingService, IShipmentService shipmentService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(storeSettingService, "storeSettingService");
Mandate.ParameterNotNull(shipmentService, "shipmentService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
_storeSettingService = storeSettingService;
_shipmentService = shipmentService;
}
示例10: ProductService
public ProductService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, IProductVariantService productVariantService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(productVariantService, "productVariantService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
// included the ProductVariantService so that events will trigger if variants
// need to be deleted due to a product save removing attributes
_productVariantService = productVariantService;
}
示例11: MerchelloRepositoryService
/// <summary>
/// Initializes a new instance of the <see cref="MerchelloRepositoryService"/> class.
/// </summary>
/// <param name="provider">
/// The provider.
/// </param>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
/// <param name="logger">
/// The logger.
/// </param>
/// <param name="eventMessagesFactory">
/// The event messages factory.
/// </param>
protected MerchelloRepositoryService(
IDatabaseUnitOfWorkProvider provider,
RepositoryFactory repositoryFactory,
ILogger logger,
IEventMessagesFactory eventMessagesFactory)
{
if (provider == null) throw new ArgumentNullException("provider");
if (repositoryFactory == null) throw new ArgumentNullException("repositoryFactory");
if (logger == null) throw new ArgumentNullException("logger");
if (eventMessagesFactory == null) throw new ArgumentNullException("eventMessagesFactory");
Logger = logger;
EventMessagesFactory = eventMessagesFactory;
RepositoryFactory = repositoryFactory;
UowProvider = provider;
}
示例12: InvoiceService
internal InvoiceService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, IAppliedPaymentService appliedPaymentService, IOrderService orderService,
IStoreSettingService storeSettingService)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
Mandate.ParameterNotNull(appliedPaymentService, "appliedPaymentService");
Mandate.ParameterNotNull(storeSettingService, "storeSettingService");
Mandate.ParameterNotNull(orderService, "orderService");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
_appliedPaymentService = appliedPaymentService;
_orderService = orderService;
_storeSettingService = storeSettingService;
}
示例13: StoreSettingService
public StoreSettingService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
{
Mandate.ParameterNotNull(provider, "provider");
Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
_uowProvider = provider;
_repositoryFactory = repositoryFactory;
if (!RegionProvinceCache.IsEmpty) return;
foreach (RegionElement region in MerchelloConfiguration.Current.Section.RegionalProvinces)
{
CacheRegion(region.Code, (from ProvinceElement pe in region.ProvincesConfiguration
select new Province(pe.Code, pe.Name)).Cast<IProvince>().ToArray());
}
}
示例14: GetServiceContext
public static ServiceContext GetServiceContext()
{
var syntax = (DbSyntax)Enum.Parse(typeof(DbSyntax), ConfigurationManager.AppSettings["syntax"]);
// sets up the Umbraco SqlSyntaxProvider Singleton OBSOLETE
SqlSyntaxProviderTestHelper.EstablishSqlSyntax(syntax);
var sqlSyntaxProvider = SqlSyntaxProviderTestHelper.SqlSyntaxProvider(syntax);
var cache = new CacheHelper(
new ObjectCacheRuntimeCacheProvider(),
new StaticCacheProvider(),
new NullCacheProvider());
var repositoryFactory = new RepositoryFactory(cache, TestLogger, sqlSyntaxProvider);
return new ServiceContext(repositoryFactory, new PetaPocoUnitOfWorkProvider(TestLogger), TestLogger, new TransientMessageFactory());
}
示例15: PaymentService
/// <summary>
/// Initializes a new instance of the <see cref="PaymentService"/> class.
/// </summary>
/// <param name="repositoryFactory">
/// The repository factory.
/// </param>
/// <param name="logger">
/// The logger.
/// </param>
/// <param name="appliedPaymentService">
/// The applied payment service.
/// </param>
internal PaymentService(RepositoryFactory repositoryFactory, ILogger logger, IAppliedPaymentService appliedPaymentService)
: this(new PetaPocoUnitOfWorkProvider(logger), repositoryFactory, logger, appliedPaymentService)
{
}