Example #1
0
 static VirtualRoot()
 {
     Id                 = NTMinerRegistry.GetClientId();
     JsonSerializer     = new ObjectJsonSerializer();
     SMessageDispatcher = new MessageDispatcher();
     SCommandBus        = new DirectCommandBus(SMessageDispatcher);
     SEventBus          = new DirectEventBus(SMessageDispatcher);
 }
Example #2
0
 static VirtualRoot()
 {
     Id             = NTMinerRegistry.GetClientId();
     LocalIpSet     = new LocalIpSet();
     JsonSerializer = new ObjectJsonSerializer();
     // 构造函数中会建造消息路径
     LocalMessages = new LocalMessageSet(LocalDbFileFullName);
 }
Example #3
0
        static void Main(string[] args)
        {
            DevMode.SetDevMode();

            ObjectJsonSerializer objectJsonSerializer = new ObjectJsonSerializer();

            Console.ReadKey();
        }
Example #4
0
 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);
 }
Example #5
0
 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);
 }
Example #6
0
        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();
        }