Remove obsolete Rest event.
This commit is contained in:
parent
3e6cc78a2c
commit
656c9afdb2
1 changed files with 0 additions and 27 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue