示例#1
0
 void CreateRegionHandlers()
 {
     RegionHandlers = new List<RegionHandler>();
     foreach (var profile in ServiceConfiguration.RegionProfiles)
     {
         RegionHandler handler = new RegionHandler(ServiceConfiguration, profile, DatabaseProvider);
         RegionHandlers.Add(handler);
     }
 }
示例#2
0
        public Worker(EngineRegionProfile regionProfile, Login login, Configuration configuration, RegionHandler regionHandler, DatabaseConnectionProvider databaseProvider)
        {
            RegionProfile = regionProfile;
            WorkerLogin = login;

            WorkerProfiler = new Profiler();

            JobEvent = new AutoResetEvent(false);

            Master = regionHandler;

            DatabaseProvider = databaseProvider;

            Database = DatabaseProvider.GetConnection();
            ConnectionData = new ConnectionProfile(configuration.Authentication, regionProfile.Region, configuration.Proxy, login.Username, login.Password);
            Connect();
        }