ParseTimeSpan() static private method

static private ParseTimeSpan ( string name, string s ) : System.TimeSpan
name string
s string
return System.TimeSpan
 private TimeSpan ToTimeSpan(string keyword, object value)
 {
     if (value is TimeSpan)
     {
         return((TimeSpan)value);
     }
     else if (value is string)
     {
         return(MongoUrlBuilder.ParseTimeSpan(keyword, (string)value));
     }
     else
     {
         return(TimeSpan.FromSeconds(Convert.ToDouble(value)));
     }
 }