示例#1
0
        public ShareAuditService(
            IScopeExpansionService scopeExpansionService,
            IDnsUtilitiesService dnsUtilitiesService,
            IPortScanService portScanService,
            ISmbUtilitiesService smbUtilitiesService,
            IFileSystemOperationService fileSystemOperationService)
        {
            _scopeExpansionService      = scopeExpansionService ?? throw new ArgumentNullException(nameof(scopeExpansionService));
            _dnsUtilitiesService        = dnsUtilitiesService ?? throw new ArgumentNullException(nameof(dnsUtilitiesService));
            _portScanService            = portScanService ?? throw new ArgumentNullException(nameof(portScanService));
            _smbUtilitiesService        = smbUtilitiesService ?? throw new ArgumentNullException(nameof(smbUtilitiesService));
            _fileSystemOperationService = fileSystemOperationService ?? throw new ArgumentNullException(nameof(fileSystemOperationService));

            _backgroundWorker = new BackgroundWorker
            {
                WorkerSupportsCancellation = true
            };

            _backgroundWorker.DoWork             += DoWork;
            _backgroundWorker.RunWorkerCompleted += RunWorkerCompleted;
        }
示例#2
0
 public ScopeExpansionService(
     IDnsUtilitiesService dnsUtilitiesService)
 {
     _dnsUtilitiesService = dnsUtilitiesService ?? throw new ArgumentNullException(nameof(dnsUtilitiesService));
 }