In our API library, we have several classes that apply a method ComputeCurrentDefinitionHashCode, which hash codes Combines with a pseudo random number that should be unique to the class.
It is based on Paul Hsieh's "SuperFastHash"
I am trying to determine whether it is possible to use FxCop to ensure that we are able to use each class The randomly generated number is not duplicated in any other category.
In other words, can we save information from one class to the next?
Yes, you can create an FxCop rule that caches information into classes. However, depending on the inclusion of the target number in your classes, it may or may be a particularly good candidate for an FxCop rule. For example, if it has been passed as an argument for the original class constructor, then an FxCop rule can be the right choice. However, if the source of the number is less "can be guessed", then a unit testing approach would be better.
Comments
Post a Comment