'Declaration Protected Friend Overridable Function GetEquivalenceKey() As Integer
'Usage Dim instance As StatFunction Dim value As Integer value = instance.GetEquivalenceKey()
protected internal virtual int GetEquivalenceKey()
'Declaration Protected Friend Overridable Function GetEquivalenceKey() As Integer
'Usage Dim instance As StatFunction Dim value As Integer value = instance.GetEquivalenceKey()
protected internal virtual int GetEquivalenceKey()
The IsEquivalent and GetEquivalenceKey methods are similar to the Equals and GetHashCode methods and are used by the engine behind the StatFunctions.
GetEquivalenceKey should return the same value for two StatFunction instances that would return the same result for the same value list. All StatFunction properties that have an impact on the result should be reflected in the override. If a property does not impact the result, it should not modify the equivalence key.
IsEquivalent should compare each property that affects the StatFunction result and return true if they are all equal.
For instance, the GetEquivalenceKey method of CountFunction will return a combination of typeof(CountFunction).GetHashCode(), SourcePropertyName.GetHashCode(), and IncludeNullValues.GetHashCode(). This means that two CountFunction having the same SourcePropertyName and the IncludeNullValues value will return the same equivalence key. A hypothetical "LogResult" property that does not have an effect on the result would not be considered in this override.
Similarly, the IsEquivalent method will return false if any of these 3 criteria (StatFunction type, SourcePropertyName, or IncludeNullValues) are different when compared with the specified StatFunction parameter.
Target Platforms: Windows 11, Windows, 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2