protected BaseMessageHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) { ActionHelper = actionHelper; TenantInfoRetriever = tenantInfoRetriever; ConfigHelper = configHelper; TransactionValidator = transactionValidator; }
public void ExecuteRequest(IMiddlerContext middlerContext, IActionHelper actionHelper) { var rewriteTo = actionHelper.BuildPathFromRoutData(Parameters.RewriteTo); var isAbsolute = Uri.IsWellFormedUriString(rewriteTo, UriKind.Absolute); if (isAbsolute) { middlerContext.Request.Uri = new Uri(rewriteTo); } else { var builder = new UriBuilder(middlerContext.Request.Uri); builder.Query = null; if (rewriteTo.Contains("?")) { builder.Path = rewriteTo.Split("?")[0]; builder.Query = rewriteTo.Split("?")[1]; } else { builder.Path = rewriteTo; } middlerContext.Request.Uri = builder.Uri; } //middlerContext.ForwardBody(); //var nUrl = new UriBuilder(Parameters.RewriteTo); //builder.Path = Parameters.RewriteTo; }
public EmailService(ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache, IEnumerable <IEmailProvider> emailProviders, IActionHelper actionHelper) { _sessionHelper = sessionHelper; _distributedCache = distributedCache; _emailProvider = emailProviders.First(); _actionHelper = actionHelper; }
public InstallServiceViewModel(IDialogHelper dialogHelper, IActionHelper actionHelper) { _actionHelper = actionHelper; _dialogHelper = dialogHelper; _cancelCommand = new DelegateCommand(CancelExecuted); _installCommand = new DelegateCommand(InstallExecuted, InstallCanExecute); }
public DynamicLookupPageTransformFactory(IActionHelper actionHelper, IEnumerable <ILookupProvider> lookupProviders, IWebHostEnvironment environment) { _actionHelper = actionHelper; _lookupProviders = lookupProviders; _environment = environment; }
/// <summary> /// Initializes a new instance of the <see cref="ActionSubjectTemplate"/> class. /// </summary> /// <param name="template"> /// The template. /// </param> /// <param name="actionHelper"> /// The action helper. /// </param> public ActionSubjectTemplate(LocalizableString template, IActionHelper actionHelper) { if (actionHelper == null) throw new ArgumentNullException("actionHelper"); _actionHelper = actionHelper; _template = template; }
public override async Task Process(IActionHelper actionHelper, IEmailProvider emailProvider, FormAnswers formAnswers) { var message = new EmailMessage( this.Properties.Subject, this.Properties.Content, this.Properties.From, actionHelper.GetEmailToAddresses(this, formAnswers)); await emailProvider.SendEmail(message); }
public ContactViewModel(IActionHelper actionHelper, IContactLogic contactLogic, ISettingLogic settingLogic, IMvxNavigationService navigationService) { _contactLogic = contactLogic; _navigationService = navigationService; _settingLogic = settingLogic; _actionHelper = actionHelper; SaveContactCommand = new MvxAsyncCommand(() => _actionHelper.DoAction(SaveContact)); NumberPrefixes = NumberPrefixProvider.GetNumberPrefixes(); }
public TemplatedEmailService( IEnumerable <ITemplatedEmailProvider> templatedEmailProviders, IActionHelper actionHelper, ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache) { _templatedEmailProviders = templatedEmailProviders; _actionHelper = actionHelper; _sessionHelper = sessionHelper; _distributedCache = distributedCache; }
public override Task ProcessTemplatedEmail(IActionHelper actionHelper, ITemplatedEmailProvider templatedEmailProvider, Dictionary <string, dynamic> personalisation, FormAnswers formAnswers) { var emailAddressList = actionHelper.GetEmailToAddresses(this, formAnswers).Split(',').ToList(); foreach (var emailAddress in emailAddressList) { templatedEmailProvider .SendEmailAsync(emailAddress, Properties.TemplateId, personalisation); } return(null); }
public BarrierViewModel(IBarrierLogic barrierLogic, ISettingLogic settingLogic, IActionHelper actionHelper, IMvxNavigationService navigationService, IMvxMessenger messenger) { _barrierLogic = barrierLogic; _settingLogic = settingLogic; _actionHelper = actionHelper; _navigationService = navigationService; _messenger = messenger; SaveBarrierCommand = new MvxAsyncCommand(() => _actionHelper.DoAction(SaveBarrier)); LoadBarrierCommand = new MvxAsyncCommand(() => _actionHelper.DoAction(LoadBarrier)); NumberPrefixes = NumberPrefixProvider.GetNumberPrefixes(); }
public SettingsViewModel(ISettingLogic settingLogic, IActionHelper actionHelper, IMvxNavigationService navigationService, IMvxMessenger messenger) { _settingLogic = settingLogic; _actionHelper = actionHelper; _navigationService = navigationService; _messenger = messenger; LoadSettingsCommand = new MvxAsyncCommand(() => _actionHelper.DoAction(LoadSettings)); SaveSettingsCommand = new MvxAsyncCommand(() => _actionHelper.DoAction(SaveSettings)); NumberPrefixes = NumberPrefixProvider.GetNumberPrefixes(); }
/// <summary> /// Initializes a new instance of the <see cref="ActionMessageTemplate"/> class. /// </summary> /// <param name="template"> /// The template. /// </param> /// <param name="actionHelper"> /// The action helper. /// </param> /// <param name="deepLinkHelper"> /// The deep link helper. /// </param> public ActionMessageTemplate(LocalizableString template, IActionHelper actionHelper, IDeepLinkHelper deepLinkHelper) { if (actionHelper == null) throw new ArgumentNullException("actionHelper"); if (deepLinkHelper == null) throw new ArgumentNullException("deepLinkHelper"); _actionHelper = actionHelper; _deepLinkHelper = deepLinkHelper; _template = template; }
internal MainWindowViewModel( IActionHelper actionHelper, ITimeService timeService, INotificationReporter reporter, IProjectRunnerFactory runnerFactory) { _actionHelper = actionHelper; _reporter = reporter ?? new NotificationReporter(timeService); _reporter.ExpirationTime = TimeSpan.FromSeconds(1); _runnerFactory = runnerFactory ?? new ProjectRunnerFactory(timeService, _reporter, new PHmiModelContextFactory(), new NpgHelper()); _closeCommand = new DelegateCommand(CloseCommandExecuted, CloseCommandCanExecute); }
public RetrieveExternalDataService( IGateway gateway, ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache, IMappingService mappingService, IActionHelper actionHelper, IWebHostEnvironment environment) { _gateway = gateway; _sessionHelper = sessionHelper; _distributedCache = distributedCache; _mappingService = mappingService; _actionHelper = actionHelper; _environment = environment; }
public void ExecuteRequest(IMiddlerContext middlerContext, IActionHelper actionHelper) { var uri = new Uri(actionHelper.BuildPathFromRoutData(Parameters.RedirectTo)); if (Parameters.PreserveMethod) { middlerContext.Response.StatusCode = Parameters.Permanent ? StatusCodes.Status308PermanentRedirect : StatusCodes.Status307TemporaryRedirect; } else { middlerContext.Response.StatusCode = Parameters.Permanent ? StatusCodes.Status301MovedPermanently : StatusCodes.Status302Found; } middlerContext.Response.Headers["Location"] = uri.AbsoluteUri; }
protected override void EstablishContext() { base.EstablishContext(); ActionHelper = new ActionHelperStub(); TimeService = new Mock <ITimeService>(); NotificationReporter = new Mock <INotificationReporter>(); RunnerFactory = new Mock <IProjectRunnerFactory>(); Runner = new Mock <IProjectRunner>(); RunnerFactory.Setup(f => f.Create(Database, ConnectionString)).Returns(Runner.Object); Window = new Mock <IWindow>(); ViewModel = new MainWindowViewModel( ActionHelper, TimeService.Object, NotificationReporter.Object, RunnerFactory.Object) { View = Window.Object }; }
protected override void EstablishContext() { base.EstablishContext(); ActionHelper = new ActionHelperStub(); TimeService = new Mock<ITimeService>(); NotificationReporter = new Mock<INotificationReporter>(); RunnerFactory = new Mock<IProjectRunnerFactory>(); Runner = new Mock<IProjectRunner>(); RunnerFactory.Setup(f => f.Create(Database, ConnectionString)).Returns(Runner.Object); Window = new Mock<IWindow>(); ViewModel = new MainWindowViewModel( ActionHelper, TimeService.Object, NotificationReporter.Object, RunnerFactory.Object) { View = Window.Object }; }
public BuildClientViewModel( IModelContextFactory contextFactory, IDialogHelper dialogHelper, IActionHelper actionHelper, ICodeWriterFactory codeWriterFactory, IResourceBuilderFactory resourceBuilderFactory) { _contextFactory = contextFactory; _dialogHelper = dialogHelper; _actionHelper = actionHelper; _codeWriterFactory = codeWriterFactory; _resourceBuilderFactory = resourceBuilderFactory; _buildCommand = new DelegateCommand(BuildExecuted, BuildCanExecute); _cancelCommand = new DelegateCommand(CancelExecuted); _chooseFolderCommand = new DelegateCommand(ChooseFolderExecuted, ChooseFolderCanExecute); LoadFolder(); }
public GenerateTestsMessageHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) : base(actionHelper, tenantInfoRetriever, configHelper, transactionValidator) { }
public ArtifactsPublishedMessageHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) : base(actionHelper, tenantInfoRetriever, configHelper, transactionValidator) { }
public virtual async Task Process(IActionHelper actionHelper, IEmailProvider emailProvider, FormAnswers formAnswers) { throw new System.NotImplementedException(); }
public virtual Task ProcessTemplatedEmail(IActionHelper actionHelper, ITemplatedEmailProvider templatedEmailProvider, Dictionary <string, dynamic> personalisation, FormAnswers formAnswers) { throw new System.NotImplementedException(); }
public ActionMessageTemplateFactory(IActionHelper actionHelper, IDeepLinkHelper deepLinkHelper) { if (actionHelper == null) throw new ArgumentNullException("actionHelper"); if (deepLinkHelper == null) throw new ArgumentNullException("deepLinkHelper"); _actionHelper = actionHelper; _deepLinkHelper = deepLinkHelper; }
public ReportCleanUpProcessor(ILogger logger, IActionHelper actionHelper) { _logger = logger; _actionHelper = actionHelper; }
public WorkflowsChangedMessageHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) : base(actionHelper, tenantInfoRetriever, configHelper, transactionValidator) { }
public NotificationMessageHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) : base(actionHelper, tenantInfoRetriever, configHelper, transactionValidator) { }
public WebhooksHandler(IActionHelper actionHelper, ITenantInfoRetriever tenantInfoRetriever, IConfigHelper configHelper, ITransactionValidator transactionValidator) : base(actionHelper, tenantInfoRetriever, configHelper, transactionValidator) { }