static VirtualRoot() { Id = NTMinerRegistry.GetClientId(); JsonSerializer = new ObjectJsonSerializer(); SMessageDispatcher = new MessageDispatcher(); SCommandBus = new DirectCommandBus(SMessageDispatcher); SEventBus = new DirectEventBus(SMessageDispatcher); }
static VirtualRoot() { Id = NTMinerRegistry.GetClientId(); LocalIpSet = new LocalIpSet(); JsonSerializer = new ObjectJsonSerializer(); // 构造函数中会建造消息路径 LocalMessages = new LocalMessageSet(LocalDbFileFullName); }
static void Main(string[] args) { DevMode.SetDevMode(); ObjectJsonSerializer objectJsonSerializer = new ObjectJsonSerializer(); Console.ReadKey(); }
static VirtualRoot() { Id = NTMinerRegistry.GetClientId(); LocalIpSet = new LocalIpSet(); JsonSerializer = new ObjectJsonSerializer(); SMessageDispatcher = new MessageDispatcher(); SCommandBus = new DirectCommandBus(SMessageDispatcher); SEventBus = new DirectEventBus(SMessageDispatcher); LocalMessages = new LocalMessageSet(LocalDbFileFullName); }
static VirtualRoot() { Id = NTMinerRegistry.GetClientId(); if (!Directory.Exists(GlobalDirFullName)) { Directory.CreateDirectory(GlobalDirFullName); } JsonSerializer = new ObjectJsonSerializer(); SMessageDispatcher = new MessageDispatcher(); SCommandBus = new DirectCommandBus(SMessageDispatcher); SEventBus = new DirectEventBus(SMessageDispatcher); }
public static Action <string, ConsoleColor, bool> WriteLineMethod; // message, color, isDebug static Global() { Logger = new Log4NetLoggingService(); JsonSerializer = new ObjectJsonSerializer(); MessageDispatcher = new MessageDispatcher(); CommandBus = new DirectCommandBus(MessageDispatcher); EventBus = new DirectEventBus(MessageDispatcher); WriteLineMethod = (line, color, isDebug) => { ConsoleColor oldColor = Console.ForegroundColor; Console.ForegroundColor = color; Console.WriteLine(line); Console.ForegroundColor = oldColor; }; StartTimer(); }