Esempio n. 1
0
 /// <summary>
 /// Adds the uiComponent.
 /// </summary>
 /// <param name="uiComponent">The uiComponent.</param>
 public void AddComponent(UIComponent uiComponent)
 {
     if (uiComponent == null)
     {
         throw new ArgumentNullException("uiComponent");
     }
     _componentsByType.Add(uiComponent.ComponentType, uiComponent);
     _componentsByName.Add(uiComponent.Name, uiComponent);
 }
Esempio n. 2
0
	    private void RegisterViewComponent()
		{
            UIComponentRepository repository = (UIComponentRepository)Kernel[typeof(UIComponentRepository)];

			if (_assembly != null)
			{
				Type[] types = _assembly.GetExportedTypes();
				
				foreach( Type type in types )
				{
                    // MasterPage / Web page / UserControl
                    if (typeof(IView).IsAssignableFrom(type))
                    {
                        UIComponent uiComponent = new UIComponent(type, Kernel);
                        repository.AddComponent(uiComponent);	
					}				
				}				
			}
		}