diff --git a/VECTO3GUI2020/Helper/IndexedStorage.cs b/VECTO3GUI2020/Helper/IndexedStorage.cs deleted file mode 100644 index fee593ec2cf4c5b5f33aabc8463d2ae868f18540..0000000000000000000000000000000000000000 --- a/VECTO3GUI2020/Helper/IndexedStorage.cs +++ /dev/null @@ -1,53 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace VECTO3GUI2020.Helper -{ - //Helper class that can be used to store values of the same type that are identified by a string - public class IndexedStorage<T> where T : IEquatable<T> - { - private Dictionary<string, T> indexedStorageDictionary = new Dictionary<string, T>(); - private readonly Action<string> _valueChangedCallback; - - - - public IndexedStorage(Action<string> valueChangedCallback = null) - { - _valueChangedCallback = valueChangedCallback; - } - - - public T this[string identifier] - { - get - { - if (!indexedStorageDictionary.ContainsKey(identifier)) - { - indexedStorageDictionary.Add(identifier, default(T)); - } - return indexedStorageDictionary[identifier]; - } - set - { - var oldValue = default(T); - if (indexedStorageDictionary.ContainsKey(identifier)) - { - oldValue = indexedStorageDictionary[identifier]; - } - else - { - indexedStorageDictionary.Add(identifier, default(T)); - } - indexedStorageDictionary[identifier] = value; - if (!value.Equals(oldValue)) - { - _valueChangedCallback?.Invoke(identifier); - } - } - } - } - -} diff --git a/VECTO3GUI2020/VECTO3GUI2020.csproj b/VECTO3GUI2020/VECTO3GUI2020.csproj index 9cb9320a1e185812c5d279717e1dc6f47a30d62d..1d81fd210b8a7d0cab2550d89d4b6313ad5d190c 100644 --- a/VECTO3GUI2020/VECTO3GUI2020.csproj +++ b/VECTO3GUI2020/VECTO3GUI2020.csproj @@ -176,7 +176,6 @@ <Compile Include="Helper\Exceptions.cs" /> <Compile Include="Helper\EnumHelper.cs" /> <Compile Include="Helper\FileHelper.cs" /> - <Compile Include="Helper\IndexedStorage.cs" /> <Compile Include="Helper\IWindowHelper.cs" /> <Compile Include="Helper\DialogHelper.cs" /> <Compile Include="Helper\VisualTreeHelperExtensions.cs" />