Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 2232405

Browse files
committed
Explicitly call string static methods
Let's not go overboard with C# 6
1 parent 56add34 commit 2232405

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/GitHub.Exports/Primitives/UriString.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Runtime.Serialization;
66
using System.Text.RegularExpressions;
77
using GitHub.Extensions;
8-
using static System.String;
98

109
namespace GitHub.Primitives
1110
{
@@ -47,7 +46,7 @@ public UriString(string uriString) : base(NormalizePath(uriString))
4746
if (RepositoryName != null)
4847
{
4948
NameWithOwner = Owner != null
50-
? Format(CultureInfo.InvariantCulture, "{0}/{1}", Owner, RepositoryName)
49+
? string.Format(CultureInfo.InvariantCulture, "{0}/{1}", Owner, RepositoryName)
5150
: RepositoryName;
5251
}
5352
}
@@ -167,7 +166,7 @@ public override UriString Combine(string addition)
167166
if (url != null)
168167
{
169168
var urlBuilder = new UriBuilder(url);
170-
if (!IsNullOrEmpty(urlBuilder.Query))
169+
if (!string.IsNullOrEmpty(urlBuilder.Query))
171170
{
172171
var query = urlBuilder.Query;
173172
if (query.StartsWith("?", StringComparison.Ordinal))
@@ -191,7 +190,7 @@ public override UriString Combine(string addition)
191190
}
192191
return ToUriString(urlBuilder.Uri);
193192
}
194-
return Concat(Value, addition);
193+
return string.Concat(Value, addition);
195194
}
196195

197196
public override string ToString()
@@ -228,7 +227,7 @@ static string NormalizePath(string path)
228227

229228
static string GetRepositoryName(string repositoryNameSegment)
230229
{
231-
if (IsNullOrEmpty(repositoryNameSegment)
230+
if (string.IsNullOrEmpty(repositoryNameSegment)
232231
|| repositoryNameSegment.Equals("/", StringComparison.Ordinal))
233232
{
234233
return null;

0 commit comments

Comments
 (0)