Пример #1
0
        internal SpooferCore(IWorkerController controller, SpooferSettings settings) : base(controller, "SpooferCore")
        {
            Settings = settings;

            AddSpoofer(UDP137Socket, new NBNSSpoofer(Controller, Settings, UDP137Socket), Settings.NBNS);
            AddSpoofer(UDP5355Socket, new LLMNRSpoofer(Controller, Settings, UDP5355Socket), Settings.LLMNR);
        }
Пример #2
0
        public ScheduleViewModel(
            IModelMapper <ScheduleSubject, ScheduleSubjectItemModel> scheduleItemsMapper,
            IModelMapper <WeekDayCore, WeekDayModel> weekDaysMapper,
            IModelMapper <DayOfWeek, WeekDayModel> dayOfWeekMapper,
            IScheduleRepository scheduleRepository,
            IWorkerController workerManager,
            IDisplayService displayService)
        {
            _scheduleItemsMapper = scheduleItemsMapper ?? throw new ArgumentNullException(nameof(scheduleItemsMapper));
            _scheduleRepository  = scheduleRepository ?? throw new ArgumentNullException(nameof(scheduleRepository));
            _dayOfWeekMapper     = dayOfWeekMapper ?? throw new ArgumentNullException(nameof(dayOfWeekMapper));
            _weekDaysMapper      = weekDaysMapper ?? throw new ArgumentNullException(nameof(weekDaysMapper));
            _workerController    = workerManager ?? throw new ArgumentNullException(nameof(workerManager));
            _displayService      = displayService ?? throw new ArgumentNullException(nameof(displayService));

            ScheduleItems = new ObservableCollection <ScheduleSubjectItemModel>();

            _selectedWeekDay           = WeekDayModel.Undefined;
            WeekDaySelectCommand       = new RelayCommand(o => WeekDaySelect((WeekDayModel)o));
            ScheduleItemClickedCommand = new RelayCommand(o =>
            {
                if ((ScheduleSubjectItemModel)o != null)
                {
                    var selectedScheduleItem = (ScheduleSubjectItemModel)o;
                    _displayService.ShowDialog <RegistrationWindowViewModel, ScheduleSubjectModel, object>(selectedScheduleItem.Item);
                }
            });
        }
Пример #3
0
 public TargetHub(
     IWorkerController workerController,
     IDataStore dataStore,
     IHubActions <Target> targetHubActions)
 {
     WorkerController = workerController;
     DataStore        = dataStore;
     TargetHubActions = targetHubActions;
 }
Пример #4
0
 public UserHub(
     IWorkerController workerController,
     IDataStore dataStore,
     IHubActions <User> userHubActions)
 {
     WorkerController = workerController;
     DataStore        = dataStore;
     UserHubActions   = userHubActions;
 }
Пример #5
0
 public LogHub(
     IWorkerController workerController,
     IDataStore dataStore,
     IHubActions <LogEntry> userHubActions)
 {
     WorkerController = workerController;
     DataStore        = dataStore;
     LogHubActions    = userHubActions;
 }
Пример #6
0
 // ReSharper disable once NotNullMemberIsNotInitialized
 /// <inheritdoc />
 public BedUDPController([NotNull] IWorkerController workerController)
 {
     _workerController   = workerController ?? throw new ArgumentNullException(nameof(workerController));
     IsConnected         = false;
     _lastExceptions     = new ConcurrentQueue <Exception>();
     _semaphoreSlim      = new SemaphoreSlim(1, 1);
     _bedInitStepDelay   = TimeSpan.FromMilliseconds(100);
     _initialisingStatus = DeviceIsNotInitialising;
 }
Пример #7
0
 public ApartmentsMonitorWorker(
     IApartmentsProvider apartmentsProvider,
     IWorkerController workerController,
     ApartmentService apartmentService,
     MonitoringServiceOptions options,
     ILogger logger)
 {
     _apartmentsProvider = apartmentsProvider ?? throw new ArgumentNullException(nameof(apartmentsProvider));
     _workerController   = workerController ?? throw new ArgumentNullException(nameof(workerController));
     _apartmentService   = apartmentService ?? throw new ArgumentNullException(nameof(apartmentService));
     _options            = options ?? throw new ArgumentNullException(nameof(options));
     _logger             = logger ?? throw new ArgumentNullException(nameof(logger));
 }
Пример #8
0
 public CycleProcessingSynchronizer(
     [NotNull] BroadcastBlock <CycleProcessingContext> pipelineStartBlock,
     [NotNull] IWorkerController workerController,
     bool isAutoPumpingEnabled,
     short pumpingNumberOfAttempts)
 {
     _isAutoPumpingEnabled = isAutoPumpingEnabled;
     _workerController     = workerController ?? throw new ArgumentNullException(nameof(workerController));
     _pipelineStartBlock   = pipelineStartBlock ?? throw new ArgumentNullException(nameof(pipelineStartBlock));
     IsPaused                 = false;
     _isProcessing            = false;
     _processingPeriod        = null;
     _pumpingNumberOfAttempts = pumpingNumberOfAttempts;
 }
Пример #9
0
        public ProxyWorker(
            ISettingsService <CashlogSettings> cashlogSettingsService,
            IWorkerController workerController,
            IProxyProvider proxyProvider,
            ILogger logger,
            IProxyConsumer[] proxyConsumers)
        {
            _cashlogSettingsService = cashlogSettingsService ?? throw new ArgumentNullException(nameof(cashlogSettingsService));
            _proxyProvider          = proxyProvider ?? throw new ArgumentNullException(nameof(proxyProvider));
            _logger              = logger ?? throw new ArgumentNullException(nameof(logger));
            _proxyConsumers      = proxyConsumers ?? throw new ArgumentNullException(nameof(proxyConsumers));
            _cachedProxies       = new Queue <WebProxy>();
            _lastWorkingWebProxy = null;

            _worker = workerController.CreateWorker(() => RevalidateProxy().GetAwaiter().GetResult(), _proxyRevalidateInterval, true);
        }
Пример #10
0
        // ReSharper disable once NotNullMemberIsNotInitialized
        public MitarMonitorController([NotNull] IWorkerController workerController)
        {
            _workerController = workerController ?? throw new ArgumentNullException(nameof(workerController));

            IsConnected = false;

            _isCommonParamsRequested   = 0;
            _isPressureParamsRequested = 0;
            _isEcgParamsRequested      = 0;

            _commonParamsReady       = new Nito.AsyncEx.AsyncManualResetEvent(false);
            _pressureParamsReady     = new Nito.AsyncEx.AsyncManualResetEvent(false);
            _ecgParamsReady          = new Nito.AsyncEx.AsyncManualResetEvent(false);
            _pumpingReady            = new Nito.AsyncEx.AsyncManualResetEvent(false);
            _pumpingStatus           = PumpingStatus.Completed;
            _updateDataSyncSemaphore = new SemaphoreSlim(1, 1);


            _ecgValues      = new ConcurrentQueue <short>();
            _lastExceptions = new ConcurrentQueue <Exception>();
        }
Пример #11
0
 public NBNSSpoofer(IWorkerController controller, SpooferSettings settings, Models.SocketType socketType)
     : base(controller, settings, socketType)
 {
 }
Пример #12
0
 public HTTPServer(IWorkerController controller, int port) : base(controller, "HTTPServer")
 {
     this.Initialize(port);
 }
Пример #13
0
 public FakeBedController(IWorkerController workerController)
 {
     _workerController = workerController;
     _elapsedTime      = TimeSpan.Zero;
     _magicDelay       = TimeSpan.FromMilliseconds(300);
 }
Пример #14
0
 protected BaseModule(IWorkerController controller, string name)
 {
     Controller = controller;
     Name       = name;
 }
Пример #15
0
 public SMBServer(IWorkerController controller) : base(controller, "SMBServer")
 {
 }
Пример #16
0
        public Worker(IWorkerController controller)
        {
            Controller = controller;

            RegisterModules();
        }
Пример #17
0
 internal BaseSpoofer(IWorkerController controller, SpooferSettings settings, Models.SocketType socketType)
 {
     Settings   = settings;
     SocketType = socketType;
     Controller = controller;
 }
Пример #18
0
 public FormMain(IEnumerable <IPlugin> pluginList, IWorkerController worker, ApplicationConfiguration applicationConfiguration)
 {
     InitializeComponent();
     this.pluginList = pluginList;
     Presenter       = new MainViewPresenter(this, worker, applicationConfiguration);
 }
Пример #19
0
 internal MainViewPresenter(IMainView view, IWorkerController wc, ApplicationConfiguration applicationConfiguration)
 {
     View   = view;
     worker = wc;
     this.applicationConfiguration = applicationConfiguration;
 }
Пример #20
0
 public LsassDumpTool(IWorkerController controller) : base(controller, "LsassDumpTool")
 {
 }