Go to the documentation of this file.00001 using System;
00002 using System.Collections.Generic;
00003 using System.Configuration;
00004
00005 namespace N2.Configuration
00006 {
00007 public class ComponentParameterCollection : ConfigurationElementCollection
00008 {
00009 protected override ConfigurationElement CreateNewElement()
00010 {
00011 return new ComponentParameterElement();
00012 }
00013
00014 protected override object GetElementKey(ConfigurationElement element)
00015 {
00016 var pe = (ComponentParameterElement) element;
00017
00018 return pe.Name;
00019 }
00020
00021 public IDictionary<string, string> ToDictionary()
00022 {
00023 var result = new Dictionary<string, string>();
00024
00025 foreach(ComponentParameterElement value in this)
00026 {
00027 result.Add(value.Name, value.Value);
00028 }
00029 return result;
00030 }
00031 }
00032 }