Example #1
0
        /// <summary>
        /// Creates a new <see cref="ViewResultExecutor"/>.
        /// </summary>
        /// <param name="viewOptions">The <see cref="IOptions{MvcViewOptions}"/>.</param>
        /// <param name="writerFactory">The <see cref="IHttpResponseStreamWriterFactory"/>.</param>
        /// <param name="viewEngine">The <see cref="ICompositeViewEngine"/>.</param>
        /// <param name="tempDataFactory">The <see cref="ITempDataDictionaryFactory"/>.</param>
        /// <param name="diagnosticSource">The <see cref="DiagnosticSource"/>.</param>
        /// <param name="loggerFactory">The <see cref="ILoggerFactory"/>.</param>
        public ViewResultExecutor(
            IOptions<MvcViewOptions> viewOptions,
            IHttpResponseStreamWriterFactory writerFactory,
            ICompositeViewEngine viewEngine,
            ITempDataDictionaryFactory tempDataFactory,
            DiagnosticSource diagnosticSource,
            ILoggerFactory loggerFactory)
            : base(viewOptions, writerFactory, viewEngine, tempDataFactory, diagnosticSource)
        {
            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            Logger = loggerFactory.CreateLogger<ViewResultExecutor>();
        }
        public ViewComponentResultExecutor(
            IOptions<MvcViewOptions> mvcHelperOptions,
            IViewComponentHelper viewComponentHelper,
            ILoggerFactory loggerFactory,
            HtmlEncoder htmlEncoder,
            IModelMetadataProvider modelMetadataProvider,
            ITempDataDictionaryFactory tempDataDictionaryFactory)
        {
            if (mvcHelperOptions == null)
            {
                throw new ArgumentNullException(nameof(mvcHelperOptions));
            }

            if (viewComponentHelper == null)
            {
                throw new ArgumentNullException(nameof(viewComponentHelper));
            }

            if (loggerFactory == null)
            {
                throw new ArgumentNullException(nameof(loggerFactory));
            }

            if (htmlEncoder == null)
            {
                throw new ArgumentNullException(nameof(htmlEncoder));
            }

            if (modelMetadataProvider == null)
            {
                throw new ArgumentNullException(nameof(modelMetadataProvider));
            }

            if (tempDataDictionaryFactory == null)
            {
                throw new ArgumentNullException(nameof(tempDataDictionaryFactory));
            }

            _htmlHelperOptions = mvcHelperOptions.Value.HtmlHelperOptions;
            _viewComponentHelper = viewComponentHelper;
            _logger = loggerFactory.CreateLogger<ViewComponentResult>();
            _htmlEncoder = htmlEncoder;
            _modelMetadataProvider = modelMetadataProvider;
            _tempDataDictionaryFactory = tempDataDictionaryFactory;
        }
Example #3
0
        /// <summary>
        /// Creates a new <see cref="ViewExecutor"/>.
        /// </summary>
        /// <param name="viewOptions">The <see cref="IOptions{MvcViewOptions}"/>.</param>
        /// <param name="writerFactory">The <see cref="IHttpResponseStreamWriterFactory"/>.</param>
        /// <param name="viewEngine">The <see cref="ICompositeViewEngine"/>.</param>
        /// <param name="tempDataFactory">The <see cref="ITempDataDictionaryFactory"/>.</param>
        /// <param name="diagnosticSource">The <see cref="DiagnosticSource"/>.</param>
        /// <param name="modelMetadataProvider">The <see cref="IModelMetadataProvider" />.</param>
        public ViewExecutor(
            IOptions<MvcViewOptions> viewOptions,
            IHttpResponseStreamWriterFactory writerFactory,
            ICompositeViewEngine viewEngine,
            ITempDataDictionaryFactory tempDataFactory,
            DiagnosticSource diagnosticSource,
            IModelMetadataProvider modelMetadataProvider)
        {
            if (viewOptions == null)
            {
                throw new ArgumentNullException(nameof(viewOptions));
            }

            if (writerFactory == null)
            {
                throw new ArgumentNullException(nameof(writerFactory));
            }

            if (viewEngine == null)
            {
                throw new ArgumentNullException(nameof(viewEngine));
            }

            if (tempDataFactory == null)
            {
                throw new ArgumentNullException(nameof(tempDataFactory));
            }

            if (diagnosticSource == null)
            {
                throw new ArgumentNullException(nameof(diagnosticSource));
            }

            if (modelMetadataProvider == null)
            {
                throw new ArgumentNullException(nameof(modelMetadataProvider));
            }

            ViewOptions = viewOptions.Value;
            WriterFactory = writerFactory;
            ViewEngine = viewEngine;
            TempDataFactory = tempDataFactory;
            DiagnosticSource = diagnosticSource;
            _modelMetadataProvider = modelMetadataProvider;
        }
Example #4
0
 public ThrowAlertCommandHandler(IHttpContextAccessor httpContextAccessor, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     _httpContextAccessor       = httpContextAccessor;
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
 }
 public TempDataWrapper(ITempDataDictionaryFactory tempDataDictionaryFactory, IHttpContextAccessor httpContextAccessor)
 {
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
     _context = httpContextAccessor.HttpContext;
 }
Example #6
0
 public ErrorHandler(ITempDataDictionaryFactory temDataFactory)
 {
     this.temDataFactory = temDataFactory;
 }
 public PageSaveTempDataPropertyFilter(ITempDataDictionaryFactory factory)
     : base(factory)
 {
 }
Example #8
0
 public TempDataWrapper(ITempDataDictionaryFactory tempDataDictionaryFactory, IHttpContextAccessor httpContextAccessor)
 {
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
     _httpContextAccessor       = httpContextAccessor;
     _serializerSettings        = GetSerializerSettings();
 }
Example #9
0
 public FlasherExtended(ITempDataDictionaryFactory factory, IHttpContextAccessor contextAccessor) : base(factory, contextAccessor)
 {
 }
 public BenchmarkViewExecutor(IOptions <MvcViewOptions> viewOptions, IHttpResponseStreamWriterFactory writerFactory, ICompositeViewEngine viewEngine, ITempDataDictionaryFactory tempDataFactory, DiagnosticListener diagnosticListener, IModelMetadataProvider modelMetadataProvider)
     : base(viewOptions, writerFactory, viewEngine, tempDataFactory, diagnosticListener, modelMetadataProvider)
 {
 }
Example #11
0
 public FarmService(IHeroService heroService, IResourcePouchService resourcePouchService, IStatisticsService statisticsService, ILevelService levelService, IChronometerService chronometerService, INotificationService notificationService, IAmuletBagService amuletBagService, ITempDataDictionaryFactory tempDataDictionaryFactory, IHttpContextAccessor context)
 {
     this.heroService               = heroService;
     this.resourcePouchService      = resourcePouchService;
     this.statisticsService         = statisticsService;
     this.levelService              = levelService;
     this.chronometerService        = chronometerService;
     this.notificationService       = notificationService;
     this.amuletBagService          = amuletBagService;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
     this.context = context;
 }
Example #12
0
 public BonusService(IHeroService heroService, FarmHeroesDbContext context, IResourcePouchService resourcePouchService, IMapper mapper, ITempDataDictionaryFactory tempDataDictionaryFactory, IHttpContextAccessor httpContext)
 {
     this.heroService          = heroService;
     this.context              = context;
     this.resourcePouchService = resourcePouchService;
     this.mapper = mapper;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
     this.httpContext = httpContext;
 }
Example #13
0
 /// <summary>
 /// Creates a new instance of <see cref="SaveTempDataFilter"/>.
 /// </summary>
 /// <param name="factory">The <see cref="ITempDataDictionaryFactory"/>.</param>
 public SaveTempDataFilter(ITempDataDictionaryFactory factory)
 {
     _factory = factory;
 }
Example #14
0
 public ChangeOptionViewModelMapper(ICommitmentsApiClient commitmentsApiClient, IHttpContextAccessor httpContext, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     _commitmentsApiClient      = commitmentsApiClient;
     _httpContext               = httpContext;
     _tempDataDictionaryFactory = tempDataDictionaryFactory;;
 }
Example #15
0
 public AjaxFlashMessage(IHttpContextAccessor httpContextAccessor, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     _tempData = tempDataDictionaryFactory.GetTempData(httpContextAccessor.HttpContext);
 }
Example #16
0
 public SiteViewComponent(ITempDataDictionaryFactory tempDataFactory)
 {
     _tempDataFactory = tempDataFactory;
 }
Example #17
0
 public ShopService(FarmHeroesDbContext context, IMapper mapper, IInventoryService inventoryService, IResourcePouchService resourcePouchService, ILevelService levelService, ITempDataDictionaryFactory tempDataDictionaryFactory, IHttpContextAccessor httpContext)
 {
     this.context                   = context;
     this.mapper                    = mapper;
     this.inventoryService          = inventoryService;
     this.resourcePouchService      = resourcePouchService;
     this.levelService              = levelService;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
     this.httpContext               = httpContext;
 }
Example #18
0
 public UserService(IHttpContextAccessor httpContext, UserManager <ApplicationUser> userManager, FarmHeroesDbContext context, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     this.httpContext = httpContext;
     this.userManager = userManager;
     this.context     = context;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
 }
Example #19
0
 public FlashMessage(ITempDataDictionaryFactory tempDataFactory, IHttpContextAccessor httpContextAccessor)
 {
     _tempDataFactory     = tempDataFactory;
     _httpContextAccessor = httpContextAccessor;
 }
		/// <summary>
		///     Initialize a new service instance with required services.
		/// </summary>
		/// <param name="httpContextAccessor">The <see cref="IHttpContextAccessor" /> service.</param>
		/// <param name="tempDataFactory">The TempData dictionary factory in the context.</param>
		/// <param name="options">The <see cref="OperationMessageOptions" /> instance used to configure the accessor.</param>
		public DefaultOperationMessageAccessor(IHttpContextAccessor httpContextAccessor,
			ITempDataDictionaryFactory tempDataFactory, IOptions<OperationMessageOptions> options)
		{
			Options = options.Value;
			TempData = tempDataFactory.GetTempData(httpContextAccessor.HttpContext);
		}
Example #21
0
 protected UploadControllerBase(IBlobProvider blobProvider, ITempDataDictionaryFactory tempDataDictionaryFactory, IStringLocalizer <UploadControllerBase> localizer)
 {
     BlobProvider = blobProvider;
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
     _localizer = localizer;
 }
Example #22
0
 public ArgumentNullExceptionFilterAttribute(ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
 }
Example #23
0
 public FlashesTagHelper(ITempDataDictionaryFactory factory, IHttpContextAccessor httpContextAccessor, IMessageRenderer messageRenderer)
 {
     this.tempDataDictionaryFactory = factory;
     this.httpContextAccessor       = httpContextAccessor;
     this.messageRenderer           = messageRenderer;
 }
 public MyViewResultExecutor(IOptions <MvcViewOptions> viewOptions, IHttpResponseStreamWriterFactory writerFactory, ICompositeViewEngine viewEngine, ITempDataDictionaryFactory tempDataFactory, DiagnosticListener diagnosticListener, ILoggerFactory loggerFactory, IModelMetadataProvider modelMetadataProvider, IWebHostEnvironment env)
     : base(viewOptions, writerFactory, viewEngine, tempDataFactory, diagnosticListener, loggerFactory, modelMetadataProvider)
 {
     _env = env;
 }
Example #25
0
 public SessionTempDataServices(IHttpContextAccessor httpContextAccessor,
                                ITempDataDictionaryFactory tempDataFactory)
 {
     _tempData = tempDataFactory.GetTempData(httpContextAccessor.HttpContext);
 }
Example #26
0
 public MessagesService(IHttpContextAccessor httpContextAccessor, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
     _httpContextAccessor       = httpContextAccessor;
 }
 /// <summary>
 /// Creates a new instance of <see cref="SaveTempDataFilter"/>.
 /// </summary>
 /// <param name="factory">The <see cref="ITempDataDictionaryFactory"/>.</param>
 public SaveTempDataFilter(ITempDataDictionaryFactory factory)
 {
     _factory = factory;
 }
 public GlobalExceptionFilter(ITempDataDictionaryFactory tempDataFactory)
 {
     this.tempDataFactory = tempDataFactory;
 }
Example #29
0
 /// <summary>
 ///     Initialize a new service instance with required services.
 /// </summary>
 /// <param name="httpContextAccessor">The <see cref="IHttpContextAccessor" /> service.</param>
 /// <param name="tempDataFactory">The TempData dictionary factory in the context.</param>
 /// <param name="options">The <see cref="OperationMessageOptions" /> instance used to configure the accessor.</param>
 public DefaultOperationMessageAccessor(IHttpContextAccessor httpContextAccessor,
                                        ITempDataDictionaryFactory tempDataFactory, IOptions <OperationMessageOptions> options)
 {
     Options  = options.Value;
     TempData = tempDataFactory.GetTempData(httpContextAccessor.HttpContext);
 }
Example #30
0
 public SaveTempDataPropertyFilterBase(ITempDataDictionaryFactory factory)
 {
     _factory = factory;
 }
Example #31
0
 public ControllerSaveTempDataPropertyFilter(ITempDataDictionaryFactory factory)
     : base(factory)
 {
 }
Example #32
0
 public ControllerExceptionFilterAttribute(ITempDataDictionaryFactory tempDataDictionaryFactory,
                                           IModelMetadataProvider modelMetadataProvider)
 {
     _tempDataDictionaryFactory = tempDataDictionaryFactory;
     _modelMetadataProvider     = modelMetadataProvider;
 }
 public EquipmentService(IHeroService heroService, FarmHeroesDbContext context, IHttpContextAccessor httpContext, ITempDataDictionaryFactory tempDataDictionaryFactory, IMapper mapper)
 {
     this.heroService = heroService;
     this.context     = context;
     this.httpContext = httpContext;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
     this.mapper = mapper;
 }
Example #34
0
 public SmithService(IInventoryService inventoryService, IResourcePouchService resourcePouchService, FarmHeroesDbContext context, IHttpContextAccessor httpContext, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     this.inventoryService     = inventoryService;
     this.resourcePouchService = resourcePouchService;
     this.context     = context;
     this.httpContext = httpContext;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
 }
Example #35
0
 public NotifierFilter(INotifier notifier, ITempDataDictionaryFactory tempDataDictionaryFactory)
 {
     this.notifier = notifier;
     this.tempDataDictionaryFactory = tempDataDictionaryFactory;
 }