コード例 #1
0
 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;
 }
コード例 #2
0
 public BookController(IServiceProvider services, IBookService books, ISnapshotService snapshots, IVoteService votes)
 {
     _services  = services;
     _books     = books;
     _snapshots = snapshots;
     _votes     = votes;
 }
コード例 #3
0
ファイル: UserService.cs プロジェクト: t6tg/nhitomi
 public UserService(IServiceProvider services, IOptionsMonitor <UserServiceOptions> options, IElasticClient client, ISnapshotService snapshots)
 {
     _services  = services;
     _options   = options;
     _client    = client;
     _snapshots = snapshots;
 }
コード例 #4
0
 public EventRepository(IAggregateRootFactory factory, IEventBus eventBus, IEventStore eventStore, ISnapshotService snapshotService)
 {
     _factory         = factory;
     _eventBus        = eventBus;
     _eventStore      = eventStore;
     _snapshotService = snapshotService;
 }
コード例 #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);
 }
コード例 #6
0
 public SnapshotsController(
     ISnapshotService snapshotService,
     ICollectorService collectorService)
 {
     _snapshotService  = snapshotService;
     _collectorService = collectorService;
 }
コード例 #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;
 }
コード例 #8
0
 public DataSynchronizerWorker(ISettingsService settingsService, IMinerService minerService, ISnapshotService snapshotService, IServerService serverService, ILogger <DataSynchronizerWorker> logger)
 {
     _settingsService = settingsService;
     _minerService    = minerService;
     _snapshotService = snapshotService;
     _serverService   = serverService;
     _logger          = logger;
 }
コード例 #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)));
 }
コード例 #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);
 }
コード例 #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;
 }
コード例 #12
0
 public ServiceController(
     IOvernightMarginParameterContainer overnightMarginParameterContainer,
     IIdentityGenerator identityGenerator,
     ISnapshotService snapshotService)
 {
     _overnightMarginParameterContainer = overnightMarginParameterContainer;
     _identityGenerator = identityGenerator;
     _snapshotService   = snapshotService;
 }
コード例 #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;
 }
コード例 #14
0
        public SnapshotsController(ISnapshotService snapshotService, INotifier notifier, IClock clock, IContentExportService contentExportService)
        {
            _snapshotService      = snapshotService;
            _notifier             = notifier;
            _clock                = clock;
            _contentExportService = contentExportService;

            T      = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
コード例 #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;
 }
コード例 #16
0
        public SnapshotsController(ISnapshotService snapshotService, INotifier notifier, IClock clock, IContentExportService contentExportService)
        {
            _snapshotService = snapshotService;
            _notifier = notifier;
            _clock = clock;
            _contentExportService = contentExportService;

            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;
        }
コード例 #17
0
ファイル: AzureStorage.cs プロジェクト: Yustos/NuGet.Jobs
 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();
 }
コード例 #18
0
 public DataCollectorWorker(
     IMinerService minerService,
     ISnapshotService snapshotService,
     IRemoteManagementClientFactory clientFactory,
     ILogger <DataCollectorWorker> logger)
 {
     _minerService    = minerService;
     _snapshotService = snapshotService;
     _clientFactory   = clientFactory;
     _logger          = logger;
 }
コード例 #19
0
 public MaintenanceWorker(
     ISettingsService settingsService,
     ISnapshotService snapshotService,
     IAlertService alertService,
     ILogger <MaintenanceWorker> logger)
 {
     _settingsService = settingsService;
     _snapshotService = snapshotService;
     _alertService    = alertService;
     _logger          = logger;
 }
コード例 #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;
        }
コード例 #21
0
 public ContentExportController(
     IMembershipService membershipService,
     IAuthenticationService authenticationService,
     IAuthorizer authorizer,
     ISnapshotService snapshotService,
     ShellSettings shellSettings)
 {
     _membershipService     = membershipService;
     _authenticationService = authenticationService;
     _authorizer            = authorizer;
     _snapshotService       = snapshotService;
     _shellSettings         = shellSettings;
 }
コード例 #22
0
ファイル: PricesController.cs プロジェクト: LykkeBusiness/MT
 public PricesController(
     IQuoteCacheService quoteCacheService,
     IFxRateCacheService fxRateCacheService,
     ISnapshotService snapshotService,
     ILog log,
     IDraftSnapshotKeeper draftSnapshotKeeper)
 {
     _quoteCacheService  = quoteCacheService;
     _fxRateCacheService = fxRateCacheService;
     _snapshotService    = snapshotService;
     _log = log;
     _draftSnapshotKeeper = draftSnapshotKeeper;
 }
コード例 #23
0
ファイル: ReportController.cs プロジェクト: bevacqua/Swarm
 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;
 }
コード例 #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;
 }
コード例 #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;
 }
コード例 #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;
        }
コード例 #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;
 }
コード例 #28
0
ファイル: BaseHub.cs プロジェクト: Traf27/exilence-next
        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;
        }
コード例 #29
0
ファイル: BackupHandler.cs プロジェクト: yoshi88mx/duplicati
        /// <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);
        }
コード例 #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;
        }
コード例 #31
0
 public TextSnapshot([NotNull] ISnapshotService snapshotService)
 {
     SnapshotService = snapshotService;
 }
コード例 #32
0
ファイル: RestController.cs プロジェクト: bevacqua/Swarm
 public RestController(IScenarioExecutionService executionService, ISnapshotService snapshotService)
 {
     this.snapshotService = snapshotService;
     this.executionService = executionService;
 }
コード例 #33
0
 public SnapshotClient(MyNoSqlReadRepository <SnapshotNoSqlEntity> snapshotReader, ISnapshotService snapshotGrpcService)
 {
     _snapshotReader      = snapshotReader;
     _snapshotGrpcService = snapshotGrpcService;
 }