예제 #1
0
        public static bool IsEqual(this PropertyCollection @this, PropertyCollection other)
        {
            if (!(@this != null &&
                  other != null &&
                  @this.IsReadOnly == other.IsReadOnly &&
                  @this.IsFixedSize == other.IsFixedSize &&
                  @this.IsSynchronized == other.IsSynchronized &&
                  @this.Keys.CheckSequenceEquals(other.Keys) &&
                  @this.Values.CheckSequenceEquals(other.Values) &&
                  @this.Count == other.Count))
            {
                return(false);
            }

            return(@this.CheckSequenceEquals(other));
        }
예제 #2
0
        public static void IsEqual(this PropertyCollection @this, PropertyCollection other, bool isSamePlatform)
        {
            if (@this == null && other == null)
            {
                return;
            }

            Assert.NotNull(@this);
            Assert.NotNull(other);
            Assert.Equal(@this.IsReadOnly, other.IsReadOnly);
            Assert.Equal(@this.IsFixedSize, other.IsFixedSize);
            Assert.Equal(@this.IsSynchronized, other.IsSynchronized);
            @this.Keys.CheckSequenceEquals(other.Keys, isSamePlatform);
            @this.Values.CheckSequenceEquals(other.Values, isSamePlatform);
            Assert.Equal(@this.Count, other.Count);
            @this.CheckSequenceEquals(other, isSamePlatform);
        }