Inheritance: IViewComponentContext
Exemplo n.º 1
0
        public void RenderComponent(string componentName, IDictionary parameters)
        {
            var componentContext =
                new BrailViewComponentContext(this, null, componentName, OutputStream,
                                              new Hashtable(parameters, StringComparer.InvariantCultureIgnoreCase));

            AddViewComponentProperties(componentContext.ComponentParameters);
            var componentFactory = (IViewComponentFactory)context.GetService(typeof(IViewComponentFactory));
            var component        = componentFactory.Create(componentName);

            component.Init(context, componentContext);
            component.Render();
            if (componentContext.ViewToRender != null)
            {
                OutputSubView("/" + componentContext.ViewToRender, componentContext.ComponentParameters);
            }
            RemoveViewComponentProperties(componentContext.ComponentParameters);
        }
Exemplo n.º 2
0
		public void RenderComponent(string componentName, IDictionary parameters)
		{
			var componentContext =
				new BrailViewComponentContext(this, null, componentName, OutputStream,
				                              new Hashtable(parameters, StringComparer.InvariantCultureIgnoreCase));
			AddViewComponentProperties(componentContext.ComponentParameters);
			var componentFactory = (IViewComponentFactory) context.GetService(typeof(IViewComponentFactory));
			var component = componentFactory.Create(componentName);
			component.Init(context, componentContext);
			component.Render();
			if (componentContext.ViewToRender != null)
			{
				OutputSubView("/" + componentContext.ViewToRender, componentContext.ComponentParameters);
			}
			RemoveViewComponentProperties(componentContext.ComponentParameters);
		}