Esempio n. 1
0
 public T TryGetHeaderValue <T>(string headerName, T defaultValue)
 {
     if (Headers.ContainsKey(headerName))
     {
         try
         {
             return(ParseUtility.ChangeType <T>(Headers[headerName]));
         }
         catch (Exception)
         {
             return(defaultValue);
         }
     }
     return(defaultValue);
 }