Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
abjerner committed Aug 15, 2019
1 parent fc914ff commit 440080b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Skybrud.Essentials.Http/Collections/HttpQueryString.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,8 @@ public float GetFloat(string key) {
/// <returns>The <typeparamref name="T"/> value of the entry, or the default value of <typeparamref name="T"/> if not found.</returns>
private T GetValue<T>(string key) {
if (string.IsNullOrWhiteSpace(key)) throw new ArgumentNullException(nameof(key));
if (!_values.TryGetValue(key, out string value)) return default(T);
return string.IsNullOrWhiteSpace(value) ? default(T) : (T) Convert.ChangeType(value, typeof(T), CultureInfo.InvariantCulture);
if (!_values.TryGetValue(key, out string value)) return default;
return string.IsNullOrWhiteSpace(value) ? default : (T) Convert.ChangeType(value, typeof(T), CultureInfo.InvariantCulture);
}

/// <summary>
Expand Down Expand Up @@ -268,8 +268,8 @@ public static HttpQueryString ParseQueryString(string str, bool urlencoded) {
}

// extract the name / value pair
String name = null;
String value;
string name = null;
string value;

if (ti >= 0) {
name = str.Substring(si, ti - si);
Expand Down

0 comments on commit 440080b

Please sign in to comment.