/// <summary> /// Determines if two DTOs are equivalent. /// </summary> public override bool IsEquivalentTo(KitchenSinkDto other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(Matrix, other.Matrix) && ServiceDataUtility.AreEquivalentFieldValues(Crazy, other.Crazy) && OldField == other.OldField); }
/// <summary> /// Determines if two DTOs are equivalent. /// </summary> public override bool IsEquivalentTo(PreferenceDto other) { return(other != null && IsBoolean == other.IsBoolean && ServiceDataUtility.AreEquivalentFieldValues(Booleans, other.Booleans) && Double == other.Double && ServiceDataUtility.AreEquivalentFieldValues(Doubles, other.Doubles) && Integer == other.Integer && ServiceDataUtility.AreEquivalentFieldValues(Integers, other.Integers) && String == other.String && ServiceDataUtility.AreEquivalentFieldValues(Strings, other.Strings) && ServiceDataUtility.AreEquivalentBytes(Bytes, other.Bytes) && ServiceDataUtility.AreEquivalentFieldValues(Byteses, other.Byteses) && WidgetField == other.WidgetField && ServiceDataUtility.AreEquivalentFieldValues(WidgetFields, other.WidgetFields) && ServiceDataUtility.AreEquivalentDtos(Widget, other.Widget) && ServiceDataUtility.AreEquivalentFieldValues(Widgets, other.Widgets) && ServiceDataUtility.AreEquivalentResults(Result, other.Result) && ServiceDataUtility.AreEquivalentFieldValues(Results, other.Results) && BigInteger == other.BigInteger && ServiceDataUtility.AreEquivalentFieldValues(BigIntegers, other.BigIntegers) && Decimal == other.Decimal && ServiceDataUtility.AreEquivalentFieldValues(Decimals, other.Decimals) && ServiceDataUtility.AreEquivalentDtos(Error, other.Error) && ServiceDataUtility.AreEquivalentFieldValues(Errors, other.Errors) && ServiceDataUtility.AreEquivalentObjects(Object, other.Object) && ServiceDataUtility.AreEquivalentFieldValues(Objects, other.Objects) && ServiceDataUtility.AreEquivalentFieldValues(NamedStrings, other.NamedStrings) && ServiceDataUtility.AreEquivalentFieldValues(NamedWidgets, other.NamedWidgets)); }
public void KitchenSinkEquivalence() { var innerArray = new[] { "bar", "baz" }; var response1 = new KitchenRequestDto { Sink = new KitchenSinkDto { Matrix = new[] { new[] { new[] { 1, 2 }, new[] { 3, 4 } }, new[] { new[] { 5, 6 }, new[] { 7, 8 } } }, Crazy = new[] { ServiceResult.Success <IReadOnlyList <IReadOnlyDictionary <string, IReadOnlyList <string> > > >(new[] { (IReadOnlyDictionary <string, IReadOnlyList <string> >) new Dictionary <string, IReadOnlyList <string> > { ["foo"] = innerArray }, }), }, }, }; var response2 = ServiceDataUtility.Clone(response1); ServiceDataUtility.AreEquivalentFieldValues(response1, response2).Should().BeTrue(); innerArray[1] = "xyzzy"; ServiceDataUtility.AreEquivalentFieldValues(response1, response2).Should().BeFalse(); }
/// <summary> /// Determines if two DTOs are equivalent. /// </summary> public override bool IsEquivalentTo(EditWidgetRequestDto other) { return(other != null && Id == other.Id && ServiceDataUtility.AreEquivalentFieldValues(Ops, other.Ops) && Weight == other.Weight); }
/// <summary> /// Determines if two DTOs are equivalent. /// </summary> public override bool IsEquivalentTo(GetWidgetsResponseDto other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(Widgets, other.Widgets) && Total == other.Total && TotalWeight == other.TotalWeight && ServiceDataUtility.AreEquivalentDtos(Job, other.Job)); }
public override bool IsEquivalentTo(ValueDto?other) { return(other != null && BooleanValue == other.BooleanValue && StringValue == other.StringValue && ServiceDataUtility.AreEquivalentFieldValues(ErrorArrayValue, other.ErrorArrayValue) && ServiceDataUtility.AreEquivalentFieldValues(BooleanMapValue, other.BooleanMapValue) && ServiceDataUtility.AreEquivalentFieldValues(ErrorMapValue, other.ErrorMapValue)); }
internal override bool IsInternalValueEquivalent(ServiceResult other) { var otherOfT = other as ServiceResult <T>; if (otherOfT == null) { return(false); } return(ServiceDataUtility.AreEquivalentFieldValues(m_value, otherOfT.m_value)); }
public override bool IsEquivalentTo(RequiredRequestDto?other) { return(other != null && Query == other.Query && Normal == other.Normal && ServiceDataUtility.AreEquivalentDtos(Widget, other.Widget) && ServiceDataUtility.AreEquivalentFieldValues(Widgets, other.Widgets) && ServiceDataUtility.AreEquivalentFieldValues(WidgetMatrix, other.WidgetMatrix) && ServiceDataUtility.AreEquivalentResults(WidgetResult, other.WidgetResult) && ServiceDataUtility.AreEquivalentFieldValues(WidgetResults, other.WidgetResults) && ServiceDataUtility.AreEquivalentFieldValues(WidgetMap, other.WidgetMap) && ServiceDataUtility.AreEquivalentDtos(HasWidget, other.HasWidget)); }
public override bool IsEquivalentTo(AnyArrayDto?other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(String, other.String) && ServiceDataUtility.AreEquivalentFieldValues(Boolean, other.Boolean) && ServiceDataUtility.AreEquivalentFieldValues(Double, other.Double) && ServiceDataUtility.AreEquivalentFieldValues(Int32, other.Int32) && ServiceDataUtility.AreEquivalentFieldValues(Int64, other.Int64) && ServiceDataUtility.AreEquivalentFieldValues(Decimal, other.Decimal) && ServiceDataUtility.AreEquivalentFieldValues(Bytes, other.Bytes) && ServiceDataUtility.AreEquivalentFieldValues(Object, other.Object) && ServiceDataUtility.AreEquivalentFieldValues(Error, other.Error) && ServiceDataUtility.AreEquivalentFieldValues(Data, other.Data) && ServiceDataUtility.AreEquivalentFieldValues(Enum, other.Enum) && ServiceDataUtility.AreEquivalentFieldValues(Array, other.Array) && ServiceDataUtility.AreEquivalentFieldValues(Map, other.Map) && ServiceDataUtility.AreEquivalentFieldValues(Result, other.Result)); }
public override bool IsEquivalentTo(GetWidgetBatchRequestDto?other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(Ids, other.Ids)); }
public override bool IsEquivalentTo(GenerateResponseDto?other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(Output, other.Output) && ServiceDataUtility.AreEquivalentDtos(Failure, other.Failure)); }
public override bool IsEquivalentTo(MirrorFieldsResponseDto?other) { return(other != null && ServiceDataUtility.AreEquivalentDtos(Field, other.Field) && ServiceDataUtility.AreEquivalentFieldValues(Matrix, other.Matrix)); }
/// <summary> /// Determines if two DTOs are equivalent. /// </summary> public override bool IsEquivalentTo(GetWidgetBatchResponseDto other) { return(other != null && ServiceDataUtility.AreEquivalentFieldValues(Results, other.Results)); }