Apache License 2.0
A function for computing a 16-byte hash (returned as a guid) to uniquely fingerprint and identify an ADO.NET DataSet schema. Useful for identifying and tracking schema versions automatically.
SchemaHasher fulfilled our need for a way to keep track of schema versions and modifications with typed ADO.NET DataSet objects. By programmatically computing a schema version, it eliminates the extra step and potential error source of defining one manually as meta-data. It also permits a version to be computed for an XML snapshot of a DataSet that contains a schema, which allows things like database backups to be intrinsically versioned.
Compute a schema hash:
Dim ds = New TypedDataSet Dim schemaHash As Guid = SchemaHasher.ComputeDatabaseSchemaHash(ds) Dim anotherDs = New TypedDataSet Dim anotherSchemaHash As Guid = SchemaHasher.ComputeDatabaseSchemaHash(anotherDs) Assert.AreEqual(schemaHash,anotherSchemaHash)
If two DataSet objects have the same schema, their schema hashes will be equal.
This library and associated unit tests were developed in VS 2008 as Smart Device projects.
Author: Adam Ierymenko <aierymenko -at- kdsecure.com>
Copyright: (c) 2010 by KD Secure, LLC
NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.