Beispiel #1
0
 public static T GetValueFromSection <T>(String sectionName,
                                         String keyName)
 {
     return(ConfigurationReader.GetTypedValueFromSection <T>(sectionName, keyName));
 }
Beispiel #2
0
 /// <summary>
 /// Gets the value.
 /// </summary>
 /// <param name="keyName">Name of the key.</param>
 /// <returns></returns>
 public static String GetValue(String keyName)
 {
     return(ConfigurationReader.GetValueFromSection("AppSettings", keyName));
 }
Beispiel #3
0
 /// <summary>
 /// Gets the value.
 /// </summary>
 /// <param name="sectionName">Name of the section.</param>
 /// <param name="keyName">Name of the key.</param>
 /// <returns></returns>
 public static String GetValue(String sectionName,
                               String keyName)
 {
     return(ConfigurationReader.GetValueFromSection(sectionName, keyName));
 }
Beispiel #4
0
 /// <summary>
 /// Gets the connection string.
 /// </summary>
 /// <param name="keyName">Name of the key.</param>
 /// <returns></returns>
 public static String GetConnectionString(String keyName)
 {
     return(ConfigurationReader.GetValueFromSection("ConnectionStrings", keyName));
 }