public AuditService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IAuditRepository auditRepository, IAuditEntryRepository auditEntryRepository) : base(provider, logger, eventMessagesFactory) { _auditRepository = auditRepository; _auditEntryRepository = auditEntryRepository; _isAvailable = new Lazy <bool>(DetermineIsAvailable); }
public RelationService(IScopeProvider uowProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IEntityService entityService, IRelationRepository relationRepository, IRelationTypeRepository relationTypeRepository) : base(uowProvider, logger, eventMessagesFactory) { _relationRepository = relationRepository; _relationTypeRepository = relationTypeRepository; _entityService = entityService ?? throw new ArgumentNullException(nameof(entityService)); }
/// <summary> /// Initializes a new instance of the <see cref="NoteService"/> 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 NoteService( IDatabaseUnitOfWorkProvider provider, Persistence.RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
public FileService( IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
protected ContentTypeServiceBase(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, TRepository repository, IAuditRepository auditRepository, IEntityContainerRepository containerRepository, IEntityRepository entityRepository) : base(provider, logger, eventMessagesFactory) { Repository = repository; _auditRepository = auditRepository; _containerRepository = containerRepository; _entityRepository = entityRepository; }
public MemberGroupService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMemberGroupRepository memberGroupRepository) : base(provider, logger, eventMessagesFactory) { _memberGroupRepository = memberGroupRepository; //Proxy events! MemberGroupRepository.SavedMemberGroup += MemberGroupRepository_SavedMemberGroup; MemberGroupRepository.SavingMemberGroup += MemberGroupRepository_SavingMemberGroup; }
public DataTypeService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IDataTypeRepository dataTypeRepository, IDataTypeContainerRepository dataTypeContainerRepository, IAuditRepository auditRepository, IEntityRepository entityRepository, IContentTypeRepository contentTypeRepository) : base(provider, logger, eventMessagesFactory) { _dataTypeRepository = dataTypeRepository; _dataTypeContainerRepository = dataTypeContainerRepository; _auditRepository = auditRepository; _entityRepository = entityRepository; _contentTypeRepository = contentTypeRepository; }
/// <summary> /// Initializes a new instance of the <see cref="ServerRegistrationService" /> class. /// </summary> public ServerRegistrationService( ICoreScopeProvider scopeProvider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IServerRegistrationRepository serverRegistrationRepository, IHostingEnvironment hostingEnvironment) : base(scopeProvider, loggerFactory, eventMessagesFactory) { _serverRegistrationRepository = serverRegistrationRepository; _hostingEnvironment = hostingEnvironment; }
public MediaTypeService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IMediaService mediaService, IMediaTypeRepository mediaTypeRepository, IAuditRepository auditRepository, IMediaTypeContainerRepository entityContainerRepository, IEntityRepository entityRepository, IEventAggregator eventAggregator) : base(provider, loggerFactory, eventMessagesFactory, mediaTypeRepository, auditRepository, entityContainerRepository, entityRepository, eventAggregator) => MediaService = mediaService;
public MacroService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IMacroRepository macroRepository, IAuditRepository auditRepository) : base(provider, loggerFactory, eventMessagesFactory) { _macroRepository = macroRepository; _auditRepository = auditRepository; }
public ContentTypeService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IContentService contentService, IContentTypeRepository repository, IAuditRepository auditRepository, IDocumentTypeContainerRepository entityContainerRepository, IEntityRepository entityRepository, IEventAggregator eventAggregator) : base(provider, loggerFactory, eventMessagesFactory, repository, auditRepository, entityContainerRepository, entityRepository, eventAggregator) =>
/// <summary> /// Adds a cancelled message to the display /// </summary> /// <param name="display"></param> /// <param name="header"></param> /// <param name="message"></param> /// <param name="headerArea"></param> /// <param name="headerAlias"></param> /// <param name="headerParams"></param> protected void AddCancelMessage(INotificationModel display, string message) { // if there's already a default event message, don't add our default one IEventMessagesFactory messages = EventMessages; if (messages?.GetOrDefault()?.GetAll().Any(x => x.IsDefaultEventMessage) == true) { return; } display.AddWarningNotification(LocalizedTextService.Localize("speechBubbles", "operationCancelledHeader"), message); }
public PublishingStrategy(IEventMessagesFactory eventMessagesFactory, ILogger logger) { if (eventMessagesFactory == null) { throw new ArgumentNullException("eventMessagesFactory"); } if (logger == null) { throw new ArgumentNullException("logger"); } _eventMessagesFactory = eventMessagesFactory; _logger = logger; }
public FileService(IScopeProvider uowProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IStylesheetRepository stylesheetRepository, IScriptRepository scriptRepository, ITemplateRepository templateRepository, IPartialViewRepository partialViewRepository, IPartialViewMacroRepository partialViewMacroRepository, IAuditRepository auditRepository) : base(uowProvider, logger, eventMessagesFactory) { _stylesheetRepository = stylesheetRepository; _scriptRepository = scriptRepository; _templateRepository = templateRepository; _partialViewRepository = partialViewRepository; _partialViewMacroRepository = partialViewMacroRepository; _auditRepository = auditRepository; }
public LocalizationService( IScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDictionaryRepository dictionaryRepository, IAuditRepository auditRepository, ILanguageRepository languageRepository) : base(provider, loggerFactory, eventMessagesFactory) { _dictionaryRepository = dictionaryRepository; _auditRepository = auditRepository; _languageRepository = languageRepository; }
public EntityService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IIdKeyMap idKeyMap, IEntityRepository entityRepository) : base(provider, loggerFactory, eventMessagesFactory) { _idKeyMap = idKeyMap; _entityRepository = entityRepository; _objectTypes = new Dictionary <string, UmbracoObjectTypes> { { typeof(IDataType).FullName !, UmbracoObjectTypes.DataType },
/// <summary> /// Initializes a new instance of the <see cref="ServiceContext"/> class. /// </summary> /// <param name="repositoryFactory"> /// The repository Factory. /// </param> /// <param name="dbUnitOfWorkProvider"> /// The database unit of work provider. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="eventMessagesFactory"> /// The event Messages Factory. /// </param> public ServiceContext( RepositoryFactory repositoryFactory, IDatabaseUnitOfWorkProvider dbUnitOfWorkProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory) { Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory"); Mandate.ParameterNotNull(dbUnitOfWorkProvider, "dbUnitOfWorkProvider"); Mandate.ParameterNotNull(logger, "logger"); Mandate.ParameterNotNull(eventMessagesFactory, "eventMessagesFactory"); DatabaseUnitOfWorkProvider = dbUnitOfWorkProvider; BuildServiceContext(dbUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory); }
public MemberExtendedService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IMemberGroupService memberGroupService, IMediaFileSystem mediaFileSystem, IMemberRepository memberRepository, IMemberTypeRepository memberTypeRepository, IMemberGroupRepository memberGroupRepository, IAuditRepository auditRepository, IExamineManager examineManager) : base(provider, logger, eventMessagesFactory, memberGroupService, mediaFileSystem, memberRepository, memberTypeRepository, memberGroupRepository, auditRepository) { this.logger = new Logging <MemberExtendedService>(logger); #endif this.memberGroupService = memberGroupService; this.memberRepository = memberRepository; this.examineManager = examineManager; }
public PublishingStrategy(IEventMessagesFactory eventMessagesFactory, ILogger logger) { if (eventMessagesFactory == null) { throw new ArgumentNullException("eventMessagesFactory"); } if (logger == null) { throw new ArgumentNullException("logger"); } _scopeProvider = new ScopeProvider(new DefaultDatabaseFactory(Constants.System.UmbracoConnectionName, logger)); _eventMessagesFactory = eventMessagesFactory; _logger = logger; }
/// <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; }
public ContentVersionService( ILogger <ContentVersionService> logger, IDocumentVersionRepository documentVersionRepository, IContentVersionCleanupPolicy contentVersionCleanupPolicy, IScopeProvider scopeProvider, IEventMessagesFactory eventMessagesFactory, IAuditRepository auditRepository) { _logger = logger; _documentVersionRepository = documentVersionRepository; _contentVersionCleanupPolicy = contentVersionCleanupPolicy; _scopeProvider = scopeProvider; _eventMessagesFactory = eventMessagesFactory; _auditRepository = auditRepository; }
/// <summary> /// Initializes a new instance of the <see cref="CacheInstructionService"/> class. /// </summary> public CacheInstructionService( IScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, ICacheInstructionRepository cacheInstructionRepository, IProfilingLogger profilingLogger, ILogger <CacheInstructionService> logger, IOptions <GlobalSettings> globalSettings) : base(provider, loggerFactory, eventMessagesFactory) { _cacheInstructionRepository = cacheInstructionRepository; _profilingLogger = profilingLogger; _logger = logger; _globalSettings = globalSettings.Value; }
/// <summary> /// Initializes a new instance of the <see cref="ContentControllerBase"/> class. /// </summary> protected ContentControllerBase( ICultureDictionary cultureDictionary, ILoggerFactory loggerFactory, IShortStringHelper shortStringHelper, IEventMessagesFactory eventMessages, ILocalizedTextService localizedTextService, IJsonSerializer serializer) { CultureDictionary = cultureDictionary; LoggerFactory = loggerFactory; _logger = loggerFactory.CreateLogger <ContentControllerBase>(); ShortStringHelper = shortStringHelper; EventMessages = eventMessages; LocalizedTextService = localizedTextService; _serializer = serializer; }
public NuCacheContentService( INuCacheContentRepository repository, IKeyValueService keyValueService, IScopeProvider provider, ILoggerFactory loggerFactory, IProfilingLogger profilingLogger, IEventMessagesFactory eventMessagesFactory, IOptions <NuCacheSettings> nucacheSettings) : base(provider, loggerFactory, eventMessagesFactory) { _repository = repository; _keyValueService = keyValueService; _profilingLogger = profilingLogger; _nucacheSettings = nucacheSettings; _logger = loggerFactory.CreateLogger <NuCacheContentService>(); }
public FileService(IScopeProvider uowProvider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IStylesheetRepository stylesheetRepository, IScriptRepository scriptRepository, ITemplateRepository templateRepository, IPartialViewRepository partialViewRepository, IPartialViewMacroRepository partialViewMacroRepository, IAuditRepository auditRepository, IShortStringHelper shortStringHelper, IOptions <GlobalSettings> globalSettings, IHostingEnvironment hostingEnvironment) : base(uowProvider, loggerFactory, eventMessagesFactory) { _stylesheetRepository = stylesheetRepository; _scriptRepository = scriptRepository; _templateRepository = templateRepository; _partialViewRepository = partialViewRepository; _partialViewMacroRepository = partialViewMacroRepository; _auditRepository = auditRepository; _shortStringHelper = shortStringHelper; _globalSettings = globalSettings.Value; _hostingEnvironment = hostingEnvironment; }
public UserService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IRuntimeState runtimeState, IUserRepository userRepository, IUserGroupRepository userGroupRepository, IOptions <GlobalSettings> globalSettings) : base(provider, loggerFactory, eventMessagesFactory) { _runtimeState = runtimeState; _userRepository = userRepository; _userGroupRepository = userGroupRepository; _globalSettings = globalSettings.Value; _logger = loggerFactory.CreateLogger <UserService>(); }
public MediaController( ICultureDictionary cultureDictionary, ILoggerFactory loggerFactory, IShortStringHelper shortStringHelper, IEventMessagesFactory eventMessages, ILocalizedTextService localizedTextService, IOptions <ContentSettings> contentSettings, IMediaTypeService mediaTypeService, IMediaService mediaService, IEntityService entityService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, IUmbracoMapper umbracoMapper, IDataTypeService dataTypeService, ISqlContext sqlContext, IContentTypeBaseServiceProvider contentTypeBaseServiceProvider, IRelationService relationService, PropertyEditorCollection propertyEditors, MediaFileManager mediaFileManager, MediaUrlGeneratorCollection mediaUrlGenerators, IHostingEnvironment hostingEnvironment, IImageUrlGenerator imageUrlGenerator, IJsonSerializer serializer, IAuthorizationService authorizationService, AppCaches appCaches) : base(cultureDictionary, loggerFactory, shortStringHelper, eventMessages, localizedTextService, serializer) { _shortStringHelper = shortStringHelper; _contentSettings = contentSettings.Value; _mediaTypeService = mediaTypeService; _mediaService = mediaService; _entityService = entityService; _backofficeSecurityAccessor = backofficeSecurityAccessor; _umbracoMapper = umbracoMapper; _dataTypeService = dataTypeService; _localizedTextService = localizedTextService; _sqlContext = sqlContext; _contentTypeBaseServiceProvider = contentTypeBaseServiceProvider; _relationService = relationService; _propertyEditors = propertyEditors; _mediaFileManager = mediaFileManager; _mediaUrlGenerators = mediaUrlGenerators; _hostingEnvironment = hostingEnvironment; _logger = loggerFactory.CreateLogger <MediaController>(); _imageUrlGenerator = imageUrlGenerator; _authorizationService = authorizationService; _appCaches = appCaches; }
public EntityService(IScopeProvider provider, ILogger logger, IEventMessagesFactory eventMessagesFactory, IdkMap idkMap, IEntityRepository entityRepository) : base(provider, logger, eventMessagesFactory) { _idkMap = idkMap; _entityRepository = entityRepository; _objectTypes = new Dictionary <string, UmbracoObjectTypes> { { typeof(IDataType).FullName, UmbracoObjectTypes.DataType }, { typeof(IContent).FullName, UmbracoObjectTypes.Document }, { typeof(IContentType).FullName, UmbracoObjectTypes.DocumentType }, { typeof(IMedia).FullName, UmbracoObjectTypes.Media }, { typeof(IMediaType).FullName, UmbracoObjectTypes.MediaType }, { typeof(IMember).FullName, UmbracoObjectTypes.Member }, { typeof(IMemberType).FullName, UmbracoObjectTypes.MemberType }, }; }
/// <summary> /// Adds a cancelled message to the display /// </summary> /// <param name="display"></param> /// <param name="messageArea"></param> /// <param name="messageAlias"></param> /// <param name="messageParams"></param> protected void AddCancelMessage( INotificationModel?display, string messageArea = "speechBubbles", string messageAlias = "operationCancelledText", string[]?messageParams = null) { // if there's already a default event message, don't add our default one IEventMessagesFactory messages = EventMessages; if (messages != null && (messages.GetOrDefault()?.GetAll().Any(x => x.IsDefaultEventMessage) ?? false)) { return; } display?.AddWarningNotification( LocalizedTextService.Localize("speechBubbles", "operationCancelledHeader"), LocalizedTextService.Localize(messageArea, messageAlias, messageParams)); }
public CacheInstructionService( ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, ICacheInstructionRepository cacheInstructionRepository, IProfilingLogger profilingLogger, ILogger <Infrastructure.Services.CacheInstructionService> logger, IOptions <GlobalSettings> globalSettings) : base( provider, loggerFactory, eventMessagesFactory, cacheInstructionRepository, profilingLogger, logger, globalSettings) { }
public DataTypeService( IDataValueEditorFactory dataValueEditorFactory, ICoreScopeProvider provider, ILoggerFactory loggerFactory, IEventMessagesFactory eventMessagesFactory, IDataTypeRepository dataTypeRepository, IDataTypeContainerRepository dataTypeContainerRepository, IAuditRepository auditRepository, IEntityRepository entityRepository, IContentTypeRepository contentTypeRepository, IIOHelper ioHelper, ILocalizedTextService localizedTextService, ILocalizationService localizationService, IShortStringHelper shortStringHelper, IJsonSerializer jsonSerializer) : this( dataValueEditorFactory, provider, loggerFactory, eventMessagesFactory, dataTypeRepository, dataTypeContainerRepository, auditRepository, entityRepository, contentTypeRepository, ioHelper, localizedTextService, localizationService, shortStringHelper, jsonSerializer, StaticServiceProvider.Instance.GetRequiredService <IEditorConfigurationParser>()) { _dataValueEditorFactory = dataValueEditorFactory; _dataTypeRepository = dataTypeRepository; _dataTypeContainerRepository = dataTypeContainerRepository; _auditRepository = auditRepository; _entityRepository = entityRepository; _contentTypeRepository = contentTypeRepository; _ioHelper = ioHelper; _localizedTextService = localizedTextService; _localizationService = localizationService; _shortStringHelper = shortStringHelper; _jsonSerializer = jsonSerializer; }
/// <summary> /// Initializes a new instance of the <see cref="EntityCollectionService"/> 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> internal EntityCollectionService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="NotificationMethodService"/> 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 NotificationMethodService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <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="logger"> /// The logger. /// </param> /// <param name="eventMessagesFactory"> /// The event messages factory. /// </param> /// <param name="warehouseCatalogService"> /// The warehouse catalog service. /// </param> public WarehouseService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IWarehouseCatalogService warehouseCatalogService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { Mandate.ParameterNotNull(warehouseCatalogService, "warehouseCatalogService"); _warehouseCatalogService = warehouseCatalogService; }
/// <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> /// <param name="logger"> /// The logger. /// </param> /// <param name="eventMessagesFactory"> /// The event messages factory. /// </param> public AnonymousCustomerService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="ProductOptionService"/> 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 ProductOptionService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="StoreSettingService"/> 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 StoreSettingService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { 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()); } }
/// <summary> /// Initializes a new instance of the <see cref="WarehouseCatalogService"/> 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> /// <param name="productVariantService"> /// The product variant service. /// </param> internal WarehouseCatalogService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IProductVariantService productVariantService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { Mandate.ParameterNotNull(productVariantService, "productVariantService"); _productVariantService = productVariantService; }
/// <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)); } if (_warehouseService == null) _warehouseService = new Lazy<IWarehouseService>(() => new WarehouseService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory, _warehouseCatalogService.Value)); if (_notificationMessageService == null) _notificationMessageService = new Lazy<INotificationMessageService>(() => new NotificationMessageService(dbDatabaseUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory)); }
/// <summary> /// Initializes a new instance of the <see cref="DigitalMediaService"/> 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 DigitalMediaService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="ShipMethodService"/> 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> internal ShipMethodService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="ServiceContext"/> class. /// </summary> /// <param name="repositoryFactory"> /// The repository Factory. /// </param> /// <param name="dbUnitOfWorkProvider"> /// The database unit of work provider. /// </param> /// <param name="logger"> /// The logger. /// </param> /// <param name="eventMessagesFactory"> /// The event Messages Factory. /// </param> public ServiceContext( RepositoryFactory repositoryFactory, IDatabaseUnitOfWorkProvider dbUnitOfWorkProvider, ILogger logger, IEventMessagesFactory eventMessagesFactory) { Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory"); Mandate.ParameterNotNull(dbUnitOfWorkProvider, "dbUnitOfWorkProvider"); Mandate.ParameterNotNull(logger, "logger"); Mandate.ParameterNotNull(eventMessagesFactory, "eventMessagesFactory"); DatabaseUnitOfWorkProvider = dbUnitOfWorkProvider; BuildServiceContext(dbUnitOfWorkProvider, repositoryFactory, logger, eventMessagesFactory); }
internal GatewayProviderService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IShipMethodService shipMethodService, IShipRateTierService shipRateTierService, IShipCountryService shipCountryService, IInvoiceService invoiceService, IOrderService orderService, ITaxMethodService taxMethodService, IPaymentService paymentService, IPaymentMethodService paymentMethodService, INotificationMethodService notificationMethodService, INotificationMessageService notificationMessageService, IWarehouseService warehouseService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { 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"); Mandate.ParameterNotNull(notificationMethodService, "notificationMethodService"); Mandate.ParameterNotNull(notificationMessageService, "notificationMessageService"); Mandate.ParameterNotNull(warehouseService, "warehouseService"); _shipMethodService = shipMethodService; _shipRateTierService = shipRateTierService; _shipCountryService = shipCountryService; _invoiceService = invoiceService; _orderService = orderService; _taxMethodService = taxMethodService; _paymentService = paymentService; _paymentMethodService = paymentMethodService; _notificationMethodService = notificationMethodService; _notificationMessageService = notificationMessageService; _warehouseService = warehouseService; }
/// <summary> /// Initializes a new instance of the <see cref="PaymentService"/> 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> /// <param name="appliedPaymentService"> /// The applied payment service. /// </param> internal PaymentService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IAppliedPaymentService appliedPaymentService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { Mandate.ParameterNotNull(appliedPaymentService, "appliedPaymentService"); _appliedPaymentService = appliedPaymentService; }
/// <summary> /// Initializes a new instance of the <see cref="OfferSettingsService"/> 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 OfferSettingsService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <summary> /// Initializes a new instance of the <see cref="AppliedPaymentService"/> 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 AppliedPaymentService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory) : base(provider, repositoryFactory, logger, eventMessagesFactory) { }
/// <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) { }
/// <summary> /// Initializes a new instance of the <see cref="ShipmentService"/> 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> /// <param name="storeSettingService"> /// The store setting service. /// </param> public ShipmentService(IDatabaseUnitOfWorkProvider provider, RepositoryFactory repositoryFactory, ILogger logger, IEventMessagesFactory eventMessagesFactory, IStoreSettingService storeSettingService) : base(provider, repositoryFactory, logger, eventMessagesFactory) { Mandate.ParameterNotNull(storeSettingService, "storeSettingService"); _storeSettingService = storeSettingService; }