Example #1
0
        /// <inheritdoc />
        public virtual int CompareTo(TinyType <T>?other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other), $"Cannot compare {this.GetType()} to null.");
            }

            return(this.Value.CompareTo(other.Value));
        }
Example #2
0
        /// <inheritdoc />
        public override int CompareTo(TinyType <string>?other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other), $"Cannot compare {this.GetType()} to null.");
            }

            return(this.comparer.Compare(this.Value, other.Value));
        }
Example #3
0
        /// <inheritdoc />
        public bool Equals(TinyType <T>?other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(this.Equals(other.Value));
        }