From 64e3a4db59a23d196739f9f3985fff1e4fff66ed Mon Sep 17 00:00:00 2001
From: Starbeamrainbowlabs <sbrl@starbeamrainbowlabs.com>
Date: Sun, 5 Feb 2017 17:27:46 +0000
Subject: [PATCH] Remove old JsonConverters.

---
 .../Messages/HandshakeRequestMessage.cs       |  1 -
 Nibriboard/Nibriboard.csproj                  |  3 --
 .../JsonConverters/PointConverter.cs          | 37 ------------------
 .../JsonConverters/RectangleJsonConverter.cs  | 39 -------------------
 4 files changed, 80 deletions(-)
 delete mode 100644 Nibriboard/Utilities/JsonConverters/PointConverter.cs
 delete mode 100644 Nibriboard/Utilities/JsonConverters/RectangleJsonConverter.cs

diff --git a/Nibriboard/Client/Messages/HandshakeRequestMessage.cs b/Nibriboard/Client/Messages/HandshakeRequestMessage.cs
index b94d0ba..5c12bf8 100644
--- a/Nibriboard/Client/Messages/HandshakeRequestMessage.cs
+++ b/Nibriboard/Client/Messages/HandshakeRequestMessage.cs
@@ -3,7 +3,6 @@
 using Newtonsoft.Json;
 
 using SBRL.Utilities;
-using SBRL.Utilities.JsonConverters;
 
 namespace Nibriboard.Client.Messages
 {
diff --git a/Nibriboard/Nibriboard.csproj b/Nibriboard/Nibriboard.csproj
index 549e07c..7535247 100644
--- a/Nibriboard/Nibriboard.csproj
+++ b/Nibriboard/Nibriboard.csproj
@@ -77,8 +77,6 @@
     <Compile Include="Client\Messages\CursorPositionMessage.cs" />
     <Compile Include="Client\Messages\ClientStateMessage.cs" />
     <Compile Include="RippleSpace\ClientState.cs" />
-    <Compile Include="Utilities\JsonConverters\PointConverter.cs" />
-    <Compile Include="Utilities\JsonConverters\RectangleJsonConverter.cs" />
     <Compile Include="Utilities\Rectangle.cs" />
     <Compile Include="Utilities\Vector2.cs" />
   </ItemGroup>
@@ -94,7 +92,6 @@
     <Folder Include="ClientFiles\" />
     <Folder Include="Client\" />
     <Folder Include="Client\Messages\" />
-    <Folder Include="Utilities\JsonConverters\" />
   </ItemGroup>
   <ItemGroup>
     <None Include="packages.config" />
diff --git a/Nibriboard/Utilities/JsonConverters/PointConverter.cs b/Nibriboard/Utilities/JsonConverters/PointConverter.cs
deleted file mode 100644
index 01db415..0000000
--- a/Nibriboard/Utilities/JsonConverters/PointConverter.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-﻿using System;
-using System.Drawing;
-
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-
-namespace SBRL.Utilities.JsonConverters
-{
-	/// <summary>
-	/// Deserialises objects into points from the System.Drawing namespace.
-	/// </summary>
-	public class PointConverter : JsonConverter
-	{
-		public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
-		{
-			throw new NotImplementedException();
-		}
-
-		public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
-		{
-			JObject jsonObject = JObject.Load(reader);
-
-			return new Point(
-				jsonObject.Value<int>("X"),
-				jsonObject.Value<int>("Y")
-			);
-		}
-
-		public override bool CanConvert(Type objectType)
-		{
-			if (objectType != typeof(Rectangle))
-				return false;
-			return true;
-		}
-	}
-}
-
diff --git a/Nibriboard/Utilities/JsonConverters/RectangleJsonConverter.cs b/Nibriboard/Utilities/JsonConverters/RectangleJsonConverter.cs
deleted file mode 100644
index c92fa86..0000000
--- a/Nibriboard/Utilities/JsonConverters/RectangleJsonConverter.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-﻿using System;
-using System.Drawing;
-
-using Newtonsoft.Json;
-using Newtonsoft.Json.Linq;
-
-namespace SBRL.Utilities.JsonConverters
-{
-	/// <summary>
-	/// Deserialises objects into rectangles from the System.Drawing namespace.
-	/// </summary>
-	public class RectangleJsonConverter : JsonConverter
-	{
-		public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
-		{
-			throw new NotImplementedException();
-		}
-
-		public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
-		{
-			JObject jsonObject = JObject.Load(reader);
-
-			return new Rectangle(
-				jsonObject.Value<int>("X"),
-				jsonObject.Value<int>("Y"),
-				jsonObject.Value<int>("Width"),
-				jsonObject.Value<int>("Height")
-			);
-		}
-
-		public override bool CanConvert(Type objectType)
-		{
-			if (objectType != typeof(Rectangle))
-				return false;
-			return true;
-		}
-	}
-}
-
