Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Before and After Start and Stop Server EventsHandlers #111

Closed
scottoffen opened this issue Aug 29, 2016 · 0 comments
Closed

Add Before and After Start and Stop Server EventsHandlers #111

scottoffen opened this issue Aug 29, 2016 · 0 comments
Assignees
Milestone

Comments

@scottoffen
Copy link
Owner

scottoffen commented Aug 29, 2016

Desired Result

public delegate void ServerEventHandler(IRestServer server);

ServerEventHandler handler = restServer => { /* do something here */ };

server.BeforeStart += handler ;
server.AfterStart += handler ;
server.BeforeStop += handler ;
server.AfterStop += handler ;
  • deprecate OnBeforeStart, OnAfterStart, OnBeforeStop and OnAfterStop
  • delegate must take an IRestServer instance as an argument
  • delegates for all handlers are invoked in the order they are added
  • exceptions throw by delegates will be re-thrown in an AggregateException
  • nothing else executes prior to the Before* delegates being invoked
  • After* delegates will not be invoked if exceptions are encountered
  • update ServerSettings with delegates
  • clone delegates between IServerSettings and IRestServer
@scottoffen scottoffen added this to the 4.0.0.next milestone Aug 29, 2016
@scottoffen scottoffen self-assigned this Aug 29, 2016
@scottoffen scottoffen removed this from the 4.0.0.next milestone Aug 29, 2016
@scottoffen scottoffen changed the title Change server delegates to Events Change server delegates to be Events Aug 29, 2016
@scottoffen scottoffen modified the milestones: 4.0.0.next, 4.0.0.stage, Backlog Sep 12, 2016
@scottoffen scottoffen modified the milestones: Backlog, 4.0.0.x Nov 4, 2016
@scottoffen scottoffen changed the title Change server delegates to be Events Change Before and After Delegates for Start and Stop Server to Use Events Nov 18, 2016
@scottoffen scottoffen changed the title Change Before and After Delegates for Start and Stop Server to Use Events Add Start and Stop Server EventsHandlers Nov 19, 2016
@scottoffen scottoffen changed the title Add Start and Stop Server EventsHandlers Add Before and After Start and Stop Server EventsHandlers Nov 19, 2016
scottoffen pushed a commit that referenced this issue Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant