public SnapshotLayoutFileCompiler([NotNull] IFactory factory, [NotNull] ITraceService trace, [NotNull] IFileSystem fileSystem, [NotNull] ISnapshotService snapshotService, [NotNull] IPathMapperService pathMapper) : base(factory)
 {
     Trace           = trace;
     FileSystem      = fileSystem;
     SnapshotService = snapshotService;
     PathMapper      = pathMapper;
 }
Exemplo n.º 2
0
 public BookController(IServiceProvider services, IBookService books, ISnapshotService snapshots, IVoteService votes)
 {
     _services  = services;
     _books     = books;
     _snapshots = snapshots;
     _votes     = votes;
 }
Exemplo n.º 3
0
 public UserService(IServiceProvider services, IOptionsMonitor <UserServiceOptions> options, IElasticClient client, ISnapshotService snapshots)
 {
     _services  = services;
     _options   = options;
     _client    = client;
     _snapshots = snapshots;
 }
Exemplo n.º 4
0
 public EventRepository(IAggregateRootFactory factory, IEventBus eventBus, IEventStore eventStore, ISnapshotService snapshotService)
 {
     _factory         = factory;
     _eventBus        = eventBus;
     _eventStore      = eventStore;
     _snapshotService = snapshotService;
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="sources">Sources to filter</param>
 /// <param name="snapshot"></param>
 /// <param name="emitFilter">Emit filter</param>
 /// <param name="prevJournalData">Journal-data of previous fileset</param>
 public UsnJournalService(IEnumerable <string> sources, ISnapshotService snapshot, IFilter emitFilter,
                          IEnumerable <USNJournalDataEntry> prevJournalData)
 {
     m_sources        = sources;
     m_snapshot       = snapshot;
     m_volumeDataDict = Initialize(emitFilter, prevJournalData);
 }
 public SnapshotsController(
     ISnapshotService snapshotService,
     ICollectorService collectorService)
 {
     _snapshotService  = snapshotService;
     _collectorService = collectorService;
 }
Exemplo n.º 7
0
 public ArchitectureCheckers([NotNull] IConfiguration configuration, [NotNull] IFactory factory, [NotNull] IFileSystem fileSystem, [NotNull] ISnapshotService snapshotService, [NotNull] IPathMapperService pathMapper)
 {
     Configuration   = configuration;
     Factory         = factory;
     FileSystem      = fileSystem;
     SnapshotService = snapshotService;
     PathMapper      = pathMapper;
 }
 public DataSynchronizerWorker(ISettingsService settingsService, IMinerService minerService, ISnapshotService snapshotService, IServerService serverService, ILogger <DataSynchronizerWorker> logger)
 {
     _settingsService = settingsService;
     _minerService    = minerService;
     _snapshotService = snapshotService;
     _serverService   = serverService;
     _logger          = logger;
 }
Exemplo n.º 9
0
 /// <summary>
 /// Extension method for ISnapshotService which determines whether the given path is a symlink.
 /// </summary>
 /// <param name="snapshot">ISnapshotService implementation</param>
 /// <param name="path">File or folder path</param>
 /// <param name="attributes">File attributes</param>
 /// <returns>Whether the path is a symlink</returns>
 public static bool IsSymlink(this ISnapshotService snapshot, string path, FileAttributes attributes)
 {
     // Not all reparse points are symlinks.
     // For example, on Windows 10 Fall Creator's Update, the OneDrive folder (and all subfolders)
     // are reparse points, which allows the folder to hook into the OneDrive service and download things on-demand.
     // If we can't find a symlink target for the current path, we won't treat it as a symlink.
     return((attributes & FileAttributes.ReparsePoint) == FileAttributes.ReparsePoint && !string.IsNullOrEmpty(snapshot.GetSymlinkTarget(path)));
 }
Exemplo n.º 10
0
 public EventReposiotryUnitTests()
 {
     _aggregateRootFactory = Substitute.For <IAggregateRootFactory>();
     _eventBus             = Substitute.For <IEventBus>();
     _eventStore           = Substitute.For <IEventStore>();
     _snapshotService      = Substitute.For <ISnapshotService>();
     _eventRepository      = new EventRepository(_aggregateRootFactory, _eventBus, _eventStore, _snapshotService);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="sources">Sources to filter</param>
 /// <param name="snapshot"></param>
 /// <param name="emitFilter">Emit filter</param>
 /// <param name="fileAttributeFilter"></param>
 /// <param name="skipFilesLargerThan"></param>
 /// <param name="prevJournalData">Journal-data of previous fileset</param>
 /// <param name="token"></param>
 public UsnJournalService(IEnumerable <string> sources, ISnapshotService snapshot, IFilter emitFilter, FileAttributes fileAttributeFilter,
                          long skipFilesLargerThan, IEnumerable <USNJournalDataEntry> prevJournalData, CancellationToken token)
 {
     m_sources        = sources;
     m_snapshot       = snapshot;
     m_volumeDataDict = Initialize(emitFilter, fileAttributeFilter, skipFilesLargerThan, prevJournalData);
     m_token          = token;
 }
Exemplo n.º 12
0
 public ServiceController(
     IOvernightMarginParameterContainer overnightMarginParameterContainer,
     IIdentityGenerator identityGenerator,
     ISnapshotService snapshotService)
 {
     _overnightMarginParameterContainer = overnightMarginParameterContainer;
     _identityGenerator = identityGenerator;
     _snapshotService   = snapshotService;
 }
Exemplo n.º 13
0
 public ParseService([NotNull] IConfiguration configuration, [NotNull] ITraceService trace, [NotNull] IFactory factory, [NotNull] ISnapshotService snapshotService, [NotNull] IPathMapperService pathMapper, [ImportMany, NotNull, ItemNotNull] IEnumerable <IParser> parsers)
 {
     Configuration   = configuration;
     Trace           = trace;
     Factory         = factory;
     SnapshotService = snapshotService;
     PathMapper      = pathMapper;
     Parsers         = parsers;
 }
        public SnapshotsController(ISnapshotService snapshotService, INotifier notifier, IClock clock, IContentExportService contentExportService)
        {
            _snapshotService      = snapshotService;
            _notifier             = notifier;
            _clock                = clock;
            _contentExportService = contentExportService;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Exemplo n.º 15
0
 public DiscordOAuthHandler(IUserService users, IElasticClient client, IHttpClientFactory http, ISnapshotService snapshots, IOptionsMonitor <DiscordOAuthOptions> options, IResourceLocker locker, ILinkGenerator link)
 {
     _users     = users;
     _client    = client;
     _snapshots = snapshots;
     _http      = http.CreateClient(nameof(DiscordOAuthHandler));
     _options   = options;
     _locker    = locker;
     _link      = link;
 }
        public SnapshotsController(ISnapshotService snapshotService, INotifier notifier, IClock clock, IContentExportService contentExportService)
        {
            _snapshotService = snapshotService;
            _notifier = notifier;
            _clock = clock;
            _contentExportService = contentExportService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Exemplo n.º 17
0
 public AzureStorage(IDictionary <string, string> jobArgsDictionary)
 {
     Source = CloudStorageAccount.Parse(JobConfigurationManager.GetArgument(jobArgsDictionary, JobArgumentNames.SourceStorage));
     SourceContainerName  = JobConfigurationManager.TryGetArgument(jobArgsDictionary, JobArgumentNames.SourceContainerName) ?? DefaultSourceContainerName;
     SourceContainer      = Source.CreateCloudBlobClient().GetContainerReference(SourceContainerName);
     Backups              = CloudStorageAccount.Parse(JobConfigurationManager.GetArgument(jobArgsDictionary, JobArgumentNames.BackupStorage));
     BackupsContainerName = JobConfigurationManager.TryGetArgument(jobArgsDictionary, JobArgumentNames.BackupContainerName) ?? DefaultBackupContainerName;
     BackupsContainer     = Backups.CreateCloudBlobClient().GetContainerReference(BackupsContainerName);
     SnapshotService      = new AzureSnapshotService();
 }
Exemplo n.º 18
0
 public DataCollectorWorker(
     IMinerService minerService,
     ISnapshotService snapshotService,
     IRemoteManagementClientFactory clientFactory,
     ILogger <DataCollectorWorker> logger)
 {
     _minerService    = minerService;
     _snapshotService = snapshotService;
     _clientFactory   = clientFactory;
     _logger          = logger;
 }
Exemplo n.º 19
0
 public MaintenanceWorker(
     ISettingsService settingsService,
     ISnapshotService snapshotService,
     IAlertService alertService,
     ILogger <MaintenanceWorker> logger)
 {
     _settingsService = settingsService;
     _snapshotService = snapshotService;
     _alertService    = alertService;
     _logger          = logger;
 }
Exemplo n.º 20
0
        public SnapshotsController(ISnapshotService snapshotService, INotifier notifier, IClock clock, IContentExportService contentExportService, ShellSettings shellSettings, IAuthorizer authorizer)
        {
            _snapshotService      = snapshotService;
            _notifier             = notifier;
            _clock                = clock;
            _contentExportService = contentExportService;
            _shellSettings        = shellSettings;
            _authorizer           = authorizer;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
Exemplo n.º 21
0
 public ContentExportController(
     IMembershipService membershipService,
     IAuthenticationService authenticationService,
     IAuthorizer authorizer,
     ISnapshotService snapshotService,
     ShellSettings shellSettings)
 {
     _membershipService     = membershipService;
     _authenticationService = authenticationService;
     _authorizer            = authorizer;
     _snapshotService       = snapshotService;
     _shellSettings         = shellSettings;
 }
Exemplo n.º 22
0
 public PricesController(
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     ISnapshotService snapshotService,
     ILog log,
     IDraftSnapshotKeeper draftSnapshotKeeper)
 {
     _quoteCacheService  = quoteCacheService;
     _fxRateCacheService = fxRateCacheService;
     _snapshotService    = snapshotService;
     _log = log;
     _draftSnapshotKeeper = draftSnapshotKeeper;
 }
Exemplo n.º 23
0
 public ReportController(ISnapshotService snapshotService, IScenarioExecutionService executionService)
 {
     if (snapshotService == null)
     {
         throw new ArgumentException("snapshotService");
     }
     if (executionService == null)
     {
         throw new ArgumentException("executionService");
     }
     this.snapshotService = snapshotService;
     this.executionService = executionService;
 }
Exemplo n.º 24
0
 public ReportController(ISnapshotService snapshotService, IScenarioExecutionService executionService)
 {
     if (snapshotService == null)
     {
         throw new ArgumentException("snapshotService");
     }
     if (executionService == null)
     {
         throw new ArgumentException("executionService");
     }
     this.snapshotService  = snapshotService;
     this.executionService = executionService;
 }
Exemplo n.º 25
0
 public AlertScanWorker(
     IAlertDefinitionService alertDefinitionService,
     IAlertService alertService,
     ISnapshotService snapshotService,
     IMinerService minerService,
     IScanFactory scanFactory,
     ILogger <AlertScanWorker> logger)
 {
     _alertDefinitionService = alertDefinitionService;
     _alertService           = alertService;
     _snapshotService        = snapshotService;
     _minerService           = minerService;
     _scanFactory            = scanFactory;
     _logger = logger;
 }
Exemplo n.º 26
0
        public TakeSnapshotTaskHandler(ISnapshotService snapshotService,
                                       IScheduledTaskManager scheduledTaskManager,
                                       IClock clock,
                                       IOrchardServices orchardServices,
                                       IMembershipService membershipService,
                                       IAuthenticationService authenticationService)
        {
            _snapshotService      = snapshotService;
            _scheduledTaskManager = scheduledTaskManager;
            _clock                 = clock;
            _orchardServices       = orchardServices;
            _membershipService     = membershipService;
            _authenticationService = authenticationService;

            Logger = NullLogger.Instance;
        }
Exemplo n.º 27
0
 public CollectorService(
     UserManager <MiningMonitorUser> userManager,
     ILoginService loginService,
     IMinerService minerService,
     ISnapshotService snapshotService,
     IMapper <MiningMonitorUser, Collector> collectorMapper,
     IUpdateMapper <Collector, MiningMonitorUser> userMapper,
     IMapper <IdentityResult, ModelStateDictionary> resultMapper)
 {
     _userManager     = userManager;
     _loginService    = loginService;
     _minerService    = minerService;
     _snapshotService = snapshotService;
     _collectorMapper = collectorMapper;
     _userMapper      = userMapper;
     _resultMapper    = resultMapper;
 }
Exemplo n.º 28
0
        public BaseHub(
            IMapper mapper,
            ILogger <BaseHub> logger,
            IConfiguration configuration,
            IGroupService groupService,
            ISnapshotService snapshotService,
            IAccountService accountService
            )
        {
            _logger         = logger;
            _mapper         = mapper;
            _instanceName   = configuration.GetSection("Settings")["InstanceName"];
            _loggerPassword = configuration.GetSection("Logger")["Password"];

            _snapshotService = snapshotService;
            _accountService  = accountService;
            _groupService    = groupService;
        }
Exemplo n.º 29
0
        /// <summary>
        /// Create instance of USN journal service
        /// </summary>
        /// <param name="sources"></param>
        /// <param name="snapshot"></param>
        /// <param name="filter"></param>
        /// <param name="lastfilesetid"></param>
        /// <returns></returns>
        private UsnJournalService GetJournalService(IEnumerable <string> sources, ISnapshotService snapshot, IFilter filter, long lastfilesetid)
        {
            if (m_options.UsnStrategy == Options.OptimizationStrategy.Off)
            {
                return(null);
            }

            var journalData = m_database.GetChangeJournalData(lastfilesetid);
            var service     = new UsnJournalService(sources, snapshot, filter, m_options.FileAttributeFilter, m_options.SkipFilesLargerThan,
                                                    journalData, cancellationTokenSource.Token);

            foreach (var volumeData in service.VolumeDataList)
            {
                if (volumeData.IsFullScan)
                {
                    if (volumeData.Exception == null || volumeData.Exception is UsnJournalSoftFailureException)
                    {
                        // soft fail
                        Logging.Log.WriteInformationMessage(LOGTAG, "SkipUsnForVolume",
                                                            "Performing full scan for volume \"{0}\": {1}", volumeData.Volume, volumeData.Exception?.Message);
                    }
                    else
                    {
                        if (m_options.UsnStrategy == Options.OptimizationStrategy.Auto)
                        {
                            Logging.Log.WriteInformationMessage(LOGTAG, "FailedToUseChangeJournal",
                                                                "Failed to use change journal for volume \"{0}\": {1}", volumeData.Volume, volumeData.Exception.Message);
                        }
                        else if (m_options.UsnStrategy == Options.OptimizationStrategy.On)
                        {
                            Logging.Log.WriteWarningMessage(LOGTAG, "FailedToUseChangeJournal", volumeData.Exception,
                                                            "Failed to use change journal for volume \"{0}\": {1}", volumeData.Volume, volumeData.Exception.Message);
                        }
                        else
                        {
                            throw volumeData.Exception;
                        }
                    }
                }
            }

            return(service);
        }
Exemplo n.º 30
0
        public SnapshottingDatabaseResetter(IResetsDatabase baseResetter,
                                            SnapshotStore snapshotStore,
                                            ISnapshotService snapshotService)
        {
            if (snapshotService == null)
            {
                throw new ArgumentNullException(nameof(snapshotService));
            }
            if (snapshotStore == null)
            {
                throw new ArgumentNullException(nameof(snapshotStore));
            }
            if (baseResetter == null)
            {
                throw new ArgumentNullException(nameof(baseResetter));
            }

            this.snapshotService = snapshotService;
            this.snapshotStore   = snapshotStore;
            this.baseResetter    = baseResetter;
        }
Exemplo n.º 31
0
 public TextSnapshot([NotNull] ISnapshotService snapshotService)
 {
     SnapshotService = snapshotService;
 }
Exemplo n.º 32
0
 public RestController(IScenarioExecutionService executionService, ISnapshotService snapshotService)
 {
     this.snapshotService = snapshotService;
     this.executionService = executionService;
 }
 public SnapshotClient(MyNoSqlReadRepository <SnapshotNoSqlEntity> snapshotReader, ISnapshotService snapshotGrpcService)
 {
     _snapshotReader      = snapshotReader;
     _snapshotGrpcService = snapshotGrpcService;
 }