public override bool Equals(object obj) { AddedComponent rhs = obj as AddedComponent; if (rhs != null) { return(Name == rhs.Name && Component == rhs.Component); } return(base.Equals(obj)); }
public void Add(IComponent component, string name) { if (component == null) { throw new ArgumentNullException("component"); } AddedComponent addedComponent = new AddedComponent(component, name); addedComponents.Add(addedComponent); }