I currently have a WCF service that provides an object graph on demand. I want to have a mechanism in which a client can compute a hash on a graph of cached objects that it has, and can then pass that value to the hash function to the WCF service to make sure that it matches the data that the service has.
I tried this using a standard cryptographic algorithm to calculate the hash on objects, but since the definitions of objects are stored by the service when it is passed to the client, additional properties can be added and the order of the properties can change, both of which will affect the generated hash.
Is there any mechanism other than overriding GetHashCode for each object in the WCF service definition and then repeating the implementation of the same hash generation as a utility on the client?
source
share