Click or drag to resize

DataSpecsEquals Method

Two DataSpecs objects are equal if they contain the same set of unique DataSpec objects - neither Keys nor the order of keys make any difference.

Namespace: DegreeDays.Api.Data
Assembly: DegreeDays (in DegreeDays.dll) Version: 1.4
Syntax
public override bool Equals(
	Object obj
)

Parameters

obj  Object
The object to compare with this instance.

Return Value

Boolean
true if obj is equal to this instance; false otherwise.
Remarks

If you're using this framework end to end (the typical usage pattern), then keys are managed internally, and the ordering of keys makes no difference to anything, so this key-blind equality comparison is ideal for testing whether one DataSpecs is equivalent to another in terms of the data it is specifying.

If, however, you are using DataSpecsCustomKeyBuilder to create DataSpecs objects with custom keys, then presumably the keys, and maybe the ordering of those keys, are no longer insignificant internal details. So bear in mind that they won't be considered in tests of DataSpecs object equality - this could still be exactly what you'd want, but it might cause problems for you if you're using your custom-keyed DataSpecs objects in equality tests and expecting the keys to be part of the comparison.

See Also