From b9424c690bfbd12d2a6142f7478e049c90e850d1 Mon Sep 17 00:00:00 2001
From: "harald.martini@student.tugraz.at" <harald.martini@student.tugraz.at>
Date: Tue, 29 Jun 2021 10:23:14 +0200
Subject: [PATCH] Removed IndexedStorage Class

---
 VECTO3GUI2020/Helper/IndexedStorage.cs | 53 --------------------------
 VECTO3GUI2020/VECTO3GUI2020.csproj     |  1 -
 2 files changed, 54 deletions(-)
 delete mode 100644 VECTO3GUI2020/Helper/IndexedStorage.cs

diff --git a/VECTO3GUI2020/Helper/IndexedStorage.cs b/VECTO3GUI2020/Helper/IndexedStorage.cs
deleted file mode 100644
index fee593ec2c..0000000000
--- 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 9cb9320a1e..1d81fd210b 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" />
-- 
GitLab