Esempio n. 1
0
        public override bool IsExactly(IDeepComparable other)
        {
            if (other == null) throw Error.ArgumentNull(nameof(other));

            if (this.GetType() != other.GetType()) return false;

            if (!base.Matches(other)) return false;

            return Object.Equals(ObjectValue, ((Primitive)other).ObjectValue);
        }
Esempio n. 2
0
        public override bool IsExactly(IDeepComparable other)
        {
            if (other == null)
            {
                throw Error.ArgumentNull("other");
            }

            if (this.GetType() != other.GetType())
            {
                return(false);
            }

            if (!base.Matches(other))
            {
                return(false);
            }

            return(Object.Equals(ObjectValue, ((Primitive)other).ObjectValue));
        }
Esempio n. 3
0
        public override bool IsExactly(IDeepComparable other)
        {
            if (other == null)
            {
                throw Error.ArgumentNull(nameof(other));
            }

            if (this.GetType() != other.GetType())
            {
                return(false);
            }

            if (!base.IsExactly(other))
            {
                return(false);
            }

            var otherValue = ((Primitive)other).ObjectValue;

            if (ObjectValue is byte[] bytes && otherValue is byte[] bytesOther)
            {
                return(Enumerable.SequenceEqual(bytes, bytesOther));
            }