void CreateRegionHandlers() { RegionHandlers = new List<RegionHandler>(); foreach (var profile in ServiceConfiguration.RegionProfiles) { RegionHandler handler = new RegionHandler(ServiceConfiguration, profile, DatabaseProvider); RegionHandlers.Add(handler); } }
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(); }