示例#1
0
        /// <summary>
        /// Returns a value indicating whether this instance is equal to a specified partition key.
        /// </summary>
        /// <param name="other">A partition key value to compare to this instance.</param>
        /// <returns>true if <paramref name="other"/> has the same value as this instance; otherwise, false.</returns>
        public bool Equals(PartitionKey other)
        {
            PartitionKeyInternal partitionKeyInternal      = this.InternalKey;
            PartitionKeyInternal otherPartitionKeyInternal = other.InternalKey;

            if (partitionKeyInternal == null)
            {
                partitionKeyInternal = PartitionKey.NullPartitionKeyInternal;
            }

            if (otherPartitionKeyInternal == null)
            {
                otherPartitionKeyInternal = PartitionKey.NullPartitionKeyInternal;
            }

            return(partitionKeyInternal.Equals(otherPartitionKeyInternal));
        }