GetParameterValue() public static method

Parses semicolon-delimited parameter string, which has same format as connection strings, and extracts a value for given key. Returns defaultValue if key was not found.
public static GetParameterValue ( string delimiteParamString, string paramKey, string defaultValue = null ) : string
delimiteParamString string
paramKey string
defaultValue string
return string
Beispiel #1
0
 /// <summary>
 ///     Aspect that log SQL Execution plan of an intercepted SqlCommand.
 /// </summary>
 /// <param name="formatXmlOrText">
 ///     string in the format of "format=text;" or "format=xml;".
 ///     If not specified, XML format is used.
 /// </param>
 public SqlCmdExecutionPlanAspect(string formatXmlOrText)
     : this(cmdFetcher : null)
 {
     if (!formatXmlOrText.IsBlank())
     {
         this.TrueText_FalseXml = bool.Parse(DefaultAspect.GetParameterValue(formatXmlOrText, "format", "false"));
     }
 }