示例#1
0
 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer) {
     return new DisplayHelper(
         _displayManager,
         _shapeFactory,
         viewContext,
         viewDataContainer);
 }
示例#2
0
 public ControlLib(ViewContext viewContext,
                   IViewDataContainer viewDataContainer, RouteCollection routeCollection)
     : base(viewContext, viewDataContainer, routeCollection)
 {
     ViewContext = viewContext;
     ViewData    = new ViewDataDictionary(viewDataContainer.ViewData);
 }
示例#3
0
        public BaseViewHelper(RequestContext requestContext, ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
        {
            if (requestContext == null)
            {
                throw new ArgumentNullException("requestContext");
            }

            if (viewContext == null)
            {
                throw new ArgumentNullException("viewContext");
            }

            if (viewDataContainer == null)
            {
                throw new ArgumentNullException("viewDataContainer");
            }

            if (routeCollection == null)
            {
                throw new ArgumentNullException("routeCollection");
            }

            ViewData = new ViewDataDictionary(viewDataContainer.ViewData);
            RequestContext = requestContext;
            ViewContext = viewContext;
            RouteCollection = routeCollection;
        }
示例#4
0
        public HtmlHelper(
            ViewContext viewContext,
            IViewDataContainer viewDataContainer,
            RouteCollection routeCollection
            )
        {
            if (viewContext == null)
            {
                throw new ArgumentNullException("viewContext");
            }
            if (viewDataContainer == null)
            {
                throw new ArgumentNullException("viewDataContainer");
            }
            if (routeCollection == null)
            {
                throw new ArgumentNullException("routeCollection");
            }

            ViewContext                 = viewContext;
            ViewDataContainer           = viewDataContainer;
            RouteCollection             = routeCollection;
            ClientValidationRuleFactory = (name, metadata) =>
                                          ModelValidatorProviders.Providers
                                          .GetValidators(
                metadata ?? ModelMetadata.FromStringExpression(name, ViewData),
                ViewContext
                )
                                          .SelectMany(v => v.GetClientValidationRules());
        }
示例#5
0
        /// <summary>
        /// Indicates whether the views are rendered in reverse order.
        /// If so, scripts & css should be executed also in reverse order.
        ///
        /// We do this for Razor views only, based on the LayoutPath.
        /// </summary>
        /// <param name="container"></param>
        /// <param name="view"></param>
        /// <param name="viewPath"></param>
        /// <returns></returns>
        public static bool RegisterReverseOrder(this IViewDataContainer container, IView view, out string viewPath)
        {
            // yeah, I know this is kinda gay, but it's the only way to keep MVC 2 compatible
            Type razorViewAssignableFrom = new Func <Type>(() =>
            {
                try
                {
                    var mvcDll = AppDomain.CurrentDomain.GetAssemblies().Where(t => t.GetName().Name == "System.Web.Mvc");

                    var compiledView = mvcDll.First().GetType("System.Web.Mvc.RazorView");
                    if (compiledView.IsAssignableFrom(view.GetType()))
                    {
                        return(compiledView);
                    }

                    return(null);
                }
                catch
                {
                    return(null);
                }
            })();

            // not a Razor view? Then return false.
            if (razorViewAssignableFrom == null)
            {
                viewPath = null;
                return(false);
            }

            viewPath = container.GetType().Name;
            return(true);
        }
示例#6
0
 protected MVCUIBase(ControlSettingsBase settings,
                     ViewContext context, IViewDataContainer viewDataContainer)
     : this(settings)
 {
     ViewContext       = context;
     ViewDataContainer = viewDataContainer;
 }
        /// <summary>
        /// Creates a new IViewDataContainer but with a filtered ModelState
        /// </summary>
        /// <param name="container"></param>
        /// <param name="prefix"></param>
        /// <returns></returns>
        public static IViewDataContainer FilterContainer(this IViewDataContainer container, string prefix)
        {
            var newContainer = new ViewDataContainer();

            newContainer.ViewData.ModelState.Merge(container.ViewData.ModelState, prefix);
            return(newContainer);
        }
示例#8
0
    public static Customer CurrentCustomer(this IViewDataContainer pg)
    {
        //this will never be null
        var result = (Customer)pg.ViewData["CurrentCustomer"];

        return(result);
    }
示例#9
0
        public static HtmlHelper <TModel> CreateMockHtmlHelper <TModel>(TextWriter writer, RouteData routeData)
        {
            ViewContext        viewContext;
            IViewDataContainer viewDataContainer = GetViewDataContainer(writer, routeData, out viewContext);

            return(new HtmlHelper <TModel>(viewContext, viewDataContainer));
        }
示例#10
0
 public BaseViewHelper(RequestContext requestContext, ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
 {
     ViewData = new ViewDataDictionary(viewDataContainer.ViewData);
     RequestContext = requestContext;
     ViewContext = viewContext;
     RouteCollection = routeCollection;
 }
示例#11
0
        protected void EnsureViewData()
        {
            if (_viewData != null)
            {
                return;
            }

            IViewDataContainer vdc = GetViewDataContainer(this);

            if (vdc == null)
            {
                throw Mvc.Error.ControlRequiresViewDataProvider();
            }

            ViewDataDictionary vd = vdc.ViewData;

            if (!String.IsNullOrEmpty(_subDataKey))
            {
                ViewDataDictionary subViewData;
                vdc.ViewData.SubDataItems.TryGetValue(_subDataKey, out subViewData);
                vd       = new ViewDataDictionary(subViewData);
                vd.Model = subViewData.Model;
            }

            if (!String.IsNullOrEmpty(ViewDataKey))
            {
                ViewDataDictionary vdPart = new ViewDataDictionary();
                vdPart.Model = vd[ViewDataKey];
                vd           = vdPart;
            }
            SetViewData(vd);
        }
        protected void EnsureViewData()
        {
            if (_viewData != null)
            {
                return;
            }

            // Get the ViewData for this ViewUserControl, optionally using the specified ViewDataKey
            IViewDataContainer vdc = GetViewDataContainer(this);

            if (vdc == null)
            {
                throw new InvalidOperationException(
                          String.Format(
                              CultureInfo.CurrentCulture,
                              MvcResources.ViewUserControl_RequiresViewDataProvider,
                              AppRelativeVirtualPath));
            }

            ViewDataDictionary myViewData = vdc.ViewData;

            // If we have a ViewDataKey, try to extract the ViewData from the dictionary, otherwise
            // return the container's ViewData.
            if (!String.IsNullOrEmpty(ViewDataKey))
            {
                object target = myViewData.Eval(ViewDataKey);
                myViewData = target as ViewDataDictionary ?? new ViewDataDictionary(myViewData)
                {
                    Model = target
                };
            }

            SetViewData(myViewData);
        }
示例#13
0
 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer) {
     return ClayActivator.CreateInstance<DisplayHelper>(
         _behaviors,
         _displayManager,
         _shapeFactory,
         viewContext,
         viewDataContainer);
 }
示例#14
0
        public static IEnumerable <IBehaviorMarker> GetBehaviors(this IViewDataContainer view)
        {
            var behaviorsContainer = view as IBehaviorsContainer;

            return(behaviorsContainer == null
                ? null
                : behaviorsContainer.Behaviors);
        }
示例#15
0
 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
 {
     return(new DisplayHelper(
                _displayManager,
                _shapeFactory,
                viewContext,
                viewDataContainer));
 }
示例#16
0
 public AjaxHelper(
     ViewContext viewContext,
     IViewDataContainer viewDataContainer,
     RouteCollection routeCollection
     ) : base(viewContext, viewDataContainer, routeCollection)
 {
     _viewData = new ViewDataDictionary <TModel>(viewDataContainer.ViewData);
 }
示例#17
0
        private static IViewDataContainer CreateViewDataContainer(ViewContext viewContext)
        {
            IViewDataContainer container = Substitute.For <IViewDataContainer>();

            container.ViewData = viewContext.ViewData;

            return(container);
        }
        /// <summary>
        /// Creates a new IViewDataContainer but with a filtered ModelState
        /// </summary>
        /// <param name="container"></param>
        /// <param name="prefix"></param>
        /// <returns></returns>
        public static IViewDataContainer FilterContainer(this IViewDataContainer container, string prefix)
        {
            var newContainer = new ViewDataContainer();

            newContainer.ViewData.ModelState.Merge(container.ViewData.ModelState, prefix);
            //change the html field name too
            newContainer.ViewData.TemplateInfo.HtmlFieldPrefix = prefix;
            return(newContainer);
        }
示例#19
0
        internal static HtmlHelper GetHtmlHelper(ViewDataDictionary viewData)
        {
            Mock <ViewContext> mockViewContext = new Mock <ViewContext>();

            mockViewContext.Expect(c => c.ViewData).Returns(viewData);
            IViewDataContainer container = GetViewDataContainer(viewData);

            return(new HtmlHelper(mockViewContext.Object, container));
        }
示例#20
0
 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
 {
     return(ClayActivator.CreateInstance <DisplayHelper>(
                _behaviors,
                _displayManager,
                _shapeFactory,
                viewContext,
                viewDataContainer));
 }
示例#21
0
        public VehicleHelperFixture()
        {
            this.previousCultureInfo = System.Threading.Thread.CurrentThread.CurrentCulture;
            System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;

            _viewDataContainer = new Mock<IViewDataContainer>().Object;
            _viewContext = new Mock<ViewContext>().Object;
            _helper = new HtmlHelper(_viewContext, _viewDataContainer);
        }
示例#22
0
        public static HtmlHelper <TModel> GetHtmlHelperWithPath <TModel>(ViewDataDictionary <TModel> viewData, string appPath)
        {
            ViewContext viewContext = GetViewContextWithPath(appPath, viewData);
            Mock <IViewDataContainer> mockContainer = new Mock <IViewDataContainer>();

            mockContainer.Expect(c => c.ViewData).Returns(viewData);
            IViewDataContainer container = mockContainer.Object;

            return(new HtmlHelper <TModel>(viewContext, container, new RouteCollection()));
        }
示例#23
0
    public static Category CurrentCategory(this IViewDataContainer pg)
    {
        Category result = new Category();

        if (pg.ViewData["CurrentCategory"] != null)
        {
            result = (Category)pg.ViewData["CurrentCategory"];
        }
        return(result);
    }
示例#24
0
 public DisplayHelper(
     IDisplayManager displayManager,
     IShapeFactory shapeFactory,
     ViewContext viewContext,
     IViewDataContainer viewDataContainer) {
     _displayManager = displayManager;
     _shapeFactory = shapeFactory;
     ViewContext = viewContext;
     ViewDataContainer = viewDataContainer;
 }
    public static Product Product(this IViewDataContainer pg)
    {
        Product result = null;

        if (pg.ViewData["SelectedProduct"] != null)
        {
            result = (Product)pg.ViewData["SelectedProduct"];
        }
        return(result);
    }
 /// <summary>
 /// Returns a new IViewContainer based on the current one but supplies a different model to the ViewData
 /// </summary>
 /// <param name="container"></param>
 /// <param name="model"></param>
 /// <returns></returns>
 public static IViewDataContainer CopyWithModel(this IViewDataContainer container, object model)
 {
     return(new ViewDataContainer
     {
         ViewData = new ViewDataDictionary(container.ViewData)
         {
             Model = model
         }
     });
 }
示例#27
0
    public static IList <Category> Categories(this IViewDataContainer pg)
    {
        List <Category> result = new List <Category>();

        if (pg.ViewData["Categories"] != null)
        {
            result = (List <Category>)pg.ViewData["Categories"];
        }
        return(result);
    }
示例#28
0
        internal static HtmlHelper GetHtmlHelper(ViewDataDictionary viewData, string appPath)
        {
            ViewContext viewContext = GetViewContext(appPath);
            Mock <IViewDataContainer> mockContainer = new Mock <IViewDataContainer>();

            mockContainer.Expect(c => c.ViewData).Returns(viewData);
            IViewDataContainer container = mockContainer.Object;

            return(new HtmlHelper(viewContext, container));
        }
示例#29
0
        public static HtmlHelper GetHtmlHelperWithPath(ViewDataDictionary viewData, string appPath)
        {
            ViewContext viewContext   = GetViewContextWithPath(appPath, viewData);
            var         mockContainer = new Mock <IViewDataContainer>();

            mockContainer.Setup(c => c.ViewData).Returns(viewData);
            IViewDataContainer container = mockContainer.Object;

            return(new HtmlHelper(viewContext, container, new RouteCollection()));
        }
示例#30
0
 public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : base(viewContext, viewDataContainer)
 {
     if (!(viewDataContainer.ViewData is ViewDataDictionary <TModel>))
     {
         throw new ArgumentException(
                   $"{nameof(viewDataContainer)}.ViewData should be an instance of 'ViewDataDictionary<TModel>'.",
                   nameof(viewDataContainer)
                   );
     }
 }
    public static PagedList <Product> Products(this IViewDataContainer pg)
    {
        PagedList <Product> result = new PagedList <Product>(new List <Product>(), 1, 1, 1);

        if (pg.ViewData["Products"] != null)
        {
            IList <Product> products = (IList <Product>)pg.ViewData["Products"];
            result = new PagedList <Product>(products.ToList(), products.Count, 0, 20);
        }
        return(result);
    }
示例#32
0
        public static SeoHelper GetSeoHelper(this IViewDataContainer viewDataContainer)
        {
            if (viewDataContainer == null)
            {
                throw new ArgumentNullException(nameof(viewDataContainer));
            }

            var seoHelper = viewDataContainer.ViewData?.GetSeoHelper();

            return(seoHelper);
        }
    public static ShippingMethod SelectedShipping(this IViewDataContainer pg)
    {
        ShippingMethod result = null;

        if (pg.ViewData["SelectedShipping"] != null)
        {
            result = (ShippingMethod)pg.ViewData["SelectedShipping"];
        }

        return(result);
    }
示例#34
0
        public SyncViewAction(IView view, IViewDataContainer viewDataContainer)
        {
            if (view == null)
            {
                throw new InfrastructureException("The view cannot be null.");
            }

            this.view = view;

            this.viewDataContainer = viewDataContainer;
        }
示例#35
0
 public DisplayHelper(
     IDisplayManager displayManager,
     IShapeFactory shapeFactory,
     ViewContext viewContext,
     IViewDataContainer viewDataContainer)
 {
     _displayManager   = displayManager;
     _shapeFactory     = shapeFactory;
     ViewContext       = viewContext;
     ViewDataContainer = viewDataContainer;
 }
示例#36
0
        /// <summary>
        /// Generate an HTML input element of type 'checkbox' and set checked from ViewData based on the name provided.
        /// The checkbox element has an accompanying input element of type 'hidden' to support binding upon form post.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="name">Value of the 'name' attribute of the element.  Also used to derive the 'id' attribute.</param>
        public static CheckBox CheckBox(this IViewDataContainer view, string name)
        {
            var checkbox = new CheckBox(name, null, view.GetBehaviors()).Value(true);
            var chkd     = view.ViewData.Eval(name) as bool?;

            if (chkd.HasValue)
            {
                checkbox.Checked(chkd.Value);
            }
            return(checkbox);
        }
    public static IList <ShippingMethod> ShippingMethods(this IViewDataContainer pg)
    {
        IList <ShippingMethod> result = null;

        if (pg.ViewData["ShippingMethods"] != null)
        {
            result = (IList <ShippingMethod>)pg.ViewData["ShippingMethods"];
        }

        return(result);
    }
示例#38
0
文件: AjaxHelper.cs 项目: nobled/mono
 public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection) {
     if (viewContext == null) {
         throw new ArgumentNullException("viewContext");
     }
     if (viewDataContainer == null) {
         throw new ArgumentNullException("viewDataContainer");
     }
     if (routeCollection == null) {
         throw new ArgumentNullException("routeCollection");
     }
     ViewContext = viewContext;
     ViewDataContainer = viewDataContainer;
     RouteCollection = routeCollection;
 }
示例#39
0
 public ResourceRegister(IViewDataContainer container, IResourceManager resourceManager, string resourceType) {
     var templateControl = container as TemplateControl;
     if (templateControl != null) {
         _viewVirtualPath = templateControl.AppRelativeVirtualPath;
     }
     else {
         var webPage = container as WebPageBase;
         if (webPage != null) {
             _viewVirtualPath = webPage.VirtualPath;
         }
     }
     ResourceManager = resourceManager;
     ResourceType = resourceType;
 }
示例#40
0
		internal static MvcRenderingContext Build(ViewContext viewContext, IViewDataContainer viewDataContainer, TextWriter writer)
		{
			var context = GetFromViewContext(viewContext);
			if (context != null)
				return context;

			MvcRenderingContext parentContext = null; 
			if (viewContext.ParentActionViewContext != null)
				parentContext = GetFromViewContext(viewContext.ParentActionViewContext);

			context = new MvcRenderingContext(viewContext, viewDataContainer, writer, parentContext);
			viewContext.ViewData.Add(ContextKey, context);

			return context;
		}
示例#41
0
文件: HtmlHelper.cs 项目: nobled/mono
        public HtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection) {
            if (viewContext == null) {
                throw new ArgumentNullException("viewContext");
            }
            if (viewDataContainer == null) {
                throw new ArgumentNullException("viewDataContainer");
            }
            if (routeCollection == null) {
                throw new ArgumentNullException("routeCollection");
            }

            ViewContext = viewContext;
            ViewDataContainer = viewDataContainer;
            RouteCollection = routeCollection;
            ClientValidationRuleFactory = (name, metadata) => ModelValidatorProviders.Providers.GetValidators(metadata ?? ModelMetadata.FromStringExpression(name, ViewData), ViewContext).SelectMany(v => v.GetClientValidationRules());
        }
示例#42
0
 public PluginHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
 {
     if (viewContext == null)
      {
     throw new ArgumentNullException("viewContext");
      }
      if (viewDataContainer == null)
      {
     throw new ArgumentNullException("viewDataContainer");
      }
      if (routeCollection == null)
      {
     throw new ArgumentNullException("routeCollection");
      }
      this.ViewContext = viewContext;
      this.ViewDataContainer = viewDataContainer;
      this.Model = ViewContext.ViewData.Model as TemplateContentModel;
      this.RouteCollection = routeCollection;
 }
示例#43
0
        public FileRegistrationContext(ControllerContext viewContext, IViewDataContainer viewDataContainer, string tagName, string fileName, string position, string filePathAttributeName, TagRenderMode fileTagRenderMode)
            : base(viewContext.HttpContext, viewContext.RouteData) {
            _fileTagRenderMode = fileTagRenderMode;
            Container = viewDataContainer as TemplateControl;

            if (Container != null) {
                ContainerVirtualPath = Container.AppRelativeVirtualPath.Substring(
                    0,
                    Container.AppRelativeVirtualPath.IndexOf(
                        "/Views",
                        StringComparison.InvariantCultureIgnoreCase
                        )
                    );
            }

            FileName = fileName;
            Position = position;
            FilePathAttributeName = filePathAttributeName;
            _tagBuilder = new TagBuilder(tagName);
        }
示例#44
0
        /// <summary>
        /// Initialize new instance of class <see cref="ThunderHelper"/>.
        /// </summary>
        /// <param name="viewContext"><see cref="ViewContext"/></param>
        /// <param name="viewDataContainer"><see cref="IViewDataContainer"/></param>
        /// <param name="routeCollection"><see cref="RouteCollection"/></param>
        /// <param name="htmlHelper"><see cref="HtmlHelper"/></param>
        /// <exception cref="ArgumentNullException"></exception>
        public ThunderHelper(ViewContext viewContext, IViewDataContainer viewDataContainer,
                             RouteCollection routeCollection, HtmlHelper htmlHelper)
        {
            if (viewContext == null)
            {
                throw new ArgumentNullException("viewContext");
            }

            if (viewDataContainer == null)
            {
                throw new ArgumentNullException("viewDataContainer");
            }

            if (routeCollection == null)
            {
                throw new ArgumentNullException("routeCollection");
            }

            ViewContext = viewContext;
            RouteCollection = routeCollection;
            Html = htmlHelper;
            ViewData = new ViewDataDictionary(viewDataContainer.ViewData);
        }
        public SquishItHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
        {
            #region Validation
            if (viewContext == null)
            {
                throw new ArgumentNullException("viewContext");
            }
            if (viewDataContainer == null)
            {
                throw new ArgumentNullException("viewDataContainer");
            }
            if (routeCollection == null)
            {
                throw new ArgumentNullException("routeCollection");
            }
            #endregion

            ViewContext = viewContext;
            ViewDataContainer = viewDataContainer;
            RouteCollection = routeCollection;

            Css = new CssHelper();
            JavaScript = new JavaScriptHelper();
        }
示例#46
0
文件: AjaxHelper.cs 项目: nobled/mono
 public AjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : this(viewContext, viewDataContainer, RouteTable.Routes) {
 }
 public SpyHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : base(viewContext, viewDataContainer) { }
示例#48
0
 public RubyHtmlHelper(ViewContext context, IViewDataContainer viewDataContainer)
     : base(context, viewDataContainer)
 {
     _helper = new HtmlHelper(context, viewDataContainer);
 }
示例#49
0
 public MasonryHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
 {
     ViewContext = viewContext;
       ViewDataContainer = viewDataContainer;
       RouteCollection = routeCollection;
 }
示例#50
0
 public MasonryHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : this(viewContext, viewDataContainer, RouteTable.Routes)
 {
 }
示例#51
0
 public HtmlExtensionDuck(ViewContext viewContext, IViewDataContainer container)
     : this(new HtmlHelper(viewContext, container))
 {
 }
示例#52
0
 TestableHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : base(viewContext, viewDataContainer)
 {
 }
示例#53
0
 public RubyAjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
     : base(viewContext, viewDataContainer, routeCollection)
 {
     _helper = new AjaxHelper(viewContext, viewDataContainer, routeCollection);
 }
示例#54
0
 public RubyAjaxHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
     : base(viewContext, viewDataContainer)
 {
     _helper = new AjaxHelper(viewContext, viewDataContainer);
 }
 protected ScriptRegister(IViewDataContainer container, IResourceManager resourceManager)
     : base(container, resourceManager, "script")
 {
 }
 public FluentHtmlHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
   : base(viewContext, viewDataContainer, RouteTable.Routes)
 {
   Url = new UrlHelper(ViewContext.RequestContext);
 }
 public FileRegistrationContext(ControllerContext viewContext, IViewDataContainer viewDataContainer, string tagName, string fileName, string position)
     : this(viewContext, viewDataContainer, tagName, fileName, position, _filePathAttributes[tagName], _fileTagRenderModes[tagName])
 {
 }
示例#58
0
 /// <summary>
 /// Initialize new instance of class <see cref="ThunderHelper"/>.
 /// </summary>
 /// <param name="viewContext"><see cref="ViewContext"/></param>
 /// <param name="viewDataContainer"><see cref="IViewDataContainer"/></param>
 /// <param name="htmlHelper"><see cref="HtmlHelper"/></param>
 public ThunderHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, HtmlHelper htmlHelper)
     : this(viewContext, viewDataContainer, RouteTable.Routes, htmlHelper)
 {
 }
示例#59
0
	    protected virtual MvcRenderingContext ResolveContext(ViewContext viewContext, IViewDataContainer viewDataContainer, TextWriter writer)
	    {
		    return MvcRenderingContext.Build(viewContext, viewDataContainer, writer);
	    }
示例#60
0
 public BaseViewHelper(RequestContext requestContext, ViewContext viewContext, IViewDataContainer viewDataContainer)
     : this(requestContext, viewContext, viewDataContainer, RouteTable.Routes)
 {
 }