Skip to content

Commit

Permalink
Fix 3 code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
Burak Akgerman committed Jun 1, 2022
1 parent da60d63 commit 4899155
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public bool SingleAsArray
/// </summary>
public bool ValuesOnly { get; set; }

#region Pairs
#region Pairs
/// <summary>
/// Serialize multiple key/value pairs
/// </summary>
Expand Down Expand Up @@ -170,7 +170,7 @@ private void SerializePairsFlat(IEnumerable<KeyValuePair<string, string>> pairs,


#endregion

#region Singles

/// <summary>
Expand Down Expand Up @@ -215,7 +215,7 @@ private void SerializeSinglesJson(IEnumerable<string> values, StringBuilder buil
}
}

private void SerializeSingleJson(StringBuilder builder, string value)
private static void SerializeSingleJson(StringBuilder builder, string value)
{
// Quoted value
AppendQuoted(builder, value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent)
return;
}

builder.Append(connection.LocalPort.ToString());
builder.Append(connection.LocalPort);
#else
var request = httpContext.TryGetRequest();
if (request == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ protected override void DoAppend(StringBuilder builder, LogEventInfo logEvent)
return;
}

builder.Append(connection.RemotePort.ToString());
builder.Append(connection.RemotePort);
#else
var request = httpContext.TryGetRequest();
if (request == null)
Expand Down

0 comments on commit 4899155

Please sign in to comment.