public static T GetValueOrDefault <T>(this IParameters @this, string key) { if (@this.TryGetValue <T>(key, out var value)) { return(value); } else { return(default(T)); } }