I added new project for TeoVincent.EventAggregator.Service project unit tests.
Formatting code. I removed impractical regions and moved members at the top of class.
Refactoring of some comments and messages.
Remove unnecessary try catch
Removing the code that does not contribute to the logic. Removing code which attaches method to states of callbacks events. This could be implement in future in another form.
I moved responsibility of handling errors to another class using instance of interface in the Event Aggregator Service.
I created two new ctors. Default ctor is necessary for create service instance by wcf engine. Second ctor allow to put own different implements for testing. It is first step of refactoring. In next steps I'll use DI container.
First test for Event Aggregator Service. The test is red because in SubscribePlugin method I have line of code "OperationContext.Current.GetCallbackChannel<IEventPublisher>();" which requires wcf service running instance. This is place to refactoring. There will be factory for create IEventPublish object;
Test from previous commit now is green. I created method factory for creating callback instance.