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); }