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

            ObjectJsonSerializer objectJsonSerializer = new ObjectJsonSerializer();

            Console.ReadKey();
        }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 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();
        }