Ejemplo n.º 1
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || this.GetType() != o.GetType())
            {
                return(false);
            }

            LearnerContextImpl that = ( LearnerContextImpl )o;

            if (_lastDeliveredInstanceId != that._lastDeliveredInstanceId)
            {
                return(false);
            }
            if (_lastLearnedInstanceId != that._lastLearnedInstanceId)
            {
                return(false);
            }
            if (_heartbeatContext != null ?!_heartbeatContext.Equals(that._heartbeatContext) : that._heartbeatContext != null)
            {
                return(false);
            }
            if (_instanceStore != null ?!_instanceStore.Equals(that._instanceStore) : that._instanceStore != null)
            {
                return(false);
            }
            return(_paxosInstances != null?_paxosInstances.Equals(that._paxosInstances) : that._paxosInstances == null);
        }
Ejemplo n.º 2
0
        public override bool Equals(object o)
        {
            if (this == o)
            {
                return(true);
            }
            if (o == null || this.GetType() != o.GetType())
            {
                return(false);
            }

            AcceptorContextImpl that = ( AcceptorContextImpl )o;

            return(_instanceStore != null?_instanceStore.Equals(that._instanceStore) : that._instanceStore == null);
        }