Open alelom opened 5 years ago
Gotcha. Nevertheless, that's the default system method and i'm using it solely for speckle abstract inner references.
Ie, if you're passing through abstract bhom objects, it's up to you to override that in your classes.
If you actually want to override the hash of a speckle object, you can just set it, it's public!
If you actually want to override the hash of a speckle object, you can just set it, it's public!
Should've checked better, as usual. This might just work for us. Thanks!
Scenario
Tell speckle "how to diff" based on the specified objects' Hashcode.
For some (quite convoluted/do not ask) reason, we would like to calculate the Hash for the BHoMObject externally to the object, not overriding/calling
bhomObject.GetHashCode()
, in order to pass it to Speckle'sSerialise
method (see question below).Question
With reference to the
Serialise
method of Speckle: https://github.com/speckleworks/SpeckleCore/blob/9545e96f04d85f46203a99c21c76eeea0ea03dae/SpeckleCore/Conversion/ConverterSerialisation.cs#L39-L53is it possible to pass a custom HashCode, perhaps in the
Dictionary<int, string> traverse
parameter? If so, how am I supposed to populate thestring
part of the dictionary (which apparently represents some sort of "path")?