public MessageServer(string hostname) { if (string.IsNullOrWhiteSpace(hostname)) { throw new ArgumentNullException(nameof(hostname)); } RegisterCommandHandlers(); orderProcessor = OrderProcessor.GetInstance(); IRPCServer rpcServer = new RabbitRPCServer(hostname); rpcServer.RegisterReceiverCallback(ReceivedCallback); }
public static OrderProcessor GetInstance() { if (instance == null) { lock (instanceLock) { if (instance == null) { instance = new OrderProcessor(); } } } return(instance); }