• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Persistence.RepositoryFactory类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Merchello.Core.Persistence.RepositoryFactory的典型用法代码示例。如果您正苦于以下问题:C# RepositoryFactory类的具体用法?C# RepositoryFactory怎么用?C# RepositoryFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RepositoryFactory类属于Merchello.Core.Persistence命名空间,在下文中一共展示了RepositoryFactory类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
        }
开发者ID:koswesley,项目名称:Merchello-1,代码行数:27,代码来源:GatewayProviderService.cs


示例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;
        }
开发者ID:EricMunn,项目名称:Merchello,代码行数:17,代码来源:DetachedContentTypeService.cs


示例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;
 }
开发者ID:arknu,项目名称:Merchello,代码行数:17,代码来源:AnonymousCustomerService.cs


示例4: NotificationMessageService

        public NotificationMessageService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
        {
            Mandate.ParameterNotNull(provider, "provider");
            Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");

            _uowProvider = provider;
            _repositoryFactory = repositoryFactory;
        }
开发者ID:BatJan,项目名称:Merchello,代码行数:8,代码来源:NotificationMessageService.cs


示例5: ShipMethodService

        internal ShipMethodService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory)
        {
            Mandate.ParameterNotNull(provider, "provider");
            Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");

            _uowProvider = provider;
            _repositoryFactory = repositoryFactory;
        }
开发者ID:naepalm,项目名称:Merchello,代码行数:8,代码来源:ShipMethodService.cs


示例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;
        }
开发者ID:ProNotion,项目名称:Merchello,代码行数:17,代码来源:ProductVariantService.cs


示例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;
        }
开发者ID:koswesley,项目名称:Merchello-1,代码行数:10,代码来源:TaxMethodService.cs


示例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;
        }
开发者ID:arknu,项目名称:Merchello,代码行数:22,代码来源:WarehouseService.cs


示例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;
        }
开发者ID:VDBBjorn,项目名称:Merchello,代码行数:12,代码来源:OrderService.cs


示例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;
        }
开发者ID:BatJan,项目名称:Merchello,代码行数:13,代码来源:ProductService.cs


示例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;
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:30,代码来源:MerchelloRepositoryService.cs


示例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;
        }
开发者ID:naepalm,项目名称:Merchello,代码行数:15,代码来源:InvoiceService.cs


示例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());
            }
        }
开发者ID:VDBBjorn,项目名称:Merchello,代码行数:16,代码来源:StoreSettingService.cs


示例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());
        }
开发者ID:jlarc,项目名称:Merchello,代码行数:17,代码来源:MockDataMakerBase.cs


示例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)
 {
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:16,代码来源:PaymentService.cs


示例16: ItemCacheService

 public ItemCacheService(RepositoryFactory repositoryFactory)
     : this(new PetaPocoUnitOfWorkProvider(), repositoryFactory)
 {
 }
开发者ID:VDBBjorn,项目名称:Merchello,代码行数:4,代码来源:ItemCacheService.cs


示例17: BuildServiceContext

        /// <summary>
        /// Builds the various services
        /// </summary>
        /// <param name="dbDatabaseUnitOfWorkProvider">
        /// Database unit of work provider used by the various services
        /// </param>
        /// <param name="repositoryFactory">
        /// The <see cref="RepositoryFactory"/>
        /// </param>
        /// <param name="logger">
        /// The logger.
        /// </param>
        /// <param name="eventMessagesFactory">
        /// The event Messages Factory.
        /// </param>
        private void BuildServiceContext(IDatabaseUnitOfWorkProvider dbDatabaseUnitOfWorkProvider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory)
        {
            if (_anonymousCustomerService == null)
                _anonymousCustomerService = new Lazy<IAnonymousCustomerService>(() => new AnonymousCustomerService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_appliedPaymentService == null)
                _appliedPaymentService = new Lazy<IAppliedPaymentService>(() => new AppliedPaymentService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_auditLogService == null)
                _auditLogService = new Lazy<IAuditLogService>(() => new AuditLogService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_customerAddressService == null)
                _customerAddressService = new Lazy<ICustomerAddressService>(() => new CustomerAddressService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_customerService == null)
                _customerService = new Lazy<ICustomerService>(() => new CustomerService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _anonymousCustomerService.Value, _customerAddressService.Value, _invoiceService.Value, _paymentService.Value));

            if (_detachedContentTypeService == null)
                _detachedContentTypeService = new Lazy<IDetachedContentTypeService>(() => new DetachedContentTypeService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_digitalMediaService == null)
                _digitalMediaService = new Lazy<IDigitalMediaService>(() => new DigitalMediaService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_entityCollectionService == null)
                _entityCollectionService = new Lazy<IEntityCollectionService>(() => new EntityCollectionService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_itemCacheService == null)
                _itemCacheService = new Lazy<IItemCacheService>(() => new ItemCacheService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_notificationMethodService == null)
                _notificationMethodService = new Lazy<INotificationMethodService>(() => new NotificationMethodService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_notificationMessageService == null)
                _notificationMessageService = new Lazy<INotificationMessageService>(() => new NotificationMessageService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_offerSettingsService == null)
                _offerSettingsService = new Lazy<IOfferSettingsService>(() => new OfferSettingsService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_offerRedeemedService == null)
                _offerRedeemedService = new Lazy<IOfferRedeemedService>(() => new OfferRedeemedService(DatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_paymentService == null)
                _paymentService = new Lazy<IPaymentService>(() => new PaymentService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _appliedPaymentService.Value));

            if (_paymentMethodService == null)
                _paymentMethodService = new Lazy<IPaymentMethodService>(() => new PaymentMethodService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_productVariantService == null)
                _productVariantService = new Lazy<IProductVariantService>(() => new ProductVariantService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_productService == null)
                _productService = new Lazy<IProductService>(() => new ProductService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _productVariantService.Value));

            if (_storeSettingsService == null)
                _storeSettingsService = new Lazy<IStoreSettingService>(() => new StoreSettingService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_shipCountryService == null)
                _shipCountryService = new Lazy<IShipCountryService>(() => new ShipCountryService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _storeSettingsService.Value));

            if (_shipMethodService == null)
                _shipMethodService = new Lazy<IShipMethodService>(() => new ShipMethodService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_shipRateTierService == null)
                _shipRateTierService = new Lazy<IShipRateTierService>(() => new ShipRateTierService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory));

            if (_shipmentService == null)
                _shipmentService = new Lazy<IShipmentService>(() => new ShipmentService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _storeSettingsService.Value));

            if (_orderService == null)
                _orderService = new Lazy<IOrderService>(() => new OrderService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _storeSettingsService.Value, _shipmentService.Value));

            if (_invoiceService == null)
                _invoiceService = new Lazy<IInvoiceService>(() => new InvoiceService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _appliedPaymentService.Value, _orderService.Value, _storeSettingsService.Value));

            if (_countryTaxRateService == null)
                _countryTaxRateService = new Lazy<ITaxMethodService>(() => new TaxMethodService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _storeSettingsService.Value));

            if (_gatewayProviderService == null)
                _gatewayProviderService = new Lazy<IGatewayProviderService>(() => new GatewayProviderService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _shipMethodService.Value, _shipRateTierService.Value, _shipCountryService.Value, _invoiceService.Value, _orderService.Value, _countryTaxRateService.Value, _paymentService.Value, _paymentMethodService.Value, _notificationMethodService.Value, _notificationMessageService.Value, _warehouseService.Value));

            if (_warehouseCatalogService == null)
            {
                _warehouseCatalogService = new Lazy<IWarehouseCatalogService>(() => new WarehouseCatalogService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _productVariantService.Value));
            }

//.........这里部分代码省略.........
开发者ID:Nikita-reddy,项目名称:Merchello,代码行数:101,代码来源:ServiceContext.cs


示例18: OfferRedeemedService

 /// <summary>
 /// Initializes a new instance of the <see cref="OfferRedeemedService"/> class.
 /// </summary>
 /// <param name="provider">
 /// The provider.
 /// </param>
 /// <param name="repositoryFactory">
 /// The repository factory.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 public OfferRedeemedService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger)
     : this(provider, repositoryFactory, logger, new TransientMessageFactory())
 {
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:16,代码来源:OfferRedeemedService.cs


示例19: 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>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <param name="eventMessagesFactory">
 /// The event messages factory.
 /// </param>
 public DetachedContentTypeService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory)
     : base(provider, repositoryFactory, logger, eventMessagesFactory)
 {
 }
开发者ID:drpeck,项目名称:Merchello,代码行数:19,代码来源:DetachedContentTypeService.cs



注:本文中的Merchello.Core.Persistence.RepositoryFactory类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# GameClients.GameClient类代码示例发布时间:2022-05-26
下一篇:
C# Models.CheckoutViewModel类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap