コード例 #1
0
        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));
        }
コード例 #2
0
        public void Add(IComponent component, string name)
        {
            if (component == null)
            {
                throw new ArgumentNullException("component");
            }

            AddedComponent addedComponent = new AddedComponent(component, name);

            addedComponents.Add(addedComponent);
        }