changeset 8:2bba3fb360ed

Re #11 - Add getter methods to IniFile and IniSection * Add stub methods
author IBBoard <dev@ibboard.co.uk>
date Sat, 21 Feb 2009 10:56:47 +0000
parents 35a7b6525bca
children 5b0052b5585f
files IniFile.cs IniSection.cs
diffstat 2 files changed, 72 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/IniFile.cs	Tue Feb 17 15:27:03 2009 +0000
+++ b/IniFile.cs	Sat Feb 21 10:56:47 2009 +0000
@@ -112,6 +112,44 @@
 			
 			return stringBuilder.ToString().Trim();
 		}
-
+		
+		/// <summary>
+		/// Gets the value from a given key-value pair in a given section. If either the section does not exist or the key does not exist
+		/// in the section then NULL will be returned. If the key exists in the section then its corresponding value will be returned.
+		/// </summary>
+		/// <param name="sectionName">
+		/// The <code>IniSection</code> to look for <code>lineKey</code> in
+		/// </param>
+		/// <param name="lineKey">
+		/// The key for the <code>IniKeyValuePairLine</code> within the <code>sectionName</code> <code>IniSection</code> to get the value for
+		/// </param>
+		/// <returns>
+		/// The value for the key in the section, or NULL if the section or the key do not exist
+		/// </returns>
+		public string GetSectionLineValue(string sectionName, string lineKey)
+		{
+			return null;
+		}
+		
+		/// <summary>
+		/// Gets the value from a given key-value pair in a given section. If either the section does not exist or the key does not exist
+		/// in the section then <code>defaultValue</code> will be returned. If the key exists in the section then its corresponding value will be returned.
+		/// </summary>
+		/// <param name="sectionName">
+		/// The <code>IniSection</code> to look for <code>lineKey</code> in
+		/// </param>
+		/// <param name="lineKey">
+		/// The key for the <code>IniKeyValuePairLine</code> within the <code>sectionName</code> <code>IniSection</code> to get the value for
+		/// </param>
+		/// <param name="defaultValue">
+		/// The default value to return if the section or the key do not exist
+		/// </param>
+		/// <returns>
+		/// The value for the key in the section, or NULL if the section or the key do not exist
+		/// </returns>
+		public string GetSectionLineValue(string sectionName, string lineKey, string defaultValue)
+		{
+			return null;
+		}
 	}
 }
--- a/IniSection.cs	Tue Feb 17 15:27:03 2009 +0000
+++ b/IniSection.cs	Sat Feb 21 10:56:47 2009 +0000
@@ -137,6 +137,38 @@
 			stringBuilder.Append("\n");			
 			return stringBuilder.ToString().Trim();
 		}
-
+		
+		/// <summary>
+		/// Gets the value from a given key-value pair in this section. If ethe key does not exist in the section then NULL will be returned. 
+		/// If the key exists in the section then its corresponding value will be returned.
+		/// </summary>
+		/// <param name="lineKey">
+		/// The key for the <code>IniKeyValuePairLine</code> within the <code>IniSection</code> to get the value for
+		/// </param>
+		/// <returns>
+		/// The value for the key in the section, or NULL if the key does not exist
+		/// </returns>
+		public string GetLineValue(string lineKey)
+		{
+			return null;
+		}
+		
+		/// <summary>
+		/// Gets the value from a given key-value pair in a given section. If the key does not exist in the section then <code>defaultValue</code>
+		/// will be returned. If the key exists in the section then its corresponding value will be returned.
+		/// </summary>
+		/// <param name="lineKey">
+		/// The key for the <code>IniKeyValuePairLine</code> within the <code>IniSection</code> to get the value for
+		/// </param>
+		/// <param name="defaultValue">
+		/// The default value to return if the key does not exist
+		/// </param>
+		/// <returns>
+		/// The value for the key in the section, or NULL if the key does not exist
+		/// </returns>
+		public string GetLineValue(string lineKey, string defaultValue)
+		{
+			return null;
+		}
 	}
 }