示例#1
0
            public override bool Equals(object o)
            {
                if (o == null || o.GetType() != typeof(ContainerRelationship))
                {
                    return(false);
                }
                ContainerRelationship r = (ContainerRelationship)o;

                return(r._parent == _parent && r._child == _child && r._relationship.Equals(_relationship));
            }
示例#2
0
        /// <summary>
        /// remove a parent child relationship
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="child"></param>
        /// <param name="relationship"></param>
        private void Remove(object parent, object child, string relationship)
        {
            if (Log.IsDebugEnabled)
            {
                Log.Debug("Container {0} - {1} as {2}", parent, child, relationship);
            }

            if (_listeners != null)
            {
                ContainerRelationship eventObject = new ContainerRelationship(this, parent, child, relationship);
                for (int i = 0; i < LazyList.Size(_listeners); i++)
                {
                    LazyList.Get <IContainerListener>(_listeners, i).Remove(eventObject);
                }
            }
        }
示例#3
0
        /// <summary>
        /// remove a parent child relationship
        /// </summary>
        /// <param name="parent"></param>
        /// <param name="child"></param>
        /// <param name="relationship"></param>
        private void Remove(object parent, object child, string relationship)
        {
            if (Log.IsDebugEnabled)
            {
                Log.Debug("Container {0} - {1} as {2}", parent, child, relationship);
            }

            if (_listeners!=null)
            {
                ContainerRelationship eventObject =new ContainerRelationship(this,parent,child,relationship);
                for (int i=0; i<LazyList.Size(_listeners); i++)
                {
                    LazyList.Get<IContainerListener>(_listeners, i).Remove(eventObject);
                }
            }
        }