diff --git a/src/http/partials/Server/HTTP.ServerOn.cs b/src/http/partials/Server/HTTP.ServerOn.cs index 43af32d2..2bc1049a 100644 --- a/src/http/partials/Server/HTTP.ServerOn.cs +++ b/src/http/partials/Server/HTTP.ServerOn.cs @@ -7,34 +7,31 @@ namespace Netly { public partial class HTTP { - public partial class Server + internal class ServerOn : IHTTP.ServerOn { - internal class ServerOn : IHTTP.ServerOn - { - public EventHandler OnClose { get; private set; } - public EventHandler OnError { get; private set; } - public EventHandler OnModify { get; private set; } - public EventHandler OnOpen { get; private set; } + public EventHandler OnClose { get; private set; } + public EventHandler OnError { get; private set; } + public EventHandler OnModify { get; private set; } + public EventHandler OnOpen { get; private set; } - public void Open(Action callback) - { - OnOpen += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke()); - } + public void Open(Action callback) + { + OnOpen += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke()); + } - public void Error(Action callback) - { - OnError += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke(@event)); - } + public void Error(Action callback) + { + OnError += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke(@event)); + } - public void Close(Action callback) - { - OnClose += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke()); - } + public void Close(Action callback) + { + OnClose += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke()); + } - public void Modify(Action callback) - { - OnModify += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke(@event)); - } + public void Modify(Action callback) + { + OnModify += (@object, @event) => Env.MainThread.Add(() => callback?.Invoke(@event)); } } }