Remove obsolete Rest event.

This commit is contained in:
Lucas Nicodemus 2017-12-26 20:03:36 -07:00
parent 3e6cc78a2c
commit 656c9afdb2

View file

@ -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<RestRequestEventArgs> RestRequestEvent = new HandlerList<RestRequestEventArgs>();
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
/// <summary>
/// Called when the <see cref="HttpListener"/> receives a request
/// </summary>
@ -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))