/// <summary>
 /// Returns the index of a specified item in the collection.
 /// </summary>
 /// <param name="item">The item to find.</param>
 /// <returns>Returns the index of the item.</returns>
 public int IndexOf(ItemSetting item)
 {
     if (item != null)
     {
         return(BaseIndexOf(item));
     }
     else
     {
         return(-1);
     }
 }
		/// <summary>
		/// Reads the typical attributes for a ItemSetting from the configuration node.
		/// </summary>
		/// <param name="node">The XmlNode to read from.</param>
		/// <param name="item">The ItemSetting to set values for.</param>
		protected void ReadChildItem(XmlNode node, ItemSetting item) {
			// Set the item only if the node has a valid path attribute value.
			if (node.Attributes["path"] != null && node.Attributes["path"].Value.Trim().Length > 0) {
				// Get the value of the path attribute.
				item.Path = node.Attributes["path"].Value.Trim().ToLower();

				// Remove leading and trailing "/" characters.
				if (item.Path.Length > 0)
					item.Path = item.Path.Trim('/');

				// Check for a secure attribute.
				if (node.Attributes["secure"] != null) {
					string SecureValue = node.Attributes["secure"].Value.Trim();
					if (Enum.IsDefined(typeof(SecurityType), SecureValue))
						item.Secure = (SecurityType)Enum.Parse(typeof(SecurityType), SecureValue);
					else
						throw new SecuritySwitchSectionException("Invalid value for the 'secure' attribute.", node);
				}
			} else
				// Throw an exception for the missing Path attribute.
				throw new SecuritySwitchSectionException("'path' attribute not found.", node);
		}
		/// <summary>
		/// Returns the index of a specified item in the collection.
		/// </summary>
		/// <param name="item">The item to find.</param>
		/// <returns>Returns the index of the item.</returns>
		public int IndexOf(ItemSetting item) {
			return List.IndexOf(item);
		}
		/// <summary>
		/// Returns the index of a specified item in the collection.
		/// </summary>
		/// <param name="item">The item to find.</param>
		/// <returns>Returns the index of the item.</returns>
		public int IndexOf(ItemSetting item) {
			if (item != null)
				return BaseIndexOf(item);
			else
				return -1;
		}
 /// <summary>
 /// Returns the index of a specified item in the collection.
 /// </summary>
 /// <param name="item">The item to find.</param>
 /// <returns>Returns the index of the item.</returns>
 public int IndexOf(ItemSetting item)
 {
     return(List.IndexOf(item));
 }