internal static bool Equals(Entity1 left, Entity1 right, bool shallow = false) { if (left == null && right == null) { return(true); } else if (left == null || right == null) { return(false); } else if (shallow) { return(left.ID == right.ID); } else { return (left.ID == right.ID && left.MyColorValue == right.MyColorValue && left.MyFlagsColorValue == right.MyFlagsColorValue && left.StringValue == right.StringValue && ODLMaterializerUnitTests.CompareCollection(left.MyFlagsColorCollection1, right.MyFlagsColorCollection1, (l, r) => (Entity2.Equals(l, r))) && left.DateTimeOffsetValue == right.DateTimeOffsetValue && ComplexValue1.Compare(left.ComplexValue1, right.ComplexValue1) && Entity2.Equals(left.SingleReference, right.SingleReference) && ODLMaterializerUnitTests.CompareCollection(left.ReferenceSet, right.ReferenceSet, (l, r) => (Entity2.Equals(l, r))) && Entity1.Equals(left.SelfReference, right.SelfReference, true)); } }
public bool Equals(TestInvalidPayloadEntity left, TestInvalidPayloadEntity right) { return(object.ReferenceEquals(left, right) || left != null && right != null && left.ID == right.ID && object.Equals(left.ComplexType, right.ComplexType) && ODLMaterializerUnitTests.CompareCollection(left.ComplexTypes, right.ComplexTypes, (l, r) => object.Equals(l, r))); }