// ReSharper disable once SuggestBaseTypeForParameter /* we don't want this because of DI */

        public OpenModUnturnedHost(
            IRuntime runtime,
            IServiceProvider serviceProvider,
            ILifetimeScope lifetimeScope,
            IDataStoreFactory dataStoreFactory,
            IConsoleActorAccessor consoleActorAccessor,
            ICommandExecutor commandExecutor,
            ILogger <OpenModUnturnedHost> logger,
            UnturnedCommandHandler unturnedCommandHandler)
        {
            m_ServiceProvider      = serviceProvider;
            m_ConsoleActorAccessor = consoleActorAccessor;
            m_CommandExecutor      = commandExecutor;
            m_Logger = logger;
            m_UnturnedCommandHandler = unturnedCommandHandler;
            WorkingDirectory         = runtime.WorkingDirectory;
            LifetimeScope            = lifetimeScope;
            DataStore      = dataStoreFactory.CreateDataStore("openmod.unturned", WorkingDirectory);
            Version        = VersionHelper.ParseAssemblyVersion(GetType().Assembly);
            m_Capabilities = new HashSet <string>(StringComparer.OrdinalIgnoreCase)
            {
                KnownGameCapabilities.Health,
                KnownGameCapabilities.Inventory,
                KnownGameCapabilities.Vehicles
            };
        }
 public BatchUploadService()
 {
     documentUploadService = new DocumentUploadService();
     queueManager          = new QueueManager();
     exceptionHandler      = new ExceptionHandler();
     dataStoreFactory      = new DataStoreFactory();
 }
 public BatchUploadService(DocumentUploadService uploadService_, QueueManager queueManager_, IExceptionHandler exceptionHandler_, IDataStoreFactory batchUploader_)
 {
     documentUploadService = uploadService_;
     queueManager          = queueManager_;
     exceptionHandler      = exceptionHandler_;
     dataStoreFactory      = batchUploader_;
 }
示例#4
0
 /// <summary>
 /// Construct a <see cref="ChangelogModule"/>
 /// </summary>
 /// <param name="dataStoreFactory">The <see cref="IDataStoreFactory{TModule}"/> to create <see cref="dataStore"/> from</param>
 /// <param name="stringLocalizer">The value of <see cref="stringLocalizer"/></param>
 /// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="generalConfiguration"/></param>
 /// <param name="gitHubManager">The value of <see cref="gitHubManager"/></param>
 public ChangelogModule(IDataStoreFactory <ChangelogModule> dataStoreFactory, IStringLocalizer <ChangelogModule> stringLocalizer, IOptions <GeneralConfiguration> generalConfigurationOptions, IGitHubManager gitHubManager)
 {
     this.stringLocalizer = stringLocalizer ?? throw new ArgumentNullException(nameof(stringLocalizer));
     this.gitHubManager   = gitHubManager ?? throw new ArgumentNullException(nameof(gitHubManager));
     generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
     dataStore            = dataStoreFactory?.CreateDataStore(this) ?? throw new ArgumentNullException(nameof(dataStoreFactory));
 }
示例#5
0
        public JobScheduler(
            IRuntime runtime,
            ILogger <JobScheduler> logger,
            IDataStoreFactory dataStoreFactory,
            IOptions <JobExecutorOptions> options)
        {
            m_Runtime = runtime;
            m_Logger  = logger;

            m_DataStore = dataStoreFactory.CreateDataStore(new DataStoreCreationParameters
            {
                Component        = runtime,
                LogOnChange      = true,
                WorkingDirectory = runtime.WorkingDirectory
            });

            AsyncHelper.RunSync(ReadJobsFileAsync);

            m_ScheduledJobs = new List <ScheduledJob>();
            m_DataStore.AddChangeWatcher(c_DataStoreKey, runtime, () =>
            {
                m_ScheduledJobs.Clear();
                AsyncHelper.RunSync(() => StartAsync(isFromFileChange: true));
            });

            m_JobExecutors = new List <ITaskExecutor>();
            foreach (var provider in options.Value.JobExecutorTypes)
            {
                m_JobExecutors.Add(
                    (ITaskExecutor)ActivatorUtilitiesEx.CreateInstance(runtime.LifetimeScope, provider));
            }
        }
示例#6
0
 public OpenModRustOxideHost(
     ILifetimeScope lifetimeScope,
     IRuntime runtime,
     IDataStoreFactory dataStoreFactory) :
     base(lifetimeScope, runtime, dataStoreFactory)
 {
 }
 /// <summary>
 /// Construct a <see cref="ChangelogGeneratorModule"/>
 /// </summary>
 /// <param name="dataStoreFactory">The <see cref="IDataStoreFactory{TModule}"/> to create <see cref="dataStore"/> from</param>
 /// <param name="stringLocalizer">The value of <see cref="stringLocalizer"/></param>
 /// <param name="generalConfigurationOptions">The <see cref="IOptions{TOptions}"/> containing the value of <see cref="generalConfiguration"/></param>
 /// <param name="ioManager">The value of <see cref="ioManager"/></param>
 /// <param name="repository">The value of <see cref="repository"/></param>
 public ChangelogGeneratorModule(IDataStoreFactory <ChangelogGeneratorModule> dataStoreFactory, IStringLocalizer <ChangelogGeneratorModule> stringLocalizer, IOptions <GeneralConfiguration> generalConfigurationOptions, IIOManager ioManager, IRepository repository)
 {
     this.stringLocalizer = stringLocalizer ?? throw new ArgumentNullException(nameof(stringLocalizer));
     this.ioManager       = ioManager ?? throw new ArgumentNullException(nameof(ioManager));
     this.repository      = repository ?? throw new ArgumentNullException(nameof(repository));
     generalConfiguration = generalConfigurationOptions?.Value ?? throw new ArgumentNullException(nameof(generalConfigurationOptions));
     dataStore            = dataStoreFactory?.CreateDataStore(this) ?? throw new ArgumentNullException(nameof(dataStoreFactory));
 }
示例#8
0
 public WebDataStoreFactory(
     IDataStoreFactory parentDataStoreFactory,
     IPluginAccessor <WebDataStorePlugin> pluginAccessor,
     ILoggerFactory loggerFactory)
 {
     _parentDataStoreFactory = parentDataStoreFactory;
     _pluginAccessor         = pluginAccessor;
     _loggerFactory          = loggerFactory;
 }
示例#9
0
 public OpenModRustOxideHost(
     IServiceProvider serviceProvider,
     ILifetimeScope lifetimeScope,
     IRuntime runtime,
     IDataStoreFactory dataStoreFactory) :
     base(lifetimeScope, runtime, dataStoreFactory)
 {
     m_ServiceProvider = serviceProvider;
 }
        public void Should_throwAnExceptionWhenNoDataStoreIsAvailable()
        {
            var stubConfigProvider = MockRepository.GenerateStub <IConfigProvider>();

            stubConfigProvider.Stub(x => x.GetAppSettings(Arg <string> .Is.Anything)).Return("UnknowDataStore");
            _target = new DataStoreFactory(stubConfigProvider, Enumerable.Empty <IDataStore>());

            _target.Get();
        }
示例#11
0
        public KeyValueLite(IDataStoreFactory dsFactory, IKeyValueItemSerializer serializer, ILogger logger)
        {
            syncer          = new Syncer(logger);
            this.serializer = serializer;

            var datastore = dsFactory.CreateDataStore(nameof(KeyValueLite));

            db = new KeyValueDbContext(datastore, logger);
            KeyValueDbContext.InitDb(db);
        }
示例#12
0
        public AccountRepository(IConfigurationManager configurationManager, IDataStoreFactory dataStoreFactory)
        {
            // In my opinion, reading the app data and creating store should be done by the PaymentService consumer.
            // Since there is no consumer class,I made the repository class to do this.
            // Instead of IConfigurationManager and IDataStoreFactory,I would inject only the IDataStore in to this class
            var dataStoreType = configurationManager.GetAppSettings("DataStoreType");
            var dataStore     = dataStoreFactory.CreateDataStore(dataStoreType);

            DataStore = dataStore;
        }
        public PaymentServiceBuilder MockWith(Account account)
        {
            _mockDataStore = MockRepository.GenerateMock <IDataStore>();
            _mockDataStore.Stub(x => x.GetAccount(Arg <string> .Is.Anything))
            .Return(account);

            _mockDataStoreFactory = MockRepository.GenerateStub <IDataStoreFactory>();
            _mockDataStoreFactory.Stub(x => x.Get()).Return(_mockDataStore);
            return(this);
        }
示例#14
0
 public PaymentService(IDataStoreFactory dataStoreFactory,
                       IAccountValidator <AccountValidatorBacs> accountValidatorBacs,
                       IAccountValidator <AccountValidatorFasterPayments> accountValidatorFasterPayments,
                       IAccountValidator <AccountValidatorChaps> accountValidatorChaps,
                       IAppConfig appConfig)
 {
     _dataStoreFactory               = dataStoreFactory;
     _accountValidatorBacs           = accountValidatorBacs;
     _accountValidatorFasterPayments = accountValidatorFasterPayments;
     _accountValidatorChaps          = accountValidatorChaps;
     _appConfig = appConfig;
 }
示例#15
0
 internal ConfigurationBuilder(Configuration copyFrom)
 {
     _dataSourceFactory           = copyFrom.DataSourceFactory;
     _dataStoreFactory            = copyFrom.DataStoreFactory;
     _diagnosticOptOut            = copyFrom.DiagnosticOptOut;
     _eventProcessorFactory       = copyFrom.EventProcessorFactory;
     _httpConfigurationFactory    = copyFrom.HttpConfigurationFactory;
     _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory;
     _offline       = copyFrom.Offline;
     _sdkKey        = copyFrom.SdkKey;
     _startWaitTime = copyFrom.StartWaitTime;
 }
示例#16
0
 public PluginActivator(
     IRuntime runtime,
     ILogger <PluginActivator> logger,
     IStringLocalizerFactory stringLocalizerFactory,
     ILifetimeScope lifetimeScope,
     IDataStoreFactory dataStoreFactory)
 {
     m_Runtime = runtime;
     m_Logger  = logger;
     m_StringLocalizerFactory = stringLocalizerFactory;
     m_LifetimeScope          = lifetimeScope;
     m_DataStoreFactory       = dataStoreFactory;
 }
示例#17
0
 public StandaloneHost(
     IRuntime runtime,
     ILifetimeScope lifetimeScope,
     IDataStoreFactory dataStoreFactory,
     IConsoleActorAccessor consoleActorAccessor,
     ICommandExecutor commandExecutor)
 {
     m_ConsoleActorAccessor = consoleActorAccessor;
     m_CommandExecutor      = commandExecutor;
     Version          = VersionHelper.ParseAssemblyVersion(GetType().Assembly);
     WorkingDirectory = runtime.WorkingDirectory;
     LifetimeScope    = lifetimeScope;
     DataStore        = dataStoreFactory.CreateDataStore("openmod.standalone", WorkingDirectory);
 }
示例#18
0
 internal ConfigurationBuilder(Configuration copyFrom)
 {
     _bigSegmentsConfigurationFactory = copyFrom.BigSegmentsConfigurationFactory;
     _dataSourceFactory           = copyFrom.DataSourceFactory;
     _dataStoreFactory            = copyFrom.DataStoreFactory;
     _diagnosticOptOut            = copyFrom.DiagnosticOptOut;
     _eventProcessorFactory       = copyFrom.EventProcessorFactory;
     _httpConfigurationFactory    = copyFrom.HttpConfigurationFactory;
     _loggingConfigurationFactory = copyFrom.LoggingConfigurationFactory;
     _offline = copyFrom.Offline;
     _sdkKey  = copyFrom.SdkKey;
     _serviceEndpointsBuilder = new ServiceEndpointsBuilder(copyFrom.ServiceEndpoints);
     _startWaitTime           = copyFrom.StartWaitTime;
 }
示例#19
0
 public PluginActivator(
     IRuntime runtime,
     ILogger <PluginActivator> logger,
     IStringLocalizerFactory stringLocalizerFactory,
     ILifetimeScope lifetimeScope,
     IDataStoreFactory dataStoreFactory, IEventBus eventBus)
 {
     m_Runtime = runtime;
     m_Logger  = logger;
     m_StringLocalizerFactory = stringLocalizerFactory;
     m_LifetimeScope          = lifetimeScope;
     m_DataStoreFactory       = dataStoreFactory;
     m_EventBus         = eventBus;
     m_ActivatedPlugins = new List <WeakReference>();
 }
        public void Should_ReturnExpectedDataStore()
        {
            var stubConfigProvider = MockRepository.GenerateStub <IConfigProvider>();

            stubConfigProvider.Stub(x => x.GetAppSettings(Arg <string> .Is.Anything)).Return("Account");

            _target = new DataStoreFactory(stubConfigProvider, new List <IDataStore>()
            {
                new AccountDataStore(), new BackupAccountDataStore()
            });

            var dataStore = _target.Get();

            Assert.IsInstanceOfType(dataStore, typeof(AccountDataStore));
        }
示例#21
0
 protected BaseOpenModRustHost(
     ILifetimeScope lifetimeScope,
     IRuntime runtime,
     IDataStoreFactory dataStoreFactory
     )
 {
     LifetimeScope    = lifetimeScope;
     WorkingDirectory = runtime.WorkingDirectory;
     DataStore        = dataStoreFactory.CreateDataStore(new DataStoreCreationParameters
     {
         ComponentId      = OpenModComponentId,
         Prefix           = "openmod.rust",
         Suffix           = null,
         WorkingDirectory = WorkingDirectory
     });
 }
示例#22
0
        public CooldownsPlugin(ILogger <CooldownsPlugin> logger,
                               IDataStoreFactory dataStoreFactory,
                               IPermissionRegistry permissionRegistry,
                               IStringLocalizer stringLocalizer,
                               IPermissionRoleStore permissionRoleStore,
                               IPermissionRolesDataStore permissionRolesDataStore,
                               IServiceProvider serviceProvider) : base(serviceProvider)
        {
            m_Logger                   = logger;
            m_DataStoreFactory         = dataStoreFactory;
            m_PermissionRegistry       = permissionRegistry;
            m_PermissionRoleStore      = permissionRoleStore;
            m_PermissionRolesDataStore = permissionRolesDataStore;

            StringLocalizer = stringLocalizer;
        }
示例#23
0
 public void register(String key, IDataStoreFactory factory)
 {
     try
     {
         if (factory != null)
         {
             factoryMap.Add(key, factory);
         }
         Trace.Write("Added factory to the map with key : " + key);
     }
     catch (ArgumentException)
     {
         factoryMap.Remove(key);
         factoryMap.Add(key, factory);
         Trace.Write("Modified factory with key : " + key);
     }
 }
示例#24
0
        //Returns repository impl
        public IRepository getRepository(String key)
        {
            IRepository result = null;

            if (!String.IsNullOrEmpty(key))
            {
                IDataStoreFactory factory = null;
                if (factoryMap.TryGetValue(key, out factory) == true)
                {
                    result = factory.getRepository();
                }
            }
            else
            {
                Trace.Write("Unable data store factory key is null or empty");
            }
            return(result);
        }
示例#25
0
        // ReSharper disable once SuggestBaseTypeForParameter /* we don't want this because of DI */

        public OpenModUnturnedHost(
            IRuntime runtime,
            IServiceProvider serviceProvider,
            ILifetimeScope lifetimeScope,
            IDataStoreFactory dataStoreFactory,
            IConsoleActorAccessor consoleActorAccessor,
            ICommandExecutor commandExecutor,
            ILogger <OpenModUnturnedHost> logger,
            UnturnedCommandHandler unturnedCommandHandler)
        {
            m_ServiceProvider      = serviceProvider;
            m_ConsoleActorAccessor = consoleActorAccessor;
            m_CommandExecutor      = commandExecutor;
            m_Logger = logger;
            m_UnturnedCommandHandler = unturnedCommandHandler;
            WorkingDirectory         = runtime.WorkingDirectory;
            LifetimeScope            = lifetimeScope;
            DataStore = dataStoreFactory.CreateDataStore("openmod.unturned", WorkingDirectory);
            Version   = VersionHelper.ParseAssemblyVersion(GetType().Assembly);
        }
示例#26
0
        public StandaloneHost(
            IRuntime runtime,
            ILifetimeScope lifetimeScope,
            IDataStoreFactory dataStoreFactory,
            IConsoleActorAccessor consoleActorAccessor,
            ICommandExecutor commandExecutor)
        {
            m_ConsoleActorAccessor = consoleActorAccessor;
            m_CommandExecutor      = commandExecutor;
            Version          = VersionHelper.ParseAssemblyVersion(GetType().Assembly);
            WorkingDirectory = runtime.WorkingDirectory;
            LifetimeScope    = lifetimeScope;

            DataStore = dataStoreFactory.CreateDataStore(new DataStoreCreationParameters
            {
                ComponentId      = OpenModComponentId,
                Prefix           = "openmod.standalone",
                Suffix           = null,
                WorkingDirectory = WorkingDirectory
            });
        }
示例#27
0
 public CommandCooldownStore(
     IConfiguration configuration,
     IRuntime runtime,
     IDataStoreFactory dataStoreFactory,
     ILogger <CommandCooldownStore> logger,
     IPermissionRoleStore permissionRoleStore,
     IPermissionRolesDataStore permissionRolesDataStore,
     IPermissionChecker permissionChecker)
 {
     m_Configuration = configuration;
     m_DataStore     = dataStoreFactory.CreateDataStore(new DataStoreCreationParameters()
     {
         Prefix = "openmod", WorkingDirectory = runtime.WorkingDirectory, LogOnChange = false
     });
     m_Logger = logger;
     m_PermissionRoleStore      = permissionRoleStore;
     m_PermissionRolesDataStore = permissionRolesDataStore;
     m_PermissionChecker        = permissionChecker;
     m_Records = new Dictionary <string, List <CooldownRecord> >();
     m_LoadedPersistedRecords = false;
 }
 public TreePublishHandler(IRequiredPublishFieldsResolver requiredPublishFieldsResolver, 
     IPublisherOperationService publisherOpsService, 
     IDataStoreFactory dataStoreFactory, 
     IRepositoryFactory<IMediaRepository> mediaRepositoryFactory, 
     IRepositoryFactory<IItemIndexRepository> targetIndexRepositoryFactory, 
     IRepositoryFactory<IItemRepository> itemRepositoryFactory, 
     IRepositoryFactory<IItemRelationshipRepository> itemRelationshipRepoFactory, 
     IRepositoryFactory<IItemNodeRepository> itemNodeRepositoryFactory, 
     IRepositoryFactory<ITemplateGraphRepository> templateGraphRepositoryFactory, 
     IRepositoryFactory<IIndexableItemRepository> indexablePublishTargetRepositoryFactory, 
     IRepositoryFactory<IWorkflowStateRepository> workflowRepositoryFactory, 
     IRepositoryFactory<ITestableContentRepository> testableContentRepositoryFactory, 
     IRepositoryFactory<IManifestRepository> manifestRepositoryFactory,
     IRepositoryFactory<IPublishExclusionsRepository> publishExclusionsRepositoryFactory,
     IPromotionCoordinator promoterCoordinator, 
     IEventRegistry eventRegistry, 
     ILoggerFactory loggerFactory, 
     IApplicationLifetime applicationLifetime, 
     IConfiguration config)
     : this(requiredPublishFieldsResolver, publisherOpsService, dataStoreFactory, mediaRepositoryFactory, targetIndexRepositoryFactory, itemRepositoryFactory, itemRelationshipRepoFactory, itemNodeRepositoryFactory, templateGraphRepositoryFactory, indexablePublishTargetRepositoryFactory, workflowRepositoryFactory, testableContentRepositoryFactory, manifestRepositoryFactory, publishExclusionsRepositoryFactory, promoterCoordinator, eventRegistry, loggerFactory, applicationLifetime, SitecoreConfigurationExtensions.As<PublishJobHandlerOptions>(config))
 {
 }
 /// <summary>
 /// Creates a new instance of Incremental Publish Handler
 /// </summary>
 public IncrementalPublishHandler(IRequiredPublishFieldsResolver requiredPublishFieldsResolver,
     IPublisherOperationService publisherOpsService,
     IDataStoreFactory dataStoreFactory,
     IRepositoryFactory<IMediaRepository> mediaRepositoryFactory,
     IRepositoryFactory<IItemIndexRepository> targetIndexRepositoryFactory,
     IRepositoryFactory<IItemRepository> itemRepositoryFactory,
     IRepositoryFactory<IItemRelationshipRepository> itemRelationshipRepoFactory,
     IRepositoryFactory<IItemNodeRepository> itemNodeRepositoryFactory,
     IRepositoryFactory<ITemplateGraphRepository> templateGraphRepositoryFactory,
     IRepositoryFactory<IIndexableItemRepository> indexablePublishTargetRepositoryFactory,
     IRepositoryFactory<IWorkflowStateRepository> workflowRepositoryFactory,
     IRepositoryFactory<ITestableContentRepository> testableContentRepositoryFactory,
     IRepositoryFactory<IManifestRepository> manifestRepositoryFactory,
     IRepositoryFactory<IPublishExclusionsRepository> publishExclusionsRepositoryFactory,
     IPromotionCoordinator promoterCoordinator,
     IEventRegistry eventRegistry,
     ILoggerFactory loggerFactory,
     IApplicationLifetime applicationLifetime,
     PublishJobHandlerOptions options = null)
     : base(requiredPublishFieldsResolver, publisherOpsService, dataStoreFactory, mediaRepositoryFactory, targetIndexRepositoryFactory, itemRepositoryFactory, itemRelationshipRepoFactory, itemNodeRepositoryFactory, templateGraphRepositoryFactory, indexablePublishTargetRepositoryFactory, workflowRepositoryFactory, testableContentRepositoryFactory, manifestRepositoryFactory, publishExclusionsRepositoryFactory, promoterCoordinator, eventRegistry, loggerFactory, applicationLifetime, options ?? new PublishJobHandlerOptions())
 {
 }
 /// <summary>
 /// Creates a new instance of Incremental Publish Handler
 /// </summary>
 public IncrementalPublishHandler(IRequiredPublishFieldsResolver requiredPublishFieldsResolver,
                                  IPublisherOperationService publisherOpsService,
                                  IDataStoreFactory dataStoreFactory,
                                  IRepositoryFactory <IMediaRepository> mediaRepositoryFactory,
                                  IRepositoryFactory <IItemIndexRepository> targetIndexRepositoryFactory,
                                  IRepositoryFactory <IItemRepository> itemRepositoryFactory,
                                  IRepositoryFactory <IItemRelationshipRepository> itemRelationshipRepoFactory,
                                  IRepositoryFactory <IItemNodeRepository> itemNodeRepositoryFactory,
                                  IRepositoryFactory <ITemplateGraphRepository> templateGraphRepositoryFactory,
                                  IRepositoryFactory <IIndexableItemRepository> indexablePublishTargetRepositoryFactory,
                                  IRepositoryFactory <IWorkflowStateRepository> workflowRepositoryFactory,
                                  IRepositoryFactory <ITestableContentRepository> testableContentRepositoryFactory,
                                  IRepositoryFactory <IManifestRepository> manifestRepositoryFactory,
                                  IRepositoryFactory <IPublishExclusionsRepository> publishExclusionsRepositoryFactory,
                                  IPromotionCoordinator promoterCoordinator,
                                  IEventRegistry eventRegistry,
                                  ILoggerFactory loggerFactory,
                                  IApplicationLifetime applicationLifetime,
                                  IConfiguration config)
     : this(requiredPublishFieldsResolver, publisherOpsService, dataStoreFactory, mediaRepositoryFactory, targetIndexRepositoryFactory, itemRepositoryFactory, itemRelationshipRepoFactory, itemNodeRepositoryFactory, templateGraphRepositoryFactory, indexablePublishTargetRepositoryFactory, workflowRepositoryFactory, testableContentRepositoryFactory, manifestRepositoryFactory, publishExclusionsRepositoryFactory, promoterCoordinator, eventRegistry, loggerFactory, applicationLifetime, SitecoreConfigurationExtensions.As <PublishJobHandlerOptions>(config))
 {
 }
 public TreePublishHandler(IRequiredPublishFieldsResolver requiredPublishFieldsResolver,
                           IPublisherOperationService publisherOpsService,
                           IDataStoreFactory dataStoreFactory,
                           IRepositoryFactory <IMediaRepository> mediaRepositoryFactory,
                           IRepositoryFactory <IItemIndexRepository> targetIndexRepositoryFactory,
                           IRepositoryFactory <IItemRepository> itemRepositoryFactory,
                           IRepositoryFactory <IItemRelationshipRepository> itemRelationshipRepoFactory,
                           IRepositoryFactory <IItemNodeRepository> itemNodeRepositoryFactory,
                           IRepositoryFactory <ITemplateGraphRepository> templateGraphRepositoryFactory,
                           IRepositoryFactory <IIndexableItemRepository> indexablePublishTargetRepositoryFactory,
                           IRepositoryFactory <IWorkflowStateRepository> workflowRepositoryFactory,
                           IRepositoryFactory <ITestableContentRepository> testableContentRepositoryFactory,
                           IRepositoryFactory <IManifestRepository> manifestRepositoryFactory,
                           IRepositoryFactory <IPublishExclusionsRepository> publishExclusionsRepositoryFactory,
                           IPromotionCoordinator promoterCoordinator,
                           IEventRegistry eventRegistry,
                           ILoggerFactory loggerFactory,
                           IApplicationLifetime applicationLifetime,
                           PublishJobHandlerOptions options = null)
     : base(requiredPublishFieldsResolver, publisherOpsService, dataStoreFactory, mediaRepositoryFactory, targetIndexRepositoryFactory, itemRepositoryFactory, itemRelationshipRepoFactory, itemNodeRepositoryFactory, templateGraphRepositoryFactory, indexablePublishTargetRepositoryFactory, workflowRepositoryFactory, testableContentRepositoryFactory, manifestRepositoryFactory, publishExclusionsRepositoryFactory, promoterCoordinator, eventRegistry, loggerFactory, applicationLifetime, options ?? new PublishJobHandlerOptions())
 {
 }
示例#32
0
        public OpenModUnturnedHost(
            IRuntime runtime,
            IHostInformation hostInformation,
            IServiceProvider serviceProvider,
            ILifetimeScope lifetimeScope,
            IDataStoreFactory dataStoreFactory,
            IConsoleActorAccessor consoleActorAccessor,
            ILogger <OpenModUnturnedHost> logger,
            NuGetPackageManager nuGetPackageManager,
            Lazy <ICommandExecutor> commandExecutor,
            Lazy <UnturnedCommandHandler> unturnedCommandHandler)
        {
            m_Runtime              = runtime;
            m_HostInformation      = hostInformation;
            m_ServiceProvider      = serviceProvider;
            m_ConsoleActorAccessor = consoleActorAccessor;
            m_CommandExecutor      = commandExecutor;
            m_Logger = logger;
            m_NuGetPackageManager    = nuGetPackageManager;
            m_UnturnedCommandHandler = unturnedCommandHandler;
            WorkingDirectory         = runtime.WorkingDirectory;
            LifetimeScope            = lifetimeScope;

            DataStore = dataStoreFactory.CreateDataStore(new DataStoreCreationParameters
            {
                Component        = this,
                Prefix           = "openmod.unturned",
                Suffix           = null,
                WorkingDirectory = WorkingDirectory
            });

            m_Capabilities = new HashSet <string>(StringComparer.OrdinalIgnoreCase)
            {
                KnownGameCapabilities.Health,
                KnownGameCapabilities.Inventory,
                KnownGameCapabilities.Vehicles
            };
        }
示例#33
0
 public ResourceBusiness(IDataStoreFactory dataStoreFactory)
 {
     _dataStoreFactory = dataStoreFactory;
 }
 public DataStoreHandler(IDataStoreFactory dataStoreFactory)
 {
     _dataStoreFactory = dataStoreFactory;
 }