public OrganisationService(IDistributedCacheWrapper distributedCache, IEnumerable <IOrganisationProvider> organisationProviders, IPageHelper pageHelper, IPageFactory pageFactory) { _distributedCache = distributedCache; _pageHelper = pageHelper; _organisationProviders = organisationProviders; _pageFactory = pageFactory; }
int pageSize = 8;//每页显示多少条数据 /// <summary> /// 依赖注入 /// </summary> /// <param name="approve"></param> /// <param name="policeCase"></param> /// <param name="pageHelper"></param> public ApproveController(IApprove approve, IPoliceCase policeCase, IPageHelper pageHelper, IHostingEnvironment hostingEnvironment) { _approve = approve; _policeCase = policeCase; _pageHelper = pageHelper; _hostingEnvironment = hostingEnvironment; }
/// <summary> /// Transfers the new page information over. /// </summary> /// <param name="helper">The <see cref="PageHelper"/> to use.</param> /// <param name="newData">The new data to transfer.</param> public static void Refresh(this IPageHelper helper, IPageHelper newData) { helper.PageSize = newData.PageSize; helper.PageItems = newData.PageItems; helper.Page = newData.Page; helper.TotalItemCount = newData.TotalItemCount; }
public BufferStream(Stream outputStream, HttpContextBase context, IPageHelper pageHelper) { this.outputStream = outputStream; this.context = context; this.pageHelper = pageHelper; buffer = new MemoryStream(); }
public SuccessPageFactory(IPageHelper pageHelper, IPageFactory pageFactory, ISessionHelper sessionHelper, IDistributedCacheWrapper distributedCache) { _pageHelper = pageHelper; _pageFactory = pageFactory; _sessionHelper = sessionHelper; _distributedCache = distributedCache; }
public BookingController(IBookingService bookingService, ISchemaFactory schemaFactory, IPageHelper pageHelper, ISessionHelper sessionHelper) { _bookingService = bookingService; _schemaFactory = schemaFactory; _pageHelper = pageHelper; _sessionHelper = sessionHelper; }
public BookingService( IDistributedCacheWrapper distributedCache, IPageHelper pageHelper, IEnumerable <IBookingProvider> bookingProviders, IPageFactory pageFactory, IMappingService mappingService, IWebHostEnvironment environment, ISchemaFactory schemaFactory, ISessionHelper sessionHelper, IHashUtil hashUtil, IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration, IHttpContextAccessor httpContextAccessor) { _distributedCache = distributedCache; _pageHelper = pageHelper; _bookingProviders = bookingProviders; _pageFactory = pageFactory; _mappingService = mappingService; _environment = environment; _schemaFactory = schemaFactory; _sessionHelper = sessionHelper; _hashUtil = hashUtil; _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value; _httpContextAccessor = httpContextAccessor; }
public async Task ValidateFormSchema(IPageHelper pageHelper, string form, string path) { if (path != FirstPageSlug) { return; } pageHelper.HasDuplicateQuestionIDs(Pages, form); pageHelper.CheckForEmptyBehaviourSlugs(Pages, form); pageHelper.CheckForInvalidQuestionOrTargetMappingValue(Pages, form); pageHelper.CheckForCurrentEnvironmentSubmitSlugs(Pages, form); pageHelper.CheckSubmitSlugsHaveAllProperties(Pages, form); await pageHelper.CheckForPaymentConfiguration(Pages, form); pageHelper.CheckForAcceptedFileUploadFileTypes(Pages, form); pageHelper.CheckConditionalElementsAreValid(Pages, form); pageHelper.CheckForDocumentDownload(this); pageHelper.CheckForIncomingFormDataValues(Pages); pageHelper.CheckForPageActions(this); pageHelper.CheckRenderConditionsValid(Pages); pageHelper.CheckAddressNoManualTextIsSet(Pages); pageHelper.CheckForAnyConditionType(Pages); pageHelper.CheckUploadedFilesSummaryQuestionsIsSet(Pages); pageHelper.CheckForBookingElement(Pages); pageHelper.CheckQuestionIdExistsForBookingCustomerAddressId(Pages, form); pageHelper.CheckDateValidations(Pages); pageHelper.CheckAbsoluteDateValidations(Pages); }
/// <summary> /// 依赖注入 /// </summary> /// <param name="policeCase"></param> /// <param name="hostingEnvironment"></param> /// <param name="approve"></param> /// <param name="pageHelper"></param> public InstanceController(IPoliceCase policeCase, IHostingEnvironment hostingEnvironment, IApprove approve, IPageHelper pageHelper) { _policeCase = policeCase; _hostingEnvironment = hostingEnvironment; _approve = approve; _pageHelper = pageHelper; }
public FormController(IGdsValidation gdsValidate, ISessionService sessionService, IOptions <ApplicationSettings> config, ILogger <FormController> logger, IPageHelper pageHelper) { _gdsValidate = gdsValidate; _sessionService = sessionService; _config = config; _pageHelper = pageHelper; }
public FileUploadService(IDistributedCacheWrapper distributedCache, IPageFactory pageFactory, IPageHelper pageHelper) { _distributedCache = distributedCache; _pageFactory = pageFactory; _pageHelper = pageHelper; }
public SearchController(ISearchService searchService, ISessionService sessionService, IOptions <ApplicationSettings> config, IGdsValidation gdsValidate, IPageHelper pageHelper, IConfiguration configuration) { _searchService = searchService; _sessionService = sessionService; _config = config; _gdsValidate = gdsValidate; _pageHelper = pageHelper; _configuration = configuration; }
public PageFactory( IPageHelper pageHelper, IEnumerable <ITagParser> tagParsers, IDistributedCacheWrapper distributedCache) { _pageHelper = pageHelper; _tagParsers = tagParsers; _distributedCache = distributedCache; }
public CheckYourAnswersController(IServiceProvider service) { _logger = service?.GetRequiredService <ILogger <CheckYourAnswersController> >() as ILogger; _sessionService = service?.GetRequiredService <ISessionService>() ?? null; _submissionService = service.GetRequiredService <ISubmissionService>(); _configuration = service?.GetRequiredService <IConfiguration>(); _notificationService = service.GetRequiredService <INotificationService>(); _documentService = service.GetRequiredService <IDocumentService>(); _pageHelper = service.GetRequiredService <IPageHelper>(); }
public SubmitService( IGateway gateway, IPageHelper pageHelper, IWebHostEnvironment environment, IOptions <SubmissionServiceConfiguration> submissionServiceConfiguration) { _gateway = gateway; _pageHelper = pageHelper; _environment = environment; _submissionServiceConfiguration = submissionServiceConfiguration.Value; }
public AddressService( IDistributedCacheWrapper distributedCache, IPageHelper pageHelper, IEnumerable <IAddressProvider> addressProviders, IPageFactory pageFactory) { _distributedCache = distributedCache; _pageHelper = pageHelper; _addressProviders = addressProviders; _pageFactory = pageFactory; }
public StreetService( IDistributedCacheWrapper distributedCache, IEnumerable <IStreetProvider> streetProviders, IPageHelper pageHelper, IPageFactory pageFactory) { _distributedCache = distributedCache; _pageHelper = pageHelper; _streetProviders = streetProviders; _pageFactory = pageFactory; }
public FileUploadService(IDistributedCacheWrapper distributedCache, IEnumerable <IFileStorageProvider> fileStorageProviders, IPageFactory pageFactory, IPageHelper pageHelper, IConfiguration configuration) { _distributedCache = distributedCache; _fileStorageProviders = fileStorageProviders; _pageFactory = pageFactory; _pageHelper = pageHelper; _configuration = configuration; }
public SummaryViewModel(IPageHelper p) : base(p) { TopicIndex = 0; if (RevisionCards != null) //Checks if revision cards is completely empty { DisplayText = RevisionCards[0].Question; } else { DisplayText = "Create some revision cards!"; } SetCommands(); }
public CheckYourAnswersController(ILogger <CheckYourAnswersController> logger, ISubmissionService submissionService, ICosmosService cosmosService, INotificationService notificationService, IDocumentService documentService, ISessionService sessionService, IPageHelper pageHelper, IConfiguration configuration) { _logger = logger; _submissionService = submissionService; _cosmosService = cosmosService; _notificationService = notificationService; _documentService = documentService; _sessionService = sessionService; _pageHelper = pageHelper; _configuration = configuration; }
public BookingService( IDistributedCacheWrapper distributedCache, IPageHelper pageHelper, IEnumerable <IBookingProvider> bookingProviders, IPageFactory pageFactory, IMappingService mappingService, IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration) { _distributedCache = distributedCache; _pageHelper = pageHelper; _bookingProviders = bookingProviders; _pageFactory = pageFactory; _mappingService = mappingService; _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value; }
public PageService( IEnumerable <IElementValidator> validators, IPageHelper pageHelper, ISessionHelper sessionHelper, IAddressService addressService, IFileUploadService fileUploadService, IStreetService streetService, IOrganisationService organisationService, IDistributedCacheWrapper distributedCache, IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration, IWebHostEnvironment environment, ISuccessPageFactory successPageFactory, IPageFactory pageFactory, IBookingService bookingService, ISchemaFactory schemaFactory, IIncomingDataHelper incomingDataHelper, IActionsWorkflow actionsWorkflow, IAddAnotherService addAnotherService, IFormAvailabilityService formAvailabilityService, ILogger <IPageService> logger, IEnumerable <IFileStorageProvider> fileStorageProviders, IConfiguration configuration) { _validators = validators; _pageHelper = pageHelper; _sessionHelper = sessionHelper; _streetService = streetService; _addressService = addressService; _bookingService = bookingService; _organisationService = organisationService; _fileUploadService = fileUploadService; _distributedCache = distributedCache; _schemaFactory = schemaFactory; _successPageContentFactory = successPageFactory; _pageContentFactory = pageFactory; _environment = environment; _formAvailabilityService = formAvailabilityService; _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value; _incomingDataHelper = incomingDataHelper; _actionsWorkflow = actionsWorkflow; _logger = logger; _addAnotherService = addAnotherService; _fileStorageProviders = fileStorageProviders; _configuration = configuration; }
public PayService( IEnumerable <IPaymentProvider> paymentProviders, ILogger <PayService> logger, IGateway gateway, ISessionHelper sessionHelper, IMappingService mappingService, IWebHostEnvironment hostingEnvironment, IPageHelper pageHelper, IPaymentConfigurationTransformDataProvider paymentConfigProvider) { _gateway = gateway; _logger = logger; _paymentProviders = paymentProviders; _sessionHelper = sessionHelper; _mappingService = mappingService; _hostingEnvironment = hostingEnvironment; _pageHelper = pageHelper; _paymentConfigProvider = paymentConfigProvider; }
//Constructor public ManageViewModel(IPageHelper p) : base(p) { CancelCommand = new Command(() => SelectedTopic = null); DeleteCommand = new Command(() => { try { model.DeleteTopic(SelectedTopic.TopicName); SelectedTopic = null; //Reset Selection } catch (Exception ex) { p.MessagePopup("Error occurred", ex.Message); } }); ViewCardsCommand = new Command(() => TopicCardsModifyPage(SelectedTopic)); }
public Page GetPage(IPageHelper pageHelper, string path) { try { var pages = Pages.Where(_ => _.PageSlug.ToLower().Trim() == path.ToLower().Trim()).OrderByDescending(_ => _.RenderConditions.Count).ToList(); if (pages.Count == 1) { return(pages.First()); } var page = pageHelper.GetPageWithMatchingRenderConditions(pages); return(page); } catch (Exception ex) { throw new ApplicationException($"Requested path '{path}' object could not be found or was not unique.", ex); } }
public PayService( IEnumerable <IPaymentProvider> paymentProviders, ILogger <PayService> logger, IGateway gateway, ICache cache, IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration, ISessionHelper sessionHelper, IMappingService mappingService, IWebHostEnvironment hostingEnvironment, IPageHelper pageHelper) { _gateway = gateway; _logger = logger; _paymentProviders = paymentProviders; _cache = cache; _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value; _sessionHelper = sessionHelper; _mappingService = mappingService; _hostingEnvironment = hostingEnvironment; _pageHelper = pageHelper; }
public SubmitService( IGateway gateway, IPageHelper pageHelper, IWebHostEnvironment environment, IOptions <SubmissionServiceConfiguration> submissionServiceConfiguration, IDistributedCacheWrapper distributedCache, ISchemaFactory schemaFactory, IReferenceNumberProvider referenceNumberProvider, IEnumerable <ISubmitProvider> submitProviders, ILogger <SubmitService> logger) { _gateway = gateway; _pageHelper = pageHelper; _environment = environment; _submissionServiceConfiguration = submissionServiceConfiguration.Value; _distributedCache = distributedCache; _schemaFactory = schemaFactory; _referenceNumberProvider = referenceNumberProvider; _submitProviders = submitProviders; _logger = logger; }
public PageService( IEnumerable <IElementValidator> validators, IPageHelper pageHelper, ISessionHelper sessionHelper, IAddressService addressService, IFileUploadService fileUploadService, IStreetService streetService, IOrganisationService organisationService, IDistributedCacheWrapper distributedCache, IOptions <DistributedCacheExpirationConfiguration> distributedCacheExpirationConfiguration, IWebHostEnvironment environment, ISuccessPageFactory successPageFactory, IPageFactory pageFactory, IBookingService bookingService, ISchemaFactory schemaFactory, IMappingService mappingService, IPayService payService, IIncomingDataHelper incomingDataHelper, IActionsWorkflow actionsWorkflow) { _validators = validators; _pageHelper = pageHelper; _sessionHelper = sessionHelper; _streetService = streetService; _addressService = addressService; _bookingService = bookingService; _organisationService = organisationService; _fileUploadService = fileUploadService; _distributedCache = distributedCache; _schemaFactory = schemaFactory; _successPageContentFactory = successPageFactory; _pageContentFactory = pageFactory; _environment = environment; _distributedCacheExpirationConfiguration = distributedCacheExpirationConfiguration.Value; _payService = payService; _mappingService = mappingService; _incomingDataHelper = incomingDataHelper; _actionsWorkflow = actionsWorkflow; }
public CreationViewModel(IPageHelper p) : base(p) { TopicIndex = 0; //Set execute code when calling the create card command //Resets input fields and creates card in model CreateCard = new Command(execute: async() => { try { string topic; if (TopicIndex != 0) { topic = TopicNames[TopicIndex]; //Add to existing topic } else { topic = TopicName; //Add to new topic } model.AddNewCard(topic, question, answer, enableNewTopicNameInput); //Clear fields TopicName = ""; Question = ""; Answer = ""; //Ensures that last selected topic remains selected TopicIndex = TopicNames.IndexOf(topic); await p.MessagePopup("Card created", "Revision card has been created and added to topic " + topic); } catch (Exception ex) { await p.MessagePopup("Error occurred", "Error: " + ex.Message); } }); }
public ManageModifyCardViewModel(IPageHelper p, RevisionCardSQL revisionCard) : base(p) { TopicIndex = 0; int originalTopicIndex = TopicNames.IndexOf(revisionCard.Topic); TopicIndex = originalTopicIndex; Question = revisionCard.Question; Answer = revisionCard.Answer; SaveChangesCommand = new Command(execute: async() => { try { string topic; if (TopicIndex != 0) { topic = TopicNames[TopicIndex]; //Change to existing topic } else { topic = TopicName; //Change to new topic } model.ModifyCard(revisionCard, topic, question, answer); //Ensures that last selected topic remains selected TopicIndex = TopicNames.IndexOf(topic); await p.MessagePopup("Saved changes", "Changes to revision card have been saved."); } catch (Exception ex) { await p.MessagePopup("Error occurred", "Error: " + ex.Message); } }); }
void InstallResponseFilter(IPageHelper pageHelper, HttpContextBase context) { context.Response.Filter = new BufferStream(context.Response.Filter, context, pageHelper); }
void StorePageHelperInHttpContextItems(IPageHelper pageHelper, HttpContextBase httpContext) { httpContext.Items["Knapsack.PageHelper"] = pageHelper; }
/// <summary> /// Constructor for FolderHelper /// </summary> /// <param name="logger">The logger helper instance</param> /// <param name="pageHelper">The page helper instance</param> /// <param name="valueWriter">Field value initializer</param> public FolderHelper(ILogger logger, IPageHelper pageHelper, IFieldValueWriter valueWriter) { this.logger = logger; this.pageHelper = pageHelper; this.valueWriter = valueWriter; }