public override bool Equals(object obj)
        {
            CreatedComponent rhs = obj as CreatedComponent;

            if (rhs != null)
            {
                return(TypeName == rhs.TypeName && Name == rhs.Name);
            }
            return(base.Equals(obj));
        }
		public IComponent CreateComponent(Type componentClass, string name)
		{						
			object instance = componentClass.Assembly.CreateInstance(componentClass.FullName);
	
			if (rootComponent == null) {
				rootComponent = instance as IComponent;
			}
			
			CreatedComponent c = new CreatedComponent(componentClass.FullName, name, (IComponent)instance);
			createdComponents.Add(c);
			
			return (IComponent)instance;
		}
        public IComponent CreateComponent(Type componentClass, string name)
        {
            object instance = componentClass.Assembly.CreateInstance(componentClass.FullName);

            if (rootComponent == null)
            {
                rootComponent = instance as IComponent;
            }

            CreatedComponent c = new CreatedComponent(componentClass.FullName, name, (IComponent)instance);

            createdComponents.Add(c);

            return((IComponent)instance);
        }
		public void CreateComponent_CreateTextBox_TextBoxTypePassedToDesignerLoaderHostCreateComponentMethod()
		{
			BeginLoad();
			loader.CreateComponent(typeof(TextBox), "MyTextBox");
			CreatedComponent createdComponent = fakeDesignerLoaderHost.CreatedComponents[0];
			CreatedComponent expectedCreatedComponent = new CreatedComponent("System.Windows.Forms.TextBox", "MyTextBox");
			
			Assert.AreEqual(expectedCreatedComponent, createdComponent);
		}