Example #1
0
 /// <summary>
 /// Compares the Ids of two sensors for equality.
 /// </summary>
 /// <param name="OtherId">Another sensor Id.</param>
 /// <returns>True if equal, false otherwise.</returns>
 public Boolean Equals(TId OtherId)
 {
     return(InternalSensor.Equals(OtherId));
 }
Example #2
0
        public override bool Equals(object obj)
        {
            if (this == obj)
            {
                return(true);
            }
            if (obj == null)
            {
                return(false);
            }
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            Network other = (Network)obj;

            if (_isLearn != other._isLearn)
            {
                return(false);
            }
            if (_name == null)
            {
                if (other._name != null)
                {
                    return(false);
                }
            }
            else if (!_name.Equals(other._name))
            {
                return(false);
            }
            if (_parameters == null)
            {
                if (other._parameters != null)
                {
                    return(false);
                }
            }
            else if (!_parameters.Equals(other._parameters))
            {
                return(false);
            }
            if (_regions == null)
            {
                if (other._regions != null)
                {
                    return(false);
                }
            }
            else if (!_regions.SequenceEqual(other._regions))
            {
                return(false);
            }
            if (_sensor == null)
            {
                if (other._sensor != null)
                {
                    return(false);
                }
            }
            else if (!_sensor.Equals(other._sensor))
            {
                return(false);
            }
            return(true);
        }