예제 #1
0
 internal void CopyConfigData(ConfigReaderModule other)
 {
     lock (thread_locker)
     {
         if (other == null)
         {
             return;
         }
         configData.Clear();
         foreach (var p in other.configData)
         {
             configData[p.Key] = p.Value;
         }
     }
 }
예제 #2
0
        public void ReloadConfigReaderModule(ConfigReaderModule reader)
        {
            var old = readerModule;

            if (readerModule != null)
            {
                UnloadModule(readerModule);
                readerModule = null;
            }
            if (readerModule == null)
            {
                readerModule = AddModule(reader);
                readerModule.SetSerializer(serializer);
                readerModule.CopyConfigData(old);
            }
        }
예제 #3
0
 protected override void OnShutdown()
 {
     UnloadModule(readerModule);
     readerModule   = null;
     overrideModule = null;
 }
예제 #4
0
 protected override void OnBoot()
 {
     readerModule = AddModule <ConfigReaderModule>();
     readerModule.SetSerializer(serializer);
 }