-
-
Notifications
You must be signed in to change notification settings - Fork 194
/
ComparisonConfig.cs
689 lines (613 loc) · 26.1 KB
/
ComparisonConfig.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
using System;
using System.Collections.Generic;
using KellermanSoftware.CompareNetObjects.TypeComparers;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
#if !NETSTANDARD
using System.Runtime.Serialization;
#endif
namespace KellermanSoftware.CompareNetObjects
{
/// <summary>
/// Configuration
/// </summary>
#if !NETSTANDARD
[DataContract]
#endif
public class ComparisonConfig
{
#region Class Variables
private Action<Difference> _differenceCallback;
private int _maxStructDepth;
#endregion
#region Constructors
/// <summary>
/// Default Constructor
/// </summary>
public ComparisonConfig()
{
Reset();
}
#endregion
#region Properties
internal HashSet<Type> AttributesToIgnoreSet { get; set; }
internal HashSet<string> MembersToIgnoreSet { get; set; }
internal HashSet<string> MembersToIncludeSet { get; set; }
internal HashSet<Type> ClassTypesToIgnoreSet { get; set; }
internal HashSet<Type> ClassTypesToIncludeSet { get; set; }
internal HashSet<Type> TypesToIgnoreSet { get; set; }
internal HashSet<Type> TypesToIncludeSet { get; set; }
internal HashSet<Type> RequiredAttributesToCompareSet { get; set; }
/// <summary>
/// By default Compare .NET Objects uses reference equal to identify objects.
/// Versions 4.61 and older used the hash code. Setting this to true will identify objects by hash code instead of reference equals.
/// The default is false
/// </summary>
public bool UseHashCodeIdentifier { get; set; }
/// <summary>
/// When comparing strings or StringBuilder types, perform a case sensitive comparison. The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CaseSensitive { get; set; }
/// <summary>
/// Ignore exceptions when objects are disposed
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreObjectDisposedException { get; set; }
/// <summary>
/// Ignore millisecond differences between DateTime values or DateTimeOffset values. The default is 0 (any time difference will be shown).
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public int MaxMillisecondsDateDifference { get; set; }
/// <summary>
/// When comparing DateTimeOffsets, offsets will be compared as well as the UtcDateTimes. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareDateTimeOffsetWithOffsets { get; set; }
/// <summary>
/// When comparing DateTimeOffsets, timezone difference will be ignored by changing both object to their UTC equivalent value. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreDateTimeOffsetTimezones { get; set; }
/// <summary>
/// When comparing struct, the depth to compare for children. The default is 2, the max is 5
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public int MaxStructDepth
{
get { return _maxStructDepth; }
set
{
if (value < 1 || value > 5)
{
throw new ArgumentOutOfRangeException("MaxStructDepth", "Cannot be less than 1 or greater than 5");
}
_maxStructDepth = value;
}
}
/// <summary>
/// If true, unknown object types will be ignored instead of throwing an exception. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreUnknownObjectTypes { get; set; }
/// <summary>
/// If true, invalid indexers will be skipped. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool SkipInvalidIndexers { get; set; }
/// <summary>
/// If a class implements an interface then only members of the interface will be compared. The default is all members are compared.
/// </summary>
public List<Type> InterfaceMembers { get; set; }
#if !NETSTANDARD
[DataMember(Name = "InterfaceMembers")]
private List<string> InterfaceMembersSerializer
{
get { return TypeHelper.ListOfTypesSerializer(InterfaceMembers);}
set { InterfaceMembers = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// Show breadcrumb at each stage of the comparision. The default is false.
/// This is useful for debugging deep object graphs.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool ShowBreadcrumb { get; set; }
/// <summary>
/// A list of class types to be ignored in the comparison. The default is to compare all class types.
/// </summary>
public List<Type> ClassTypesToIgnore { get; set; }
#if !NETSTANDARD
[DataMember(Name = "ClassTypesToIgnore")]
private List<string> ClassTypesToIgnoreSerializer
{
get { return TypeHelper.ListOfTypesSerializer(ClassTypesToIgnore); }
set { ClassTypesToIgnore = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// Only these class types will be compared. The default is to compare all class types.
/// </summary>
/// <remarks>If you specify a class type here no other class types will be compared unless it is in this list.</remarks>
public List<Type> ClassTypesToInclude { get; set; }
#if !NETSTANDARD
[DataMember(Name = "ClassTypesToInclude")]
private List<string> ClassTypesToIncludeSerializer
{
get { return TypeHelper.ListOfTypesSerializer(ClassTypesToInclude); }
set { ClassTypesToInclude = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// A list of types to be ignored in the comparison. The default is to compare all types. A typical thing to not compare are GUIDs
/// </summary>
public List<Type> TypesToIgnore { get; set; }
#if !NETSTANDARD
[DataMember(Name = "TypesToIgnore")]
private List<string> TypesToIgnoreSerializer
{
get { return TypeHelper.ListOfTypesSerializer(TypesToIgnore); }
set { TypesToIgnore = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// Only these types will be compared. The default is to compare all types.
/// </summary>
/// <remarks>If you specify a type here no others will be compared unless it is in this list. You must specify ALL Types that you want to compare.</remarks>
public List<Type> TypesToInclude { get; set; }
#if !NETSTANDARD
[DataMember(Name = "TypesToInclude")]
private List<string> TypesToIncludeSerializer
{
get { return TypeHelper.ListOfTypesSerializer(TypesToInclude); }
set { TypesToInclude = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// Ignore Data Table Names, Data Table Column Names, properties, or fields by name during the comparison. Case sensitive. The default is to compare all members.
/// </summary>
/// <example>MembersToIgnore.Add("CreditCardNumber");
/// MembersToIgnore.Add("Invoice.InvoiceGuid");
/// MembersToIgnore.Add("*Id");
/// </example>
#if !NETSTANDARD
[DataMember]
#endif
public List<string> MembersToIgnore { get ; set; }
/// <summary>
/// Ignore property during the comparison. Property is specific to the generic type.
/// </summary>
/// <param name="ignoredProperty"></param>
/// <typeparam name="TClass"></typeparam>
/// <exception cref="ArgumentException"></exception>
/// <example>IgnoreProperty<Person>(x => x.Name)</example>
public void IgnoreProperty<TClass>(Expression<Func<TClass, object>> ignoredProperty)
{
LambdaExpression lambda = ignoredProperty;
MemberExpression memberExpression;
if (lambda.Body is UnaryExpression unaryExpression)
{
memberExpression = unaryExpression.Operand as MemberExpression ??
// catches methods, maybe other things
throw new ArgumentException(
$"IgnoreProperty can only be used with properties. {ignoredProperty} is not a property.");
}
else
{
memberExpression = (MemberExpression) lambda.Body;
}
var propInfo = memberExpression.Member as PropertyInfo;
if (propInfo == null)
// catches fields, maybe other things
{
throw new ArgumentException($"IgnoreProperty can only be used with properties. {ignoredProperty} is not a property.");
}
var name = propInfo.Name;
MembersToIgnore.Add(typeof(TClass).Name + "." + name);
}
/// <summary>
/// Define a Custom Property Comparer using a lambda expression
/// </summary>
/// <typeparam name="TClass"></typeparam>
/// <param name="customProperty"></param>
/// <param name="validator"></param>
public void CustomPropertyComparer<TClass>(Expression<Func<TClass, object>> customProperty, BaseTypeComparer validator)
{
LambdaExpression lambda = customProperty;
MemberExpression memberExpression;
if (lambda.Body is UnaryExpression unaryExpression)
{
memberExpression = unaryExpression.Operand as MemberExpression ??
// catches methods, maybe other things
throw new ArgumentException(
$"Custom property comparer can only be used with properties. {customProperty} is not a property.");
}
else
{
memberExpression = (MemberExpression)lambda.Body;
}
var propInfo = memberExpression.Member as PropertyInfo;
if (propInfo == null)
// catches fields, maybe other things
{
throw new ArgumentException($"Custom property comparer can only be used with properties. {customProperty} is not a property.");
}
var name = propInfo.Name;
CustomPropertyComparers.Add(typeof(TClass).Name + "." + name, validator);
}
/// <summary>
/// Only compare elements by name for Data Table Names, Data Table Column Names, properties and fields. Case sensitive. The default is to compare all members.
/// </summary>
/// <example>MembersToInclude.Add("FirstName")</example>
#if !NETSTANDARD
[DataMember]
#endif
public List<string> MembersToInclude { get; set; }
#if !NETSTANDARD1_3
/// <summary>
/// If true, private properties and fields will be compared. The default is false. Silverlight and WinRT restricts access to private variables.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool ComparePrivateProperties { get; set; }
#endif
#if !NETSTANDARD1_3
/// <summary>
/// If true, private fields will be compared. The default is false. Silverlight and WinRT restricts access to private variables.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool ComparePrivateFields { get; set; }
#endif
#if !NETSTANDARD1_3
/// <summary>
/// If true and <see cref="ComparePrivateFields"/> true, then backing fields will be compared. The default is true. Silverlight and WinRT restricts access to private variables.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareBackingFields { get; set; }
#endif
/// <summary>
/// If true, static properties will be compared. The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareStaticProperties { get; set; }
/// <summary>
/// If true, static fields will be compared. The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareStaticFields { get; set; }
/// <summary>
/// If true, child objects will be compared. The default is true.
/// If false, and a list or array is compared list items will be compared but not their children.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareChildren { get; set; }
/// <summary>
/// If true, compare read only properties (only the getter is implemented). The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareReadOnly { get; set; }
/// <summary>
/// If true, compare fields of a class (see also CompareProperties). The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareFields { get; set; }
/// <summary>
/// If true, compare each item within a collection to every item in the other. The default is false. WARNING: setting this to true significantly impacts performance.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreCollectionOrder { get; set; }
/// <summary>
/// If true, breadcrumb shows the name of the key for each item in a collection. If false, will only show the key value. Default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool ShowCollectionKeyName { get; set; }
/// <summary>
/// If true, compare properties of a class (see also CompareFields). The default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool CompareProperties { get; set; }
/// <summary>
/// The maximum number of differences to detect. The default is 1 for performance reasons.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public int MaxDifferences { get; set; }
/// <summary>
/// The maximum number of differences to detect when comparing byte arrays. The default is 1.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public int MaxByteArrayDifferences { get; set; }
/// <summary>
/// Reflection properties and fields are cached. By default this cache is cleared after each compare. Set to false to keep the cache for multiple compares.
/// </summary>
/// <seealso cref="Caching"/>
#if !NETSTANDARD
[DataMember]
#endif
public bool AutoClearCache { get; set; }
/// <summary>
/// By default properties and fields for types are cached for each compare. By default this cache is cleared after each compare.
/// </summary>
/// <seealso cref="AutoClearCache"/>
#if !NETSTANDARD
[DataMember]
#endif
public bool Caching { get; set; }
/// <summary>
/// A list of attributes to ignore a class, property or field
/// </summary>
/// <example>AttributesToIgnore.Add(typeof(XmlIgnoreAttribute));</example>
public List<Type> AttributesToIgnore { get; set; }
#if !NETSTANDARD
[DataMember(Name = "AttributesToIgnore")]
private List<string> AttributesToIgnoreSerializer
{
get { return TypeHelper.ListOfTypesSerializer(AttributesToIgnore); }
set { AttributesToIgnore = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// If a property or field don't have at least one of the attributes in this list, it will be ignored
/// </summary>
/// <example>RequiredAttributesToCompare.Add(typeof(XmlIgnoreAttribute));</example>
public List<Type> RequiredAttributesToCompare { get; set; }
#if !NETSTANDARD
[DataMember(Name = "RequiredAttributesToCompare")]
private List<string> RequiredAttributesToCompareSerializer
{
get { return TypeHelper.ListOfTypesSerializer(RequiredAttributesToCompare); }
set { RequiredAttributesToCompare = TypeHelper.ListOfTypesDeserializer(value); }
}
#endif
/// <summary>
/// If true, objects will be compared ignore their type diferences. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreObjectTypes { get; set; }
/// <summary>
/// In the differences string, this is the name for expected name. The default is: Expected
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public string ExpectedName { get; set; }
/// <summary>
/// In the differences string, this is the name for the actual name. The default is: Actual
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public string ActualName { get; set; }
/// <summary>
/// Callback invoked each time the comparer finds a difference. The default is no call back.
/// </summary>
public Action<Difference> DifferenceCallback
{
get { return _differenceCallback; }
set
{
if (null != value)
{
_differenceCallback = value;
}
}
}
/// <summary>
/// This property is used when IgnoreCollectionOrder is set to true, otherwise it has no effect.
/// Sometimes one wants to match items between collections by some key first, and then
/// compare the matched objects. Without this, the comparer basically says there is no
/// match in collection B for any given item in collection A that doesn't Compare with a result of true.
/// The results of this aren't particularly useful for object graphs that are mostly the same, but not quite.
/// Enter CollectionMatchingSpec
///
/// The enumerable strings should be property (not field, for now, to keep it simple) names of the
/// Type when encountered that will be used for matching
///
/// You can use complex type properties, too, as part of the key to match. To match on all props/fields on
/// such a matching key, Don't set this property (default comparer behavior)
/// NOTE: types are looked up as exact. e.g. if foo is an entry in the dictionary and bar is a
/// sub-class of foo, upon encountering a bar type, the comparer will not find the entry of foo.
/// It can use derived types: https://github.com/GregFinzer/Compare-Net-Objects/issues/280
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public Dictionary<Type, IEnumerable<string>> CollectionMatchingSpec { get; set; }
/// <summary>
/// A list of custom comparers that take priority over the built in comparers
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public List<BaseTypeComparer> CustomComparers { get; set; }
/// <summary>
/// A list of custom property comparers that take priority over the built in and type comparers
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public Dictionary<string, BaseTypeComparer> CustomPropertyComparers { get; set; }
/// <summary>
/// If true, string.empty and null will be treated as equal for Strings and String Builder. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool TreatStringEmptyAndNullTheSame { get; set; }
/// <summary>
/// If true, leading and trailing whitespaces will be ignored for Strings and String Builder. The default is false.
/// </summary>
#if !DNCORE
[DataMember]
#endif
public bool IgnoreStringLeadingTrailingWhitespace { get; set; }
/// <summary>
/// The precision to compare double values. The default is 0.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public double DoublePrecision { get; set; }
/// <summary>
/// The precision to compare decimal values. The default is 0.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public decimal DecimalPrecision { get; set; }
/// <summary>
/// When comparing Fields and Properties the types have to be the same. If IgnoreConcretTypes is true then they will be ignored. The default is false.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreConcreteTypes { get; set; }
/// <summary>
/// If true, properties that are defined in the actual object but missing in the expected object will not be flagged as differences. Default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreMissingProperties { get; set; }
/// <summary>
/// If true, fields that are defined in the actual object but missing in the expected object will not be flagged as differences. Default is true.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public bool IgnoreMissingFields { get; set; }
/// <summary>
/// Specify a DateTimeKind to use when it is unspecified. The default is DateTimeKind.Utc. If null is specified it will not be defaulted.
/// </summary>
#if !NETSTANDARD
[DataMember]
#endif
public DateTimeKind? DateTimeKindToUseWhenUnspecified { get; set; }
#endregion
#region Methods
//These hash sets are used for performance
internal void PopulateHashSets()
{
AttributesToIgnoreSet = new HashSet<Type>((AttributesToIgnore ?? new List<Type>()).Distinct());
MembersToIgnoreSet = new HashSet<String>((MembersToIgnore ?? new List<String>()).Distinct());
MembersToIncludeSet = new HashSet<String>((MembersToInclude ?? new List<String>()).Distinct());
ClassTypesToIgnoreSet = new HashSet<Type>((ClassTypesToIgnore ?? new List<Type>()).Distinct());
ClassTypesToIncludeSet = new HashSet<Type>((ClassTypesToInclude ?? new List<Type>()).Distinct());
TypesToIgnoreSet = new HashSet<Type>((TypesToIgnore ?? new List<Type>()).Distinct());
TypesToIncludeSet = new HashSet<Type>((TypesToInclude ?? new List<Type>()).Distinct());
RequiredAttributesToCompareSet = new HashSet<Type>((RequiredAttributesToCompare ?? new List<Type>()).Distinct());
}
/// <summary>
/// Backing member that supports <see cref="HasWildcardMembersToExclude"/>
/// </summary>
private bool? _hasWildcardInMembersToIgnore;
/// <summary>
/// Computed value of whether or not exclusion list has wildcards.
/// </summary>
public bool HasWildcardMembersToExclude()
{
if (_hasWildcardInMembersToIgnore.HasValue)
{
return _hasWildcardInMembersToIgnore.Value;
}
_hasWildcardInMembersToIgnore = MembersToIgnoreSet.Any(x => x.IndexOf("*") > -1);
return _hasWildcardInMembersToIgnore.Value;
}
/// <summary>
/// Reset the configuration to the default values
/// </summary>
public void Reset()
{
AttributesToIgnore = new List<Type>();
RequiredAttributesToCompare = new List<Type>();
_differenceCallback = d => { };
MembersToIgnore = new List<string>();
_hasWildcardInMembersToIgnore = null;
MembersToInclude = new List<string>();
ClassTypesToIgnore = new List<Type>();
ClassTypesToInclude = new List<Type>();
TypesToIgnore = new List<Type>();
TypesToInclude = new List<Type>();
CompareStaticFields = true;
CompareStaticProperties = true;
#if !NETSTANDARD1_3
ComparePrivateProperties = false;
ComparePrivateFields = false;
CompareBackingFields = true;
#endif
CustomPropertyComparers = new Dictionary<string, BaseTypeComparer>();
CompareChildren = true;
CompareReadOnly = true;
CompareFields = true;
CompareDateTimeOffsetWithOffsets = false;
IgnoreCollectionOrder = false;
CompareProperties = true;
ShowCollectionKeyName= true;
Caching = true;
AutoClearCache = true;
IgnoreObjectTypes = false;
MaxDifferences = 1;
ExpectedName = "Expected";
ActualName = "Actual";
CustomComparers = new List<BaseTypeComparer>();
TreatStringEmptyAndNullTheSame = false;
InterfaceMembers = new List<Type>();
SkipInvalidIndexers = false;
MaxByteArrayDifferences = 1;
CollectionMatchingSpec = new Dictionary<Type, IEnumerable<string>>();
IgnoreUnknownObjectTypes = false;
MaxStructDepth = 2;
CaseSensitive = true;
IgnoreStringLeadingTrailingWhitespace = false;
IgnoreMissingProperties = true;
IgnoreMissingFields = true;
DateTimeKindToUseWhenUnspecified = DateTimeKind.Utc;
}
#endregion
}
}