Init() protected method

protected Init ( ) : void
return void
 public void Add(KeyValueConfigurationElement keyValue)
 {
     keyValue.Init();
     KeyValueConfigurationElement element = (KeyValueConfigurationElement) base.BaseGet(keyValue.Key);
     if (element == null)
     {
         this.BaseAdd(keyValue);
     }
     else
     {
         element.Value = element.Value + "," + keyValue.Value;
         int index = base.BaseIndexOf(element);
         base.BaseRemoveAt(index);
         this.BaseAdd(index, element);
     }
 }
        public void Add(KeyValueConfigurationElement keyValue)
        {
            keyValue.Init();
            KeyValueConfigurationElement element = (KeyValueConfigurationElement)base.BaseGet(keyValue.Key);

            if (element == null)
            {
                this.BaseAdd(keyValue);
            }
            else
            {
                element.Value = element.Value + "," + keyValue.Value;
                int index = base.BaseIndexOf(element);
                base.BaseRemoveAt(index);
                this.BaseAdd(index, element);
            }
        }
コード例 #3
0
        //
        // Methods
        //

        public void Add(KeyValueConfigurationElement keyValue) {
            // Need to initialize in order to get the key
            keyValue.Init();

            // the appsettings add works more like a namevalue collection add in that it appends values
            // when add is called and teh key already exists.
            KeyValueConfigurationElement oldValue = (KeyValueConfigurationElement)BaseGet(keyValue.Key);
            if (oldValue == null) {
                BaseAdd(keyValue);
            }
            else {
                oldValue.Value += "," + keyValue.Value;
                int index = BaseIndexOf(oldValue);
                BaseRemoveAt(index);
                BaseAdd(index, oldValue);
            }


        }
        //
        // Methods
        //

        public void Add(KeyValueConfigurationElement keyValue)
        {
            // Need to initialize in order to get the key
            keyValue.Init();

            // the appsettings add works more like a namevalue collection add in that it appends values
            // when add is called and teh key already exists.
            KeyValueConfigurationElement oldValue = (KeyValueConfigurationElement)BaseGet(keyValue.Key);

            if (oldValue == null)
            {
                BaseAdd(keyValue);
            }
            else
            {
                oldValue.Value += "," + keyValue.Value;
                int index = BaseIndexOf(oldValue);
                BaseRemoveAt(index);
                BaseAdd(index, oldValue);
            }
        }
コード例 #5
0
 public void Add(KeyValueConfigurationElement keyValue)
 {
     keyValue.Init();
     BaseAdd(keyValue);
 }
		public void Add (KeyValueConfigurationElement keyValue)
		{
			keyValue.Init ();
			BaseAdd (keyValue);
		}