forked from http://powerassert.codeplex.com/SourceControl/changeset/8e1d4d6874e1