コード例 #1
0
 public AccountsController(
     GlobalSettings globalSettings,
     ICipherRepository cipherRepository,
     IFolderRepository folderRepository,
     IOrganizationService organizationService,
     IOrganizationUserRepository organizationUserRepository,
     IProviderUserRepository providerUserRepository,
     IPaymentService paymentService,
     IUserRepository userRepository,
     IUserService userService,
     ISendRepository sendRepository,
     ISendService sendService)
 {
     _cipherRepository           = cipherRepository;
     _folderRepository           = folderRepository;
     _globalSettings             = globalSettings;
     _organizationService        = organizationService;
     _organizationUserRepository = organizationUserRepository;
     _providerUserRepository     = providerUserRepository;
     _paymentService             = paymentService;
     _userRepository             = userRepository;
     _userService    = userService;
     _sendRepository = sendRepository;
     _sendService    = sendService;
 }
コード例 #2
0
        private const long _fileSizeLeeway = 1024L * 1024L; // 1MB

        public SendService(
            ISendRepository sendRepository,
            IUserRepository userRepository,
            IUserService userService,
            IOrganizationRepository organizationRepository,
            ISendFileStorageService sendFileStorageService,
            IPasswordHasher <User> passwordHasher,
            IPushNotificationService pushService,
            IReferenceEventService referenceEventService,
            GlobalSettings globalSettings,
            IPolicyRepository policyRepository,
            ICurrentContext currentContext)
        {
            _sendRepository         = sendRepository;
            _userRepository         = userRepository;
            _userService            = userService;
            _policyRepository       = policyRepository;
            _organizationRepository = organizationRepository;
            _sendFileStorageService = sendFileStorageService;
            _passwordHasher         = passwordHasher;
            _pushService            = pushService;
            _referenceEventService  = referenceEventService;
            _globalSettings         = globalSettings;
            _currentContext         = currentContext;
        }
コード例 #3
0
 public AccountsControllerTests()
 {
     _userService                = Substitute.For <IUserService>();
     _userRepository             = Substitute.For <IUserRepository>();
     _cipherRepository           = Substitute.For <ICipherRepository>();
     _folderRepository           = Substitute.For <IFolderRepository>();
     _organizationService        = Substitute.For <IOrganizationService>();
     _organizationUserRepository = Substitute.For <IOrganizationUserRepository>();
     _providerUserRepository     = Substitute.For <IProviderUserRepository>();
     _paymentService             = Substitute.For <IPaymentService>();
     _globalSettings             = new GlobalSettings();
     _sendRepository             = Substitute.For <ISendRepository>();
     _sendService                = Substitute.For <ISendService>();
     _sut = new AccountsController(
         _globalSettings,
         _cipherRepository,
         _folderRepository,
         _organizationService,
         _organizationUserRepository,
         _providerUserRepository,
         _paymentService,
         _userRepository,
         _userService,
         _sendRepository,
         _sendService
         );
 }
コード例 #4
0
        public UserServiceTests()
        {
            _userRepository             = Substitute.For <IUserRepository>();
            _cipherRepository           = Substitute.For <ICipherRepository>();
            _organizationUserRepository = Substitute.For <IOrganizationUserRepository>();
            _organizationRepository     = Substitute.For <IOrganizationRepository>();
            _mailService             = Substitute.For <IMailService>();
            _pushService             = Substitute.For <IPushNotificationService>();
            _userStore               = Substitute.For <IUserStore <User> >();
            _optionsAccessor         = Substitute.For <IOptions <IdentityOptions> >();
            _passwordHasher          = Substitute.For <IPasswordHasher <User> >();
            _userValidators          = new List <IUserValidator <User> >();
            _passwordValidators      = new List <IPasswordValidator <User> >();
            _keyNormalizer           = Substitute.For <ILookupNormalizer>();
            _errors                  = new IdentityErrorDescriber();
            _services                = Substitute.For <IServiceProvider>();
            _logger                  = Substitute.For <ILogger <UserManager <User> > >();
            _licenseService          = Substitute.For <ILicensingService>();
            _eventService            = Substitute.For <IEventService>();
            _applicationCacheService = Substitute.For <IApplicationCacheService>();
            _dataProtectionProvider  = Substitute.For <IDataProtectionProvider>();
            _paymentService          = Substitute.For <IPaymentService>();
            _policyRepository        = Substitute.For <IPolicyRepository>();
            _referenceEventService   = Substitute.For <IReferenceEventService>();
            _fido2               = Substitute.For <IFido2>();
            _currentContext      = new CurrentContext(null);
            _globalSettings      = new GlobalSettings();
            _organizationService = Substitute.For <IOrganizationService>();
            _sendRepository      = Substitute.For <ISendRepository>();

            _sut = new UserService(
                _userRepository,
                _cipherRepository,
                _organizationUserRepository,
                _organizationRepository,
                _mailService,
                _pushService,
                _userStore,
                _optionsAccessor,
                _passwordHasher,
                _userValidators,
                _passwordValidators,
                _keyNormalizer,
                _errors,
                _services,
                _logger,
                _licenseService,
                _eventService,
                _applicationCacheService,
                _dataProtectionProvider,
                _paymentService,
                _policyRepository,
                _referenceEventService,
                _fido2,
                _currentContext,
                _globalSettings,
                _organizationService,
                _sendRepository
                );
        }
コード例 #5
0
        public MainPage()
        {
            this.InitializeComponent();

            _flowStreamer = new RabbitMqStreamer <WaterFlow>("amqp://[email protected]", "kitchen");
            Count         = 0;
            SetupGpio();
        }
コード例 #6
0
 public DeleteSendsJob(
     ISendRepository sendRepository,
     IServiceProvider serviceProvider,
     ILogger <DatabaseExpiredGrantsJob> logger)
     : base(logger)
 {
     _sendRepository  = sendRepository;
     _serviceProvider = serviceProvider;
 }
コード例 #7
0
 public SendsController(
     ISendRepository sendRepository,
     IUserService userService,
     ISendService sendService,
     GlobalSettings globalSettings)
 {
     _sendRepository = sendRepository;
     _userService    = userService;
     _sendService    = sendService;
     _globalSettings = globalSettings;
 }
コード例 #8
0
        public MainPage()
        {
            InitializeComponent();
            Bytes   = new List <byte>();
            Devices = new ObservableCollection <string>();

            ConnectToSerialPort();
            _waxSendRepository    = new RabbitMqStreamer <Wax3Data>("amqp://[email protected]", "kitchen");
            MQConnected.IsChecked = true;

            DevicesConnected.ItemsSource = Devices;
        }
コード例 #9
0
 public SendsController(
     ISendRepository sendRepository,
     IUserService userService,
     ISendService sendService,
     ISendFileStorageService sendFileStorageService,
     ILogger <SendsController> logger,
     GlobalSettings globalSettings)
 {
     _sendRepository         = sendRepository;
     _userService            = userService;
     _sendService            = sendService;
     _sendFileStorageService = sendFileStorageService;
     _logger         = logger;
     _globalSettings = globalSettings;
 }
コード例 #10
0
 public SendService(
     ISendRepository sendRepository,
     IUserRepository userRepository,
     IUserService userService,
     IOrganizationRepository organizationRepository,
     ISendFileStorageService sendFileStorageService,
     IPasswordHasher <User> passwordHasher,
     GlobalSettings globalSettings)
 {
     _sendRepository         = sendRepository;
     _userRepository         = userRepository;
     _userService            = userService;
     _organizationRepository = organizationRepository;
     _sendFileStorageService = sendFileStorageService;
     _passwordHasher         = passwordHasher;
     _globalSettings         = globalSettings;
 }
コード例 #11
0
        public MainPage()
        {
            this.InitializeComponent();

            _scalesStreamer = new RabbitMqStreamer <ScalesData>("amqp://[email protected]", "kitchen");

            ScalesWatcher = new BluetoothLEAdvertisementWatcher {
                ScanningMode = BluetoothLEScanningMode.Active
            };
            ScalesWatcher.Received += ScaleFound;

            ScalesDeviceWatcher          = DeviceInformation.CreateWatcher();
            ScalesDeviceWatcher.Added   += ScaleAdded;
            ScalesDeviceWatcher.Updated += ScaleUpdated;

            StartScanning();
        }
コード例 #12
0
        public SendsControllerTests()
        {
            _userService            = Substitute.For <IUserService>();
            _sendRepository         = Substitute.For <ISendRepository>();
            _sendService            = Substitute.For <ISendService>();
            _sendFileStorageService = Substitute.For <ISendFileStorageService>();
            _globalSettings         = new GlobalSettings();
            _logger = Substitute.For <ILogger <SendsController> >();

            _sut = new SendsController(
                _sendRepository,
                _userService,
                _sendService,
                _sendFileStorageService,
                _logger,
                _globalSettings
                );
        }
コード例 #13
0
 public SyncController(
     IUserService userService,
     IFolderRepository folderRepository,
     ICipherRepository cipherRepository,
     ICollectionRepository collectionRepository,
     ICollectionCipherRepository collectionCipherRepository,
     IOrganizationUserRepository organizationUserRepository,
     IPolicyRepository policyRepository,
     ISendRepository sendRepository,
     GlobalSettings globalSettings)
 {
     _userService                = userService;
     _folderRepository           = folderRepository;
     _cipherRepository           = cipherRepository;
     _collectionRepository       = collectionRepository;
     _collectionCipherRepository = collectionCipherRepository;
     _organizationUserRepository = organizationUserRepository;
     _policyRepository           = policyRepository;
     _sendRepository             = sendRepository;
     _globalSettings             = globalSettings;
 }
コード例 #14
0
        public MainPage()
        {
            this.InitializeComponent();

            _wax9Streamer = new RabbitMqStreamer <Wax9Data>("amqp://[email protected]", "kitchen");

            ConnectedDevices = new ObservableCollection <string>();

            ConnectedDevicesView.ItemsSource = ConnectedDevices;

            Watcher = new BluetoothLEAdvertisementWatcher {
                ScanningMode = BluetoothLEScanningMode.Active
            };
            Watcher.Received += DeviceFound;

            DeviceWatcher          = DeviceInformation.CreateWatcher();
            DeviceWatcher.Added   += DeviceAdded;
            DeviceWatcher.Updated += DeviceUpdated;

            StartScanning();
        }
コード例 #15
0
 public StreamManager(IRecieveRepository <T> recieveRepository, ISendRepository <S> sendRepository, IRecogniser <T, S> recogniser)
 {
     _recieveRepository = recieveRepository;
     _sendRepository    = sendRepository;
     _recogniser        = recogniser;
 }
コード例 #16
0
 public Rfid()
 {
     _rfidSendRepository = new RabbitMqStreamer <RfidData>("amqp://[email protected]", "kitchen");
     Devices             = new Dictionary <int, FedmIscReader>();
 }