Ejemplo n.º 1
0
        public void Equal_Works()
        {
            var key = new AttributeKey();

            key.ReadFrom(Convert.FromBase64String("AC4AAAAAABcAAAAAABEAYwBvAG0ALgBhAHAAcABsAGUALgBkAGUAYwBtAHAAZgBz"), 0);

            var other = new AttributeKey();

            key.ReadFrom(Convert.FromBase64String("AC4AAAAAABcAAAAAABEAYwBvAG0ALgBhAHAAcABsAGUALgBkAGUAYwBtAHAAZgBz"), 0);

            Assert.True(key.Equals(key));
            Assert.False(other.Equals(key));
            Assert.False(key.Equals(other));
            Assert.False(key.Equals(null));
        }
        /// <inheritdoc/>
        public bool Equals(AttributeKey x, AttributeKey y)
        {
            if (x == null)
            {
                return(y == null);
            }

            return(x.Equals(y));
        }
        /// <inheritdoc/>
        public bool Equals(AttributeKey x, AttributeKey y)
        {
            if (x == null && y == null)
            {
                return(true);
            }
            else if (x == null || y == null)
            {
                return(false);
            }

            return(x.Equals(y));
        }
Ejemplo n.º 4
0
 public bool Equals(ReferenceType <TElement, TAttribute> other)
 {
     return(other != null && AttributeKey.Equals(other.AttributeKey));
 }