Welcome to the Bot Framework SDK for .NET repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using .NET.
This PR implements a custom GetHashCode method to return the same hash code even on different bots' runs. This code is used in CosmosDBKeyEscape to truncate keys that are longer than 255 characters.
Specific Changes
Created the GetDeterministicHashCode method in the CosmosDBKeyEscape class to replace the call to String.GetHashCode.
Updated Long_Key_Should_Be_Truncated unit test to use the new method and verify its result.
Testing
These images compare the hash codes returned by the GetHashCode and GetDeterministicHashCode methods in two different bot runs.
Fixes #6768
Description
This PR implements a custom GetHashCode method to return the same hash code even on different bots' runs. This code is used in CosmosDBKeyEscape to truncate keys that are longer than 255 characters.
Specific Changes
GetDeterministicHashCode
method in the CosmosDBKeyEscape class to replace the call to String.GetHashCode.Long_Key_Should_Be_Truncated
unit test to use the new method and verify its result.Testing
These images compare the hash codes returned by the GetHashCode and GetDeterministicHashCode methods in two different bot runs.