From 656c9afdb2f751e2a093cee667340bdf799d6c97 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Tue, 26 Dec 2017 20:03:36 -0700 Subject: [PATCH] Remove obsolete Rest event. --- TShockAPI/Rest/Rest.cs | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/TShockAPI/Rest/Rest.cs b/TShockAPI/Rest/Rest.cs index 18be5080..fad2b9b0 100644 --- a/TShockAPI/Rest/Rest.cs +++ b/TShockAPI/Rest/Rest.cs @@ -250,30 +250,6 @@ namespace Rests } } - #region Event - [Obsolete("This class will be removed in the next release")] - public class RestRequestEventArgs : HandledEventArgs - { - public RequestEventArgs Request { get; set; } - } - - [Obsolete("This method will be removed in the next release")] - public static HandlerList RestRequestEvent = new HandlerList(); - - private static bool OnRestRequestCall(RequestEventArgs request) - { - if (RestRequestEvent == null) - return false; - - var args = new RestRequestEventArgs - { - Request = request, - }; - RestRequestEvent.Invoke(null, args); - return args.Handled; - } - #endregion - /// /// Called when the receives a request /// @@ -285,9 +261,6 @@ namespace Rests if (obj == null) throw new NullReferenceException("obj"); - if (OnRestRequestCall(e)) - return; - var str = JsonConvert.SerializeObject(obj, Formatting.Indented); var jsonp = e.Request.Parameters["jsonp"]; if (!string.IsNullOrWhiteSpace(jsonp))