public void RenderControl(Control control ) { Type controlType = control.GetType(); if(renderersDictionary.ContainsKey(controlType)){ var renderer = renderersDictionary[controlType] as IControlRenderer; renderer.Render(context,control); } }