コード例 #1
0
 public DeviceService(IQueueConnectionFactory queueConnectionFactory, IDataRead dataread, DomotiqueContext context, ILogger <DeviceService> logger)
 {
     _queueConnectionFactory = queueConnectionFactory;
     _dataread = dataread;
     _context  = context;
     _logger   = logger;
 }
コード例 #2
0
 public TemperatureReadingService(IDataRead dataRead, IQueueConnectionFactory queueConnectionFactory, IDBContextProvider provider, ILogger <TemperatureReadingService> logger, IHubContext <NotificationHub> context)
 {
     _dataRead = dataRead;
     _provider = provider;
     _queueConnectionFactory = queueConnectionFactory;
     _logger          = logger;
     _notificationHub = context;
 }
コード例 #3
0
 public EFUnitOfWork(DbContextOptions <EFDataContext> options, IDataRead reader)
 {
     this.ReadContext = reader;
     if (reader is EFDataContext)
     {
         dbcontext = (EFDataContext)reader;
     }
     else
     {
         dbcontext = new EFDataContext(options);
     }
 }
        void Run()
        {
            // MSAccess
            _dataSourcePath = @"C:\Users\Sören\Downloads\drive-download-20190707T124853Z-001\CarDatabase.accdb";

            // SQLite
            //_dataSourcePath   = @"C:\0Daten\CarDatabase.db";

            try
            {
                // CarData Layer
                _dataRead = SFactoryIDataRead.CreateInstance(EDataType.Access, _dataSourcePath);
                _dataRead.InitDb();
                _dataWrite = SFactoryIDataWrite.CreateInstance(EDataType.Access, _dataSourcePath);
                _dataWrite.InitDb();

                // CarLogic Layer
                _logicQueries  = SFactoryILogicQueries.CreateInstance(_dataRead);
                _logicCommands = SFactoryILogicCommands.CreateInstance(_dataWrite);

                // CarPresentation Layer
                _dialog = SFactoryIDialog.CreateInstance(_logicQueries, _logicCommands);

                // Start the App
                _app = new Application();
                _app.Run(_dialog as Window);
            }
            catch (ApplicationException e)
            {
                MessageBox.Show(e.Message, "Fehler in der Anwendung", MessageBoxButton.OK, MessageBoxImage.Stop);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.Message, "Fehler in der Anwendung", MessageBoxButton.OK, MessageBoxImage.Stop);
            }
            finally
            {
                if (_dataRead != null)
                {
                    _dataRead.CloseDb();
                }
                if (_dataWrite != null)
                {
                    _dataWrite.CloseDb();
                }
            }
        }
コード例 #5
0
        /// Stream input data from a reader. Calculate the incremental interquartile
        /// mean of the data set.
        /// Can throw Exception on convert to int32.
        static void StreamIQMData(IDataRead reader, IDataWrite writer)
        {
            DataSet data = new DataSet();

            String line;

            while ((line = reader.Read()) != null)
            {
                data.AddPoint(Convert.ToInt32(line));
                if (data.Count < 4)
                {
                    continue;
                }

                double mean   = data.GetIQMean();
                String output = String.Format("Index => {0}, Mean => {1:F2}", data.Count, mean);
                writer.Write(output);
            }
        }
コード例 #6
0
 public EventoRepository(IDataRead reader, IDataWrite writer) : base(reader, writer)
 {
 }
コード例 #7
0
ファイル: Base.cs プロジェクト: allanserrav/bolao_social
 public Base(IDataRead reader, IDataWrite writer)
 {
     Reader = reader;
     Writer = writer;
 }
コード例 #8
0
 public ParticipanteRepository(IDataRead reader, IDataWrite writer) : base(reader, writer)
 {
 }
コード例 #9
0
 protected ParticipanteController(IDataRead reader, IDataWrite writer)
 {
     Db = new ParticipanteRepository(reader, writer);
 }
コード例 #10
0
ファイル: LogService.cs プロジェクト: LaurentKubler/Domotique
 public LogService(IDataRead dataRead, IDBContextProvider provider, ILogger <LogService> logger)
 {
     _dataRead = dataRead;
     _provider = provider;
     _logger   = logger;
 }
コード例 #11
0
 public DeviceStatusReadingService(IQueueConnectionFactory queueConnectionFactory, ILogService logService, IDataRead dataRead, IDBContextProvider contextProvider, ILogger <DeviceStatusReadingService> logger, IHubContext <NotificationHub> context)
 {
     _queueConnectionFactory = queueConnectionFactory;
     _logService             = logService;
     _logger          = logger;
     _contextProvider = contextProvider;
     _contextt        = context;
 }
コード例 #12
0
 public TempHistoryController(IDataRead dataRead, DomotiqueContext context)
 {
     _dataRead = dataRead;
     _context  = context;
 }
コード例 #13
0
 public CompeticaoRepository(IDataRead reader, IDataWrite writer) : base(reader, writer)
 {
 }
コード例 #14
0
 public StatusController(IDataRead dataRead, DomotiqueContext context, ILogger <StatusController> logger)
 {
     _dataRead = dataRead;
     _context  = context;
     _logger   = logger;
 }