示例#1
0
 public sDomain(string name, string configFile)
 {
     if (configFile != null)
     {
         AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
         setup.ConfigurationFile = configFile;
         _domain = AppDomain.CreateDomain((name == null ? System._rand.NextString(32) : name), AppDomain.CurrentDomain.Evidence, setup);
     }
     else
     {
         _domain = AppDomain.CreateDomain((name == null ? System._rand.NextString(32) : name));
     }
     _domain.Load(typeof(System).Assembly.FullName);
     _core         = (Core)_domain.CreateInstanceAndUnwrap(typeof(System).Assembly.FullName, typeof(Core).FullName);
     _processEvent = new delProcessEvent(_core.ProcessEvent);
 }
示例#2
0
 internal void Init()
 {
     if (_eventController == null)
     {
         AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
         _subRoutes              = new Dictionary <sRoute, List <Core> >();
         _myRoutes               = new List <sRoute>();
         _eventController        = new EventController();
         _loadedAssemblies       = new Dictionary <string, Assembly>();
         _processEvent           = new delProcessEvent(_eventController.ProcessEvent);
         _processEventInChildren = new delProcessEvent(_ProcessEventInChildren);
         _logController          = new LogController();
         _logController.Start();
         _messageController = new MessageController();
         _messageController.Start();
     }
 }
示例#3
0
 internal void Init()
 {
     if (_eventController == null)
     {
         AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;
         _subRoutes = new Dictionary<sRoute, List<Core>>();
         _myRoutes = new List<sRoute>();
         _eventController = new EventController();
         _loadedAssemblies = new Dictionary<string, Assembly>();
         _processEvent = new delProcessEvent(_eventController.ProcessEvent);
         _processEventInChildren = new delProcessEvent(_ProcessEventInChildren);
         _logController = new LogController();
         _logController.Start();
         _messageController = new MessageController();
         _messageController.Start();
     }
 }
示例#4
0
 public sDomain(string name,string configFile)
 {
     if (configFile != null)
     {
         AppDomainSetup setup = AppDomain.CurrentDomain.SetupInformation;
         setup.ConfigurationFile = configFile;
         _domain = AppDomain.CreateDomain((name == null ? System._rand.NextString(32) : name), AppDomain.CurrentDomain.Evidence, setup);
     }else
         _domain = AppDomain.CreateDomain((name == null ? System._rand.NextString(32) : name));
     _domain.Load(typeof(System).Assembly.FullName);
     _core = (Core)_domain.CreateInstanceAndUnwrap(typeof(System).Assembly.FullName, typeof(Core).FullName);
     _processEvent = new delProcessEvent(_core.ProcessEvent);
 }