コード例 #1
0
        public TriggerActionExecutionService(
            IHttpClientFactory factory,
            IRouterClient router,
            IControlMessageRepository controlMessages,
            ITextSendService text,
            IEmailSender mail,
            ITriggerRepository triggers,
            IOptions <TextServiceSettings> textOptions
            )
        {
            this.m_triggerRepo    = triggers;
            this.m_text           = text;
            this.m_mail           = mail;
            this.m_textSettings   = textOptions.Value;
            this.m_httpFactory    = factory;
            this.m_controlMessges = controlMessages;
            this.m_router         = router;

            this.m_actuatorCounter = Metrics.CreateCounter("triggerservice_actuator_total", "Total number of actuator messages sent.");
            this.m_smsCounter      = Metrics.CreateCounter("triggerservice_sms_total", "Total number of SMS messages sent.");
            this.m_emailCounter    = Metrics.CreateCounter("triggerservice_email_total", "Total number of email messages sent.");
            this.m_httpCounter     = Metrics.CreateCounter("triggerservice_http_total", "Total number of HTTP requests sent.");
        }
コード例 #2
0
 public SensorService(
     ISensorRepository sensors,
     ISensorLinkRepository links,
     IMeasurementRepository measurements,
     ITriggerAdministrationRepository triggers,
     IControlMessageRepository control,
     IMessageRepository messages,
     IApiKeyRepository keys,
     IBlobService blobService,
     IBlobRepository blobs,
     ICommandPublisher mqtt
     )
 {
     this.m_commandPublisher = mqtt;
     this.m_links            = links;
     this.m_sensors          = sensors;
     this.m_control          = control;
     this.m_apiKeys          = keys;
     this.m_measurements     = measurements;
     this.m_triggers         = triggers;
     this.m_messages         = messages;
     this.m_blobService      = blobService;
     this.m_blobs            = blobs;
 }