Beispiel #1
0
        public ViewContext(
            [NotNull] ActionContext actionContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] TextWriter writer)
            : base(actionContext)
        {
            View     = view;
            ViewData = viewData;
            Writer   = writer;

            _formContext                    = _defaultFormContext;
            ClientValidationEnabled         = true;
            ValidationSummaryMessageElement = "span";
            ValidationMessageElement        = "span";
        }
Beispiel #2
0
        public ViewContext(
            [NotNull] ViewContext viewContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] TextWriter writer)
            : base(viewContext)
        {
            _formContext                    = viewContext.FormContext;
            ClientValidationEnabled         = viewContext.ClientValidationEnabled;
            ValidationSummaryMessageElement = viewContext.ValidationSummaryMessageElement;
            ValidationMessageElement        = viewContext.ValidationMessageElement;

            View     = view;
            ViewData = viewData;
            Writer   = writer;
        }
Beispiel #3
0
        public ViewContext(
            [NotNull] ViewContext viewContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] TextWriter writer)
            : base(viewContext)
        {
            _formContext = viewContext.FormContext;
            ClientValidationEnabled = viewContext.ClientValidationEnabled;
            ValidationSummaryMessageElement = viewContext.ValidationSummaryMessageElement;
            ValidationMessageElement = viewContext.ValidationMessageElement;

            View = view;
            ViewData = viewData;
            Writer = writer;
        }
Beispiel #4
0
        public ViewContext(
            [NotNull] ActionContext actionContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] TextWriter writer)
            : base(actionContext)
        {
            View = view;
            ViewData = viewData;
            Writer = writer;

            _formContext = _defaultFormContext;
            ClientValidationEnabled = true;
            ValidationSummaryMessageElement = "span";
            ValidationMessageElement = "span";
        }
Beispiel #5
0
        /// <summary>
        /// Initializes a new instance of <see cref="ViewContext"/>.
        /// </summary>
        /// <param name="actionContext">The <see cref="ActionContext"/>.</param>
        /// <param name="view">The <see cref="IView"/> being rendered.</param>
        /// <param name="viewData">The <see cref="ViewDataDictionary"/>.</param>
        /// <param name="tempData">The <see cref="ITempDataDictionary"/>.</param>
        /// <param name="writer">The <see cref="TextWriter"/> to render output to.</param>
        public ViewContext(
            [NotNull] ActionContext actionContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] ITempDataDictionary tempData,
            [NotNull] TextWriter writer,
            [NotNull] HtmlHelperOptions htmlHelperOptions)
            : base(actionContext)
        {
            View     = view;
            ViewData = viewData;
            TempData = tempData;
            Writer   = writer;

            _formContext                    = _defaultFormContext;
            ClientValidationEnabled         = htmlHelperOptions.ClientValidationEnabled;
            Html5DateRenderingMode          = htmlHelperOptions.Html5DateRenderingMode;
            ValidationSummaryMessageElement = htmlHelperOptions.ValidationSummaryMessageElement;
            ValidationMessageElement        = htmlHelperOptions.ValidationMessageElement;
        }
Beispiel #6
0
        /// <summary>
        /// Initializes a new instance of <see cref="ViewContext"/>.
        /// </summary>
        /// <param name="actionContext">The <see cref="ActionContext"/>.</param>
        /// <param name="view">The <see cref="IView"/> being rendered.</param>
        /// <param name="viewData">The <see cref="ViewDataDictionary"/>.</param>
        /// <param name="tempData">The <see cref="ITempDataDictionary"/>.</param>
        /// <param name="writer">The <see cref="TextWriter"/> to render output to.</param>
        public ViewContext(
            [NotNull] ActionContext actionContext,
            [NotNull] IView view,
            [NotNull] ViewDataDictionary viewData,
            [NotNull] ITempDataDictionary tempData,
            [NotNull] TextWriter writer,
            [NotNull] HtmlHelperOptions htmlHelperOptions)
            : base(actionContext)
        {
            View = view;
            ViewData = viewData;
            TempData = tempData;
            Writer = writer;

            _formContext = _defaultFormContext;
            ClientValidationEnabled = htmlHelperOptions.ClientValidationEnabled;
            Html5DateRenderingMode = htmlHelperOptions.Html5DateRenderingMode;
            ValidationSummaryMessageElement = htmlHelperOptions.ValidationSummaryMessageElement;
            ValidationMessageElement = htmlHelperOptions.ValidationMessageElement;
        }