示例#1
0
        public void Initialise(IConfigSource source)
        {
            ConfigSource = source;

            // Can set later on if required
            Config = new IniConfig("MockScriptEngine", ConfigSource);

            PostedEvents = new Dictionary<UUID, List<EventParams>>();
        }
        /// <summary>
        /// Loads the configuration file.
        /// </summary>
        private void Load()
        {
            IniConfig  config  = null;
            IniSection section = null;
            IniItem    item    = null;

            for (int j = 0; j < iniDocument.Sections.Count; j++)
            {
                section = iniDocument.Sections[j];
                config  = new IniConfig(section.Name, this);

                for (int i = 0; i < section.ItemCount; i++)
                {
                    item = section.GetItem(i);

                    if (item.Type == IniType.Key)
                    {
                        config.Add(item.Name, item.Value);
                    }
                }

                this.Configs.Add(config);
            }
        }
示例#3
0
		/// <summary>
		/// Loads the configuration file.
		/// </summary>
		private void Load ()
		{
			IniConfig config = null;
			IniSection section = null;
			IniItem item = null;

			for (int j = 0; j < iniDocument.Sections.Count; j++)
			{
				section = iniDocument.Sections[j];
				config = new IniConfig (section.Name, this);

				for (int i = 0; i < section.ItemCount; i++)
				{
					item = section.GetItem (i);
					
					if  (item.Type == IniType.Key) {
						config.Add (item.Name, item.Value);
					}
				}
				
				this.Configs.Add (config);
			}
		}