Пример #1
0
        /// <summary cref="Object.MemberwiseClone" />
        public new object MemberwiseClone()
        {
            RegisteredNode clone = (RegisteredNode)base.MemberwiseClone();

            clone.m_nodeStatus           = (int)Utils.Clone(this.m_nodeStatus);
            clone.m_onlineContextNodeId  = (NodeId)Utils.Clone(this.m_onlineContextNodeId);
            clone.m_onlineDeviceNodeId   = (NodeId)Utils.Clone(this.m_onlineDeviceNodeId);
            clone.m_offlineContextNodeId = (NodeId)Utils.Clone(this.m_offlineContextNodeId);
            clone.m_offlineDeviceNodeId  = (NodeId)Utils.Clone(this.m_offlineDeviceNodeId);

            return(clone);
        }
Пример #2
0
        /// <summary cref="IEncodeable.IsEqual(IEncodeable)" />
        public virtual bool IsEqual(IEncodeable encodeable)
        {
            if (Object.ReferenceEquals(this, encodeable))
            {
                return(true);
            }

            RegisteredNode value = encodeable as RegisteredNode;

            if (value == null)
            {
                return(false);
            }

            if (!Utils.IsEqual(m_nodeStatus, value.m_nodeStatus))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_onlineContextNodeId, value.m_onlineContextNodeId))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_onlineDeviceNodeId, value.m_onlineDeviceNodeId))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_offlineContextNodeId, value.m_offlineContextNodeId))
            {
                return(false);
            }
            if (!Utils.IsEqual(m_offlineDeviceNodeId, value.m_offlineDeviceNodeId))
            {
                return(false);
            }

            return(true);
        }