Пример #1
0
        /// <summary>
        /// Add element into the collection.
        /// </summary>
        /// <param name="wurflPatch">The patch to be added to the collection.</param>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public void Add(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
                throw new ArgumentNullException("wurflPatch");

            BaseAdd(wurflPatch);
        }
Пример #2
0
        /// <summary>
        /// Add element into the collection.
        /// </summary>
        /// <param name="wurflPatch">The patch to be added to the collection.</param>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public void Add(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
            {
                throw new ArgumentNullException("wurflPatch");
            }

            BaseAdd(wurflPatch);
        }
Пример #3
0
        /// <summary>
        /// Gets the index of the specific element inside the collection.
        /// </summary>
        /// <param name="wurflPatch">The element being sought.</param>
        /// <returns>The index of the element.</returns>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public int IndexOf(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
            {
                throw new ArgumentNullException("wurflPatch");
            }

            return(BaseIndexOf(wurflPatch));
        }
Пример #4
0
        /// <summary>
        /// Removes a <see cref="System.Configuration.ConfigurationElement"/> from the collection.
        /// </summary>
        /// <param name="wurflPatch">The patch to be removed from the collection.</param>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public void Remove(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
            {
                throw new ArgumentNullException("wurflPatch");
            }

            if (BaseIndexOf(wurflPatch) >= 0)
            {
                BaseRemove(wurflPatch.Name);
            }
        }
Пример #5
0
        /// <summary>
        /// Gets the index of the specific element inside the collection.
        /// </summary>
        /// <param name="wurflPatch">The element being sought.</param>
        /// <returns>The index of the element.</returns>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public int IndexOf(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
                throw new ArgumentNullException("wurflPatch");

            return BaseIndexOf(wurflPatch);
        }
Пример #6
0
        /// <summary>
        /// Removes a <see cref="System.Configuration.ConfigurationElement"/> from the collection.
        /// </summary>
        /// <param name="wurflPatch">The patch to be removed from the collection.</param>
        /// <exception cref="System.ArgumentNullException">Thrown if <paramref name="wurflPatch"/> equals null.</exception>
        public void Remove(PatchConfigElement wurflPatch)
        {
            if (wurflPatch == null)
                throw new ArgumentNullException("wurflPatch");

            if (BaseIndexOf(wurflPatch) >= 0)
                BaseRemove(wurflPatch.Name);
        }