diff --git a/Source/Framework/Framework.csproj b/Source/Framework/Framework.csproj
index 58730e42c..e665da40e 100644
--- a/Source/Framework/Framework.csproj
+++ b/Source/Framework/Framework.csproj
@@ -14,6 +14,7 @@
+
diff --git a/Source/Framework/IO/FastStruct.cs b/Source/Framework/IO/FastStruct.cs
deleted file mode 100644
index c3fa38589..000000000
--- a/Source/Framework/IO/FastStruct.cs
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) 2012-2018 CypherCore
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-using System.Reflection.Emit;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-namespace Framework.IO
-{
- public static class FastStruct where T : struct
- {
- private delegate T LoadFromByteRefDelegate(ref byte source);
- private delegate void CopyMemoryDelegate(ref T dest, ref byte src, int count);
-
- private static readonly LoadFromByteRefDelegate LoadFromByteRef = BuildLoadFromByteRefMethod();
- private static readonly CopyMemoryDelegate CopyMemory = BuildCopyMemoryMethod();
-
- public static readonly int Size = Marshal.SizeOf();
-
- private static LoadFromByteRefDelegate BuildLoadFromByteRefMethod()
- {
- var methodLoadFromByteRef = new DynamicMethod("LoadFromByteRef<" + typeof(T).FullName + ">",
- typeof(T), new[] { typeof(byte).MakeByRefType() }, typeof(FastStruct));
-
- ILGenerator generator = methodLoadFromByteRef.GetILGenerator();
- generator.Emit(OpCodes.Ldarg_0);
- generator.Emit(OpCodes.Ldobj, typeof(T));
- generator.Emit(OpCodes.Ret);
-
- return (LoadFromByteRefDelegate)methodLoadFromByteRef.CreateDelegate(typeof(LoadFromByteRefDelegate));
- }
-
- private static CopyMemoryDelegate BuildCopyMemoryMethod()
- {
- var methodCopyMemory = new DynamicMethod("CopyMemory<" + typeof(T).FullName + ">",
- typeof(void), new[] { typeof(T).MakeByRefType(), typeof(byte).MakeByRefType(), typeof(int) }, typeof(FastStruct));
-
- ILGenerator generator = methodCopyMemory.GetILGenerator();
- generator.Emit(OpCodes.Ldarg_0);
- generator.Emit(OpCodes.Ldarg_1);
- generator.Emit(OpCodes.Ldarg_2);
- generator.Emit(OpCodes.Cpblk);
- generator.Emit(OpCodes.Ret);
-
- return (CopyMemoryDelegate)methodCopyMemory.CreateDelegate(typeof(CopyMemoryDelegate));
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static T ArrayToStructure(byte[] src)
- {
- return LoadFromByteRef(ref src[0]);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static T ArrayToStructure(byte[] src, int offset)
- {
- return LoadFromByteRef(ref src[offset]);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static T ArrayToStructure(ref byte src)
- {
- return LoadFromByteRef(ref src);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static T[] ReadArray(byte[] source)
- {
- T[] buffer = new T[source.Length / Size];
-
- if (source.Length > 0)
- CopyMemory(ref buffer[0], ref source[0], source.Length);
-
- return buffer;
- }
- }
-}
diff --git a/Source/Framework/Util/Extensions.cs b/Source/Framework/Util/Extensions.cs
index b6468abed..4e1f84385 100644
--- a/Source/Framework/Util/Extensions.cs
+++ b/Source/Framework/Util/Extensions.cs
@@ -25,6 +25,7 @@ using System.Reflection.Emit;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
+using System.Runtime.CompilerServices;
namespace System
{
@@ -157,50 +158,6 @@ namespace System
right = temp;
}
- public static Func