当前位置: 首页>>代码示例>>C#>>正文


C# IViewDataContainer类代码示例

本文整理汇总了C#中IViewDataContainer的典型用法代码示例。如果您正苦于以下问题:C# IViewDataContainer类的具体用法?C# IViewDataContainer怎么用?C# IViewDataContainer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IViewDataContainer类属于命名空间,在下文中一共展示了IViewDataContainer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateHelper

 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer) {
     return new DisplayHelper(
         _displayManager,
         _shapeFactory,
         viewContext,
         viewDataContainer);
 }
开发者ID:anycall,项目名称:Orchard,代码行数:7,代码来源:DisplayHelperFactory.cs

示例2: BaseViewHelper

 public BaseViewHelper(RequestContext requestContext, ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
 {
     ViewData = new ViewDataDictionary(viewDataContainer.ViewData);
     RequestContext = requestContext;
     ViewContext = viewContext;
     RouteCollection = routeCollection;
 }
开发者ID:pleb,项目名称:Chillow,代码行数:7,代码来源:BaseViewHelper.cs

示例3: BaseViewHelper

        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;
        }
开发者ID:pleb,项目名称:Tank,代码行数:27,代码来源:BaseViewHelper.cs

示例4: CreateHelper

 public dynamic CreateHelper(ViewContext viewContext, IViewDataContainer viewDataContainer) {
     return ClayActivator.CreateInstance<DisplayHelper>(
         _behaviors,
         _displayManager,
         _shapeFactory,
         viewContext,
         viewDataContainer);
 }
开发者ID:sjbisch,项目名称:Orchard,代码行数:8,代码来源:DisplayHelperFactory.cs

示例5: VehicleHelperFixture

        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);
        }
开发者ID:PombeirP,项目名称:silkmod,代码行数:9,代码来源:VehicleHelperFixture.cs

示例6: DisplayHelper

 public DisplayHelper(
     IDisplayManager displayManager,
     IShapeFactory shapeFactory,
     ViewContext viewContext,
     IViewDataContainer viewDataContainer) {
     _displayManager = displayManager;
     _shapeFactory = shapeFactory;
     ViewContext = viewContext;
     ViewDataContainer = viewDataContainer;
 }
开发者ID:kanujhun,项目名称:orchard,代码行数:10,代码来源:DisplayHelper.cs

示例7: SyncViewAction

        public SyncViewAction(IView view, IViewDataContainer viewDataContainer)
        {
            if (view == null)
            {
                throw new InfrastructureException("The view cannot be null.");
            }

            this.view = view;

            this.viewDataContainer = viewDataContainer;
        }
开发者ID:daywrite,项目名称:EApp,代码行数:11,代码来源:SyncViewAction.cs

示例8: ResourceRegister

 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;
 }
开发者ID:RasterImage,项目名称:Orchard,代码行数:14,代码来源:ResourceRegister.cs

示例9: AjaxHelper

 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;
 }
开发者ID:nobled,项目名称:mono,代码行数:14,代码来源:AjaxHelper.cs

示例10: Build

		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;
		}
开发者ID:namics,项目名称:TerrificNet,代码行数:15,代码来源:MvcRenderingContext.cs

示例11: HtmlHelper

        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());
        }
开发者ID:nobled,项目名称:mono,代码行数:16,代码来源:HtmlHelper.cs

示例12: PluginHelper

 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;
 }
开发者ID:aozora,项目名称:arashi,代码行数:19,代码来源:PluginHelper.cs

示例13: FileRegistrationContext

        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);
        }
开发者ID:anycall,项目名称:Orchard,代码行数:20,代码来源:FileRegistrationContext.cs

示例14: ThunderHelper

        /// <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);
        }
开发者ID:randomjs,项目名称:thunder,代码行数:31,代码来源:ThunderHelper.cs

示例15: SquishItHelper

        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();
        }
开发者ID:dfaithen,项目名称:SquishIt.Contrib.Mvc,代码行数:24,代码来源:SquishItHelper.cs


注:本文中的IViewDataContainer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。