Define message contracts for Obvs
masterObvs uses a convention-based messaging system. To organize messages, you should define a root message interface that identifies messages belonging to your specific service. You then implement specific message types (Commands, Events, Requests, Responses) by inheriting from both your service's root interface and the appropriate Obvs marker interface.
IMessage: The base interface for all messages.ICommand: For actions that trigger a state change.IEvent: For notifications of things that have happened.IRequest: For synchronous-style requests.IResponse: For the result of a request.
// 1. Define a root message type for your service
public interface IMyServiceMessage : IMessage { }
// 2. Create specific message types
public class MyCommand : IMyServiceMessage, ICommand { }
public class MyEvent : IMyServiceMessage, IEvent { }
public class MyRequest : IMyServiceMessage, IRequest { }
public class MyResponse : IMyServiceMessage, IResponse { }