public static bool IsEqual(this ArraySegment <int> @this, ArraySegment <int> other) { if (!((@this.Array != null) == (other.Array != null) && @this.Count == other.Count && @this.Offset == other.Offset)) { return(false); } return(@this.Array == null || BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this CookieCollection @this, CookieCollection other) { if (!(@this != null && other != null && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this ObjectWithArrays @this, ObjectWithArrays other) { return(@this != null && other != null && BinaryFormatterTests.CheckEquals(@this.IntArray, other.IntArray) && BinaryFormatterTests.CheckEquals(@this.StringArray, other.StringArray) && BinaryFormatterTests.CheckEquals(@this.TreeArray, other.TreeArray) && BinaryFormatterTests.CheckEquals(@this.ByteArray, other.ByteArray) && BinaryFormatterTests.CheckEquals(@this.JaggedArray, other.JaggedArray) && BinaryFormatterTests.CheckEquals(@this.MultiDimensionalArray, other.MultiDimensionalArray)); }
public static bool IsEqual(this ReadOnlyObservableCollection <int> @this, ReadOnlyObservableCollection <int> other) { if (!(@this != null && other != null && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this LinkedListNode <Point> @this, LinkedListNode <Point> other) { if (@this == null && other == null) { return(true); } return(@this != null && other != null && BinaryFormatterTests.CheckEquals(@this.Value, other.Value)); }
public static bool IsEqual(this Stack <Point> @this, Stack <Point> other) { if (!(@this != null && other != null && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this HashSet <Point> @this, HashSet <Point> other) { if (!(@this != null && other != null && @this.Count == other.Count && BinaryFormatterTests.CheckEquals(@this.Comparer, other.Comparer))) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this SimpleKeyedCollection @this, SimpleKeyedCollection other) { if (!(@this != null && other != null && @this.Comparer.Equals(other.Comparer) && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this Stack @this, Stack other) { if (!(@this != null && other != null && @this.Count == other.Count && @this.IsSynchronized == other.IsSynchronized)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this LinkedList <Point> @this, LinkedList <Point> other) { if (!(@this != null && other != null && @this.Count == other.Count && IsEqual(@this.First, other.First) && IsEqual(@this.Last, other.Last))) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this DataSet @this, DataSet other) { return(@this != null && @other != null && @this.DataSetName == other.DataSetName && @this.Namespace == other.Namespace && @this.Prefix == other.Prefix && @this.CaseSensitive == other.CaseSensitive && @this.Locale.LCID == other.Locale.LCID && @this.EnforceConstraints == other.EnforceConstraints && @this.ExtendedProperties?.Count == other.ExtendedProperties?.Count && BinaryFormatterTests.CheckEquals(@this.ExtendedProperties, other.ExtendedProperties)); }
public static bool IsEqual(this BitArray @this, BitArray other) { if (!(@this != null && other != null && @this.Length == other.Length && @this.Count == other.Count && @this.IsReadOnly == other.IsReadOnly && @this.IsSynchronized == other.IsSynchronized)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this SortedList <int, Point> @this, SortedList <int, Point> other) { if (!(@this != null && other != null && @this.Capacity == other.Capacity && BinaryFormatterTests.CheckEquals(@this.Comparer, other.Comparer) && @this.Count == other.Count && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys) && BinaryFormatterTests.CheckSequenceEquals(@this.Values, other.Values))) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this Exception @this, Exception other) { return(@this != null && other != null && // On full framework, line number may be method body start (PlatformDetection.IsFullFramework ? true : (@this.StackTrace == other.StackTrace && @this.ToString() == other.ToString())) && BinaryFormatterTests.CheckSequenceEquals(@this.Data, other.Data) && @this.Message == other.Message && @this.Source == other.Source && @this.HResult == other.HResult && @this.HelpLink == other.HelpLink && BinaryFormatterTests.CheckEquals(@this.InnerException, other.InnerException)); }
public static bool IsEqual(this BindingList <Point> @this, BindingList <Point> other) { if (!(@this != null && other != null && @this.RaiseListChangedEvents == other.RaiseListChangedEvents && @this.AllowNew == other.AllowNew && @this.AllowEdit == other.AllowEdit && @this.AllowRemove == other.AllowRemove && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
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 && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys) && BinaryFormatterTests.CheckSequenceEquals(@this.Values, other.Values) && @this.Count == other.Count)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this SortedList @this, SortedList other) { if (!(@this != null && other != null && @this.Capacity == other.Capacity && @this.Count == other.Count && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys) && BinaryFormatterTests.CheckSequenceEquals(@this.Values, other.Values) && @this.IsReadOnly == other.IsReadOnly && @this.IsFixedSize == other.IsFixedSize && @this.IsSynchronized == other.IsSynchronized)) { return(false); } return(BinaryFormatterTests.CheckSequenceEquals(@this, other)); }
public static bool IsEqual(this ReadOnlyDictionary <int, string> @this, ReadOnlyDictionary <int, string> other) { if (!(@this != null && other != null && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys) && BinaryFormatterTests.CheckSequenceEquals(@this.Values, other.Values) && @this.Count == other.Count)) { return(false); } foreach (var kv in @this) { if (kv.Value != other[kv.Key]) { return(false); } } return(true); }
public static bool IsEqual(this Graph <int> @this, Graph <int> other) { var thisFlattened = FlattenGraph(@this); var otherFlattened = FlattenGraph(other); if (thisFlattened.Item1.Count != otherFlattened.Item1.Count || thisFlattened.Item2.Count != otherFlattened.Item2.Count) { return(false); } for (int i = 0; i < thisFlattened.Item1.Count; i++) { if (thisFlattened.Item1[i].Value != otherFlattened.Item1[i].Value) { return(false); } } return(BinaryFormatterTests.CheckEquals(thisFlattened.Item2, otherFlattened.Item2)); }
public static bool IsEqual(this Cookie @this, Cookie other) { return(@this != null && other != null && @this.Comment == other.Comment && IsEqual(@this.CommentUri, other.CommentUri) && @this.HttpOnly == other.HttpOnly && @this.Discard == other.Discard && @this.Domain == other.Domain && @this.Expired == other.Expired && BinaryFormatterTests.CheckEquals(@this.Expires, other.Expires) && @this.Name == other.Name && @this.Path == other.Path && @this.Port == other.Port && @this.Secure == other.Secure && // This needs to have m_Timestamp set by reflection in order to roundtrip correctly // otherwise this field will change each time you create an object and cause this to fail BinaryFormatterTests.CheckEquals(@this.TimeStamp, other.TimeStamp) && @this.Value == other.Value && @this.Version == other.Version); }
public static bool IsEqual(this NameValueCollection @this, NameValueCollection other) { if (!(@this != null && other != null && BinaryFormatterTests.CheckSequenceEquals(@this.AllKeys, other.AllKeys) && @this.Count == other.Count && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys))) { return(false); } foreach (var key in @this.AllKeys) { if (!BinaryFormatterTests.CheckEquals(@this[key], other[key])) { return(false); } } return(true); }
public static bool IsEqual(this OrderedDictionary @this, OrderedDictionary other) { if (!(@this != null && other != null && @this.Count == other.Count && @this.IsReadOnly == other.IsReadOnly && BinaryFormatterTests.CheckEquals(@this.Keys, other.Keys) && BinaryFormatterTests.CheckEquals(@this.Values, other.Values))) { return(false); } foreach (var key in @this.Keys) { if (!BinaryFormatterTests.CheckEquals(@this[key], other[key])) { return(false); } } return(true); }
public static bool IsEqual(this ArrayList @this, ArrayList other) { if (!(@this != null && other != null && @this.Capacity == other.Capacity && @this.Count == other.Count && @this.IsFixedSize == other.IsFixedSize && @this.IsReadOnly == other.IsReadOnly && @this.IsSynchronized == other.IsSynchronized)) { return(false); } for (int i = 0; i < @this.Count; i++) { if (!BinaryFormatterTests.CheckEquals(@this[i], other[i])) { return(false); } } return(true); }
public static bool IsEqual(this ListDictionary @this, ListDictionary other) { if (!(@this != null && other != null && @this.Count == other.Count && BinaryFormatterTests.CheckSequenceEquals(@this.Keys, other.Keys) && @this.IsReadOnly == other.IsReadOnly && @this.IsFixedSize == other.IsFixedSize && @this.IsSynchronized == other.IsSynchronized && BinaryFormatterTests.CheckSequenceEquals(@this.Values, other.Values))) { return(false); } foreach (var key in @this.Keys) { if (!BinaryFormatterTests.CheckEquals(@this[key], other[key])) { return(false); } } return(true); }
public static bool IsEqual(this AggregateException @this, AggregateException other) { return(IsEqual(@this as Exception, other as Exception) && BinaryFormatterTests.CheckSequenceEquals(@this.InnerExceptions, other.InnerExceptions)); }