Example #1
0
 public AccountsController(
     IUserRepository repo,
     UserManager <SensateUser> userManager,
     IEmailSender emailer,
     IOptions <UserAccountSettings> options,
     IPasswordResetTokenRepository tokens,
     IChangeEmailTokenRepository emailTokens,
     IChangePhoneNumberTokenRepository phoneTokens,
     IUserTokenRepository tokenRepository,
     ITextSendService text,
     IUserService userService,
     ICommandPublisher publisher,
     IOptions <TextServiceSettings> text_opts,
     IWebHostEnvironment env,
     IHttpContextAccessor ctx,
     ILogger <AccountsController> logger
     ) : base(repo, ctx)
 {
     this.m_userService  = userService;
     this._logger        = logger;
     this._manager       = userManager;
     this._mailer        = emailer;
     this._passwd_tokens = tokens;
     this._email_tokens  = emailTokens;
     this._env           = env;
     this._tokens        = tokenRepository;
     this._phonetokens   = phoneTokens;
     this._settings      = options.Value;
     this._text          = text;
     this.m_publisher    = publisher;
     this._text_settings = text_opts.Value;
 }
Example #2
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.");
        }