From 451bbc1fd001377da4d7f80dae0dedc33d2e79c8 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 30 Apr 2020 15:57:43 +0000 Subject: [PATCH] --- source/Plugins/AyaNova.Plugin.V8/util.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/Plugins/AyaNova.Plugin.V8/util.cs b/source/Plugins/AyaNova.Plugin.V8/util.cs index 48703c8..0fc3811 100644 --- a/source/Plugins/AyaNova.Plugin.V8/util.cs +++ b/source/Plugins/AyaNova.Plugin.V8/util.cs @@ -366,6 +366,17 @@ namespace AyaNova.PlugIn.V8 } + + public static int GetOrderIndependentHashCode(IEnumerable source) + { + int hash = 0; + foreach (T element in source) + { + hash = unchecked(hash + + EqualityComparer.Default.GetHashCode(element)); + } + return hash; + } #endregion }//eoc