use string per recommended style

This commit is contained in:
Mordechai Zuber
2015-12-16 14:28:01 +02:00
parent 439b058c15
commit 44304ca70b
185 changed files with 265 additions and 265 deletions

View File

@@ -91,7 +91,7 @@ namespace Octokit.Reactive
[Obsolete("Use GetArchive to download the archive instead")] [Obsolete("Use GetArchive to download the archive instead")]
public IObservable<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat) public IObservable<string> GetArchiveLink(string owner, string name, ArchiveFormat archiveFormat)
{ {
return GetArchiveLink(owner, name, archiveFormat, String.Empty); return GetArchiveLink(owner, name, archiveFormat, string.Empty);
} }
/// <summary> /// <summary>

View File

@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
static string CreateMessage(Type type, IEnumerable<string> methods) static string CreateMessage(Type type, IEnumerable<string> methods)
{ {
var methodsFormatted = String.Join("\r\n", methods.Select(m => String.Format(" - {0}", m))); var methodsFormatted = string.Join("\r\n", methods.Select(m => string.Format(" - {0}", m)));
return "Methods found on type {0} which should be removed:\r\n{1}" return "Methods found on type {0} which should be removed:\r\n{1}"
.FormatWithNewLine( .FormatWithNewLine(
type.Name, type.Name,

View File

@@ -21,14 +21,14 @@ namespace Octokit.Tests.Conventions
static string Format(ParameterInfo parameterInfo) static string Format(ParameterInfo parameterInfo)
{ {
return String.Format("{0} {1}", parameterInfo.ParameterType.Name, parameterInfo.Name); return string.Format("{0} {1}", parameterInfo.ParameterType.Name, parameterInfo.Name);
} }
static string Format(MethodInfo methodInfo) static string Format(MethodInfo methodInfo)
{ {
var parameters = methodInfo.GetParameters().Select(Format); var parameters = methodInfo.GetParameters().Select(Format);
return String.Format("{0} {1}({2})", methodInfo.ReturnType, methodInfo.Name, String.Join(", ", parameters)); return string.Format("{0} {1}({2})", methodInfo.ReturnType, methodInfo.Name, string.Join(", ", parameters));
} }
static string CreateMessage(Type observableInterface, Type clientInterface) static string CreateMessage(Type observableInterface, Type clientInterface)
@@ -36,8 +36,8 @@ namespace Octokit.Tests.Conventions
var mainMethods = clientInterface.GetMethodsOrdered(); var mainMethods = clientInterface.GetMethodsOrdered();
var observableMethods = observableInterface.GetMethodsOrdered(); var observableMethods = observableInterface.GetMethodsOrdered();
var formattedMainMethods = String.Join("\r\n", mainMethods.Select(Format).Select(m => String.Format(" - {0}", m))); var formattedMainMethods = string.Join("\r\n", mainMethods.Select(Format).Select(m => string.Format(" - {0}", m)));
var formattedObservableMethods = String.Join("\r\n", observableMethods.Select(Format).Select(m => String.Format(" - {0}", m))); var formattedObservableMethods = string.Join("\r\n", observableMethods.Select(Format).Select(m => string.Format(" - {0}", m)));
return return
"There are some overloads which are confusing the convention tests. Check everything is okay in these types:\r\n{0}\r\n{1}\r\n{2}\r\n{3}" "There are some overloads which are confusing the convention tests. Check everything is okay in these types:\r\n{0}\r\n{1}\r\n{2}\r\n{3}"

View File

@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
static string CreateMessage(Type type, IEnumerable<string> methods) static string CreateMessage(Type type, IEnumerable<string> methods)
{ {
var methodsFormatted = String.Join("\r\n", methods.Select(m => String.Format(" - {0}", m))); var methodsFormatted = string.Join("\r\n", methods.Select(m => string.Format(" - {0}", m)));
return "Methods not found on interface {0} which are required:\r\n{1}" return "Methods not found on interface {0} which are required:\r\n{1}"
.FormatWithNewLine(type.Name, methodsFormatted); .FormatWithNewLine(type.Name, methodsFormatted);
} }

View File

@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
static string CreateMessage(string type) static string CreateMessage(string type)
{ {
return String.Format("Could not find the interface {0}. Add this to the Octokit.Reactive project", type); return string.Format("Could not find the interface {0}. Add this to the Octokit.Reactive project", type);
} }
} }
} }

View File

@@ -15,7 +15,7 @@ namespace Octokit.Tests.Conventions
static string CreateMessage(Type type, IEnumerable<MethodInfo> methods) static string CreateMessage(Type type, IEnumerable<MethodInfo> methods)
{ {
var methodsFormatted = String.Join("\r\n", methods.Select(m => String.Format(" - {0}", m))); var methodsFormatted = string.Join("\r\n", methods.Select(m => string.Format(" - {0}", m)));
return "Methods found on type {0} should follow the 'GetAll*' naming convention:\r\n{1}" return "Methods found on type {0} should follow the 'GetAll*' naming convention:\r\n{1}"
.FormatWithNewLine( .FormatWithNewLine(
type.Name, type.Name,

View File

@@ -22,7 +22,7 @@ namespace Octokit.Tests.Conventions
static string CreateMethodSignature(IEnumerable<ParameterInfo> parameters) static string CreateMethodSignature(IEnumerable<ParameterInfo> parameters)
{ {
return String.Join(",", parameters.Select(p => String.Format("{0} {1}", p.ParameterType.Name, p.Name))); return string.Join(",", parameters.Select(p => string.Format("{0} {1}", p.ParameterType.Name, p.Name)));
} }
static string CreateMessage(MethodInfo method, IEnumerable<ParameterInfo> expected, IEnumerable<ParameterInfo> actual) static string CreateMessage(MethodInfo method, IEnumerable<ParameterInfo> expected, IEnumerable<ParameterInfo> actual)
@@ -30,7 +30,7 @@ namespace Octokit.Tests.Conventions
var expectedMethodSignature = CreateMethodSignature(expected); var expectedMethodSignature = CreateMethodSignature(expected);
var actualMethodSignature = CreateMethodSignature(actual); var actualMethodSignature = CreateMethodSignature(actual);
return String.Format("Method signature for {0}.{1} must be \"({2})\" but is \"({3})\"", method.DeclaringType.Name, method.Name, expectedMethodSignature, actualMethodSignature); return string.Format("Method signature for {0}.{1} must be \"({2})\" but is \"({3})\"", method.DeclaringType.Name, method.Name, expectedMethodSignature, actualMethodSignature);
} }
} }
} }

View File

@@ -20,7 +20,7 @@ namespace Octokit.Tests.Conventions
static string CreateParameterSignature(ParameterInfo parameter) static string CreateParameterSignature(ParameterInfo parameter)
{ {
return String.Format("{0} {1}", parameter.ParameterType.Name, parameter.Name); return string.Format("{0} {1}", parameter.ParameterType.Name, parameter.Name);
} }
static string CreateMessage(MethodInfo method, int position, ParameterInfo expected, ParameterInfo actual) static string CreateMessage(MethodInfo method, int position, ParameterInfo expected, ParameterInfo actual)
@@ -28,7 +28,7 @@ namespace Octokit.Tests.Conventions
var expectedMethodSignature = CreateParameterSignature(expected); var expectedMethodSignature = CreateParameterSignature(expected);
var actualMethodSignature = CreateParameterSignature(actual); var actualMethodSignature = CreateParameterSignature(actual);
return String.Format("Parameter {0} for method {1}.{2} must be \"{3}\" but is \"{4}\"", position, method.DeclaringType.Name, method.Name, expectedMethodSignature, actualMethodSignature); return string.Format("Parameter {0} for method {1}.{2} must be \"{3}\" but is \"{4}\"", position, method.DeclaringType.Name, method.Name, expectedMethodSignature, actualMethodSignature);
} }
} }
} }

View File

@@ -20,7 +20,7 @@ namespace Octokit.Tests.Conventions
static string CreateMessage(MethodInfo method, Type expected, Type actual) static string CreateMessage(MethodInfo method, Type expected, Type actual)
{ {
return String.Format("Return value for {0}.{1} must be \"{2}\" but is \"{3}\"", method.DeclaringType.Name, method.Name, expected, actual); return string.Format("Return value for {0}.{1} must be \"{2}\" but is \"{3}\"", method.DeclaringType.Name, method.Name, expected, actual);
} }
} }
} }

View File

@@ -10,7 +10,7 @@ namespace Octokit.Tests.Conventions
? s ? s
: s.Replace("\r\n", Environment.NewLine); : s.Replace("\r\n", Environment.NewLine);
return String.Format(template, args); return string.Format(template, args);
} }
} }
} }

View File

@@ -17,9 +17,9 @@ namespace Octokit.Tests.Integration.Clients
var created = await github.Authorization.Create(newAuthorization); var created = await github.Authorization.Create(newAuthorization);
Assert.False(String.IsNullOrWhiteSpace(created.Token)); Assert.False(string.IsNullOrWhiteSpace(created.Token));
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight)); Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken)); Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
var get = await github.Authorization.Get(created.Id); var get = await github.Authorization.Get(created.Id);
@@ -55,9 +55,9 @@ namespace Octokit.Tests.Integration.Clients
Helper.ClientSecret, Helper.ClientSecret,
newAuthorization); newAuthorization);
Assert.False(String.IsNullOrWhiteSpace(created.Token)); Assert.False(string.IsNullOrWhiteSpace(created.Token));
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight)); Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken)); Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
// we can then query it through the regular API // we can then query it through the regular API
var get = await github.Authorization.Get(created.Id); var get = await github.Authorization.Get(created.Id);
@@ -75,10 +75,10 @@ namespace Octokit.Tests.Integration.Clients
Assert.Equal(created.Id, getExisting.Id); Assert.Equal(created.Id, getExisting.Id);
// the token is no longer returned for subsequent calls // the token is no longer returned for subsequent calls
Assert.True(String.IsNullOrWhiteSpace(getExisting.Token)); Assert.True(string.IsNullOrWhiteSpace(getExisting.Token));
// however the hashed and last 8 characters are available // however the hashed and last 8 characters are available
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight)); Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken)); Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
await github.Authorization.Delete(created.Id); await github.Authorization.Delete(created.Id);
} }
@@ -100,7 +100,7 @@ namespace Octokit.Tests.Integration.Clients
newAuthorization); newAuthorization);
Assert.NotNull(created); Assert.NotNull(created);
Assert.False(String.IsNullOrWhiteSpace(created.Token)); Assert.False(string.IsNullOrWhiteSpace(created.Token));
// we can then query it through the regular API // we can then query it through the regular API
var get = await github.Authorization.Get(created.Id); var get = await github.Authorization.Get(created.Id);
@@ -119,12 +119,12 @@ namespace Octokit.Tests.Integration.Clients
// NOTE: the new API will no longer return the full // NOTE: the new API will no longer return the full
// token as soon as you specify a Fingerprint // token as soon as you specify a Fingerprint
Assert.True(String.IsNullOrWhiteSpace(getExisting.Token)); Assert.True(string.IsNullOrWhiteSpace(getExisting.Token));
// NOTE: however you will get these two new properties // NOTE: however you will get these two new properties
// to help identify the authorization at hand // to help identify the authorization at hand
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight)); Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken)); Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
await github.Authorization.Delete(created.Id); await github.Authorization.Delete(created.Id);
} }

View File

@@ -30,7 +30,7 @@ public class BlobClientTests : IDisposable
var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob); var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob);
Assert.False(String.IsNullOrWhiteSpace(result.Sha)); Assert.False(string.IsNullOrWhiteSpace(result.Sha));
} }
[IntegrationTest] [IntegrationTest]
@@ -47,7 +47,7 @@ public class BlobClientTests : IDisposable
var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob); var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob);
Assert.False(String.IsNullOrWhiteSpace(result.Sha)); Assert.False(string.IsNullOrWhiteSpace(result.Sha));
} }
[IntegrationTest] [IntegrationTest]

View File

@@ -29,7 +29,7 @@ public class GitHubClientTests
Assert.True(result.Links.Count == 0); Assert.True(result.Links.Count == 0);
Assert.True(result.AcceptedOauthScopes.Count > -1); Assert.True(result.AcceptedOauthScopes.Count > -1);
Assert.True(result.OauthScopes.Count > -1); Assert.True(result.OauthScopes.Count > -1);
Assert.False(String.IsNullOrEmpty(result.Etag)); Assert.False(string.IsNullOrEmpty(result.Etag));
Assert.True(result.RateLimit.Limit > 0); Assert.True(result.RateLimit.Limit > 0);
Assert.True(result.RateLimit.Remaining > -1); Assert.True(result.RateLimit.Remaining > -1);
Assert.NotNull(result.RateLimit.Reset); Assert.NotNull(result.RateLimit.Reset);
@@ -50,7 +50,7 @@ public class GitHubClientTests
Assert.True(result.Links.Count > 0); Assert.True(result.Links.Count > 0);
Assert.True(result.AcceptedOauthScopes.Count > -1); Assert.True(result.AcceptedOauthScopes.Count > -1);
Assert.True(result.OauthScopes.Count > -1); Assert.True(result.OauthScopes.Count > -1);
Assert.False(String.IsNullOrEmpty(result.Etag)); Assert.False(string.IsNullOrEmpty(result.Etag));
Assert.True(result.RateLimit.Limit > 0); Assert.True(result.RateLimit.Limit > 0);
Assert.True(result.RateLimit.Remaining > -1); Assert.True(result.RateLimit.Remaining > -1);
Assert.NotNull(result.RateLimit.Reset); Assert.NotNull(result.RateLimit.Reset);
@@ -70,7 +70,7 @@ public class GitHubClientTests
Assert.True(result.Links.Count == 0); Assert.True(result.Links.Count == 0);
Assert.True(result.AcceptedOauthScopes.Count > 0); Assert.True(result.AcceptedOauthScopes.Count > 0);
Assert.True(result.OauthScopes.Count > 0); Assert.True(result.OauthScopes.Count > 0);
Assert.False(String.IsNullOrEmpty(result.Etag)); Assert.False(string.IsNullOrEmpty(result.Etag));
Assert.True(result.RateLimit.Limit > 0); Assert.True(result.RateLimit.Limit > 0);
Assert.True(result.RateLimit.Remaining > -1); Assert.True(result.RateLimit.Remaining > -1);
Assert.NotNull(result.RateLimit.Reset); Assert.NotNull(result.RateLimit.Reset);

View File

@@ -33,7 +33,7 @@ public class ReferencesClientTests : IDisposable
// validate the git reference // validate the git reference
Assert.Equal(TaggedType.Commit, @ref.Object.Type); Assert.Equal(TaggedType.Commit, @ref.Object.Type);
Assert.False(String.IsNullOrWhiteSpace(@ref.Object.Sha)); Assert.False(string.IsNullOrWhiteSpace(@ref.Object.Sha));
} }
[IntegrationTest] [IntegrationTest]

View File

@@ -237,7 +237,7 @@ public class ReleasesClientTests
var response = await _github.Connection.Get<object>(new Uri(asset.Url), new Dictionary<string, string>(), "application/octet-stream"); var response = await _github.Connection.Get<object>(new Uri(asset.Url), new Dictionary<string, string>(), "application/octet-stream");
var textContent = String.Empty; var textContent = string.Empty;
using (var zipstream = new MemoryStream((byte[])response.Body)) using (var zipstream = new MemoryStream((byte[])response.Body))
using (var archive = new ZipArchive(zipstream)) using (var archive = new ZipArchive(zipstream))

View File

@@ -51,7 +51,7 @@ namespace Octokit.Tests.Integration.Clients
var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork()); var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork());
Assert.NotNull(forkCreated); Assert.NotNull(forkCreated);
Assert.Equal(String.Format("{0}/octokit.net", Helper.UserName), forkCreated.FullName); Assert.Equal(string.Format("{0}/octokit.net", Helper.UserName), forkCreated.FullName);
Assert.Equal(true, forkCreated.Fork); Assert.Equal(true, forkCreated.Fork);
} }
@@ -68,7 +68,7 @@ namespace Octokit.Tests.Integration.Clients
var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork { Organization = Helper.Organization }); var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork { Organization = Helper.Organization });
Assert.NotNull(forkCreated); Assert.NotNull(forkCreated);
Assert.Equal(String.Format("{0}/octokit.net", Helper.Organization), forkCreated.FullName); Assert.Equal(string.Format("{0}/octokit.net", Helper.Organization), forkCreated.FullName);
Assert.Equal(true, forkCreated.Fork); Assert.Equal(true, forkCreated.Fork);
} }
} }

View File

@@ -71,7 +71,7 @@ namespace Octokit.Tests.Integration
{ {
get get
{ {
return !String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_OAUTHTOKEN")); return !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_OAUTHTOKEN"));
} }
} }
@@ -79,7 +79,7 @@ namespace Octokit.Tests.Integration
{ {
get get
{ {
return !String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_PRIVATEREPOSITORIES")); return !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_PRIVATEREPOSITORIES"));
} }
} }

View File

@@ -19,8 +19,8 @@ namespace Octokit.Tests.Integration
public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute) public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute)
{ {
if (String.IsNullOrWhiteSpace(Helper.ClientId) if (string.IsNullOrWhiteSpace(Helper.ClientId)
&& String.IsNullOrWhiteSpace(Helper.ClientSecret)) && string.IsNullOrWhiteSpace(Helper.ClientSecret))
{ {
return Enumerable.Empty<IXunitTestCase>(); return Enumerable.Empty<IXunitTestCase>();
} }

View File

@@ -214,7 +214,7 @@ namespace Octokit.Tests.Clients
await fixture.UploadAsset(release, uploadData); await fixture.UploadAsset(release, uploadData);
apiConnection.Received().Post<ReleaseAsset>(Arg.Any<Uri>(), uploadData.RawData, Arg.Any<String>(), uploadData.ContentType, newTimeout); apiConnection.Received().Post<ReleaseAsset>(Arg.Any<Uri>(), uploadData.RawData, Arg.Any<string>(), uploadData.ContentType, newTimeout);
} }
} }

View File

@@ -676,7 +676,7 @@ namespace Octokit.Tests.Clients
connection.Received().Get<SearchRepositoryResult>( connection.Received().Get<SearchRepositoryResult>(
Arg.Is<Uri>(u => u.ToString() == "search/repositories"), Arg.Is<Uri>(u => u.ToString() == "search/repositories"),
Arg.Is<Dictionary<string, string>>(d => Arg.Is<Dictionary<string, string>>(d =>
String.IsNullOrEmpty(d["q"]))); string.IsNullOrEmpty(d["q"])));
} }
} }

View File

@@ -8,13 +8,13 @@ public static class ReflectionExtensions
{ {
public static string GetAsyncVoidMethodsList(this Assembly assembly) public static string GetAsyncVoidMethodsList(this Assembly assembly)
{ {
return String.Join("\r\n", return string.Join("\r\n",
GetLoadableTypes(assembly) GetLoadableTypes(assembly)
.SelectMany(type => type.GetMethods()) .SelectMany(type => type.GetMethods())
.Where(HasAttribute<AsyncStateMachineAttribute>) .Where(HasAttribute<AsyncStateMachineAttribute>)
.Where(method => method.ReturnType == typeof(void)) .Where(method => method.ReturnType == typeof(void))
.Select(method => .Select(method =>
String.Format("Method '{0}' of '{1}' has an async void return type and that's bad", string.Format("Method '{0}' of '{1}' has an async void return type and that's bad",
method.Name, method.Name,
method.DeclaringType.Name)) method.DeclaringType.Name))
.ToList()); .ToList());

View File

@@ -22,7 +22,7 @@ public class SearchCodeRequestTests
public void SortNotSpecifiedByDefault() public void SortNotSpecifiedByDefault()
{ {
var request = new SearchCodeRequest("test"); var request = new SearchCodeRequest("test");
Assert.True(String.IsNullOrWhiteSpace(request.Sort)); Assert.True(string.IsNullOrWhiteSpace(request.Sort));
Assert.False(request.Parameters.ContainsKey("sort")); Assert.False(request.Parameters.ContainsKey("sort"));
} }
} }

View File

@@ -22,7 +22,7 @@ internal class SearchIssuesRequestTests
public void SortNotSpecifiedByDefault() public void SortNotSpecifiedByDefault()
{ {
var request = new SearchIssuesRequest("test"); var request = new SearchIssuesRequest("test");
Assert.True(String.IsNullOrWhiteSpace(request.Sort)); Assert.True(string.IsNullOrWhiteSpace(request.Sort));
Assert.False(request.Parameters.ContainsKey("sort")); Assert.False(request.Parameters.ContainsKey("sort"));
} }
} }

View File

@@ -22,7 +22,7 @@ public class SearchRepositoryRequestTests
public void SortNotSpecifiedByDefault() public void SortNotSpecifiedByDefault()
{ {
var request = new SearchCodeRequest("test"); var request = new SearchCodeRequest("test");
Assert.True(String.IsNullOrWhiteSpace(request.Sort)); Assert.True(string.IsNullOrWhiteSpace(request.Sort));
Assert.False(request.Parameters.ContainsKey("sort")); Assert.False(request.Parameters.ContainsKey("sort"));
} }
} }

View File

@@ -22,7 +22,7 @@ internal class SearchUsersRequestTests
public void SortNotSpecifiedByDefault() public void SortNotSpecifiedByDefault()
{ {
var request = new SearchUsersRequest("shiftkey"); var request = new SearchUsersRequest("shiftkey");
Assert.True(String.IsNullOrWhiteSpace(request.Sort)); Assert.True(string.IsNullOrWhiteSpace(request.Sort));
Assert.False(request.Parameters.ContainsKey("sort")); Assert.False(request.Parameters.ContainsKey("sort"));
} }
} }

View File

@@ -82,7 +82,7 @@ namespace Octokit
{ {
string errorMessage = e.ApiError.FirstErrorMessageSafe(); string errorMessage = e.ApiError.FirstErrorMessageSafe();
if (String.Equals( if (string.Equals(
"name already exists on this account", "name already exists on this account",
errorMessage, errorMessage,
StringComparison.OrdinalIgnoreCase)) StringComparison.OrdinalIgnoreCase))
@@ -101,7 +101,7 @@ namespace Octokit
baseAddress, e); baseAddress, e);
} }
if (String.Equals( if (string.Equals(
"please upgrade your plan to create a new private repository.", "please upgrade your plan to create a new private repository.",
errorMessage, errorMessage,
StringComparison.OrdinalIgnoreCase)) StringComparison.OrdinalIgnoreCase))
@@ -109,7 +109,7 @@ namespace Octokit
throw new PrivateRepositoryQuotaExceededException(e); throw new PrivateRepositoryQuotaExceededException(e);
} }
if (String.Equals( if (string.Equals(
"name can't be private. You are over your quota.", "name can't be private. You are over your quota.",
errorMessage, errorMessage,
StringComparison.OrdinalIgnoreCase)) StringComparison.OrdinalIgnoreCase))

View File

@@ -75,7 +75,7 @@ namespace Octokit
Ensure.ArgumentNotNullOrEmptyString(name, "name"); Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(newTree, "newTree"); Ensure.ArgumentNotNull(newTree, "newTree");
if (newTree.Tree.Any(t => String.IsNullOrWhiteSpace(t.Mode))) if (newTree.Tree.Any(t => string.IsNullOrWhiteSpace(t.Mode)))
{ {
throw new ArgumentException("You have specified items in the tree which do not have a Mode value set."); throw new ArgumentException("You have specified items in the tree which do not have a Mode value set.");
} }

View File

@@ -44,7 +44,7 @@ namespace Octokit
public Task<IReadOnlyList<EmailAddress>> Add(params string[] emailAddresses) public Task<IReadOnlyList<EmailAddress>> Add(params string[] emailAddresses)
{ {
Ensure.ArgumentNotNull(emailAddresses, "emailAddresses"); Ensure.ArgumentNotNull(emailAddresses, "emailAddresses");
if (emailAddresses.Any(String.IsNullOrWhiteSpace)) if (emailAddresses.Any(string.IsNullOrWhiteSpace))
throw new ArgumentException("Cannot contain null, empty or whitespace values", "emailAddresses"); throw new ArgumentException("Cannot contain null, empty or whitespace values", "emailAddresses");
return ApiConnection.Post<IReadOnlyList<EmailAddress>>(ApiUrls.Emails(), emailAddresses); return ApiConnection.Post<IReadOnlyList<EmailAddress>>(ApiUrls.Emails(), emailAddresses);
@@ -61,7 +61,7 @@ namespace Octokit
public Task Delete(params string[] emailAddresses) public Task Delete(params string[] emailAddresses)
{ {
Ensure.ArgumentNotNull(emailAddresses, "emailAddresses"); Ensure.ArgumentNotNull(emailAddresses, "emailAddresses");
if (emailAddresses.Any(String.IsNullOrWhiteSpace)) if (emailAddresses.Any(string.IsNullOrWhiteSpace))
throw new ArgumentException("Cannot contain null, empty or whitespace values", "emailAddresses"); throw new ArgumentException("Cannot contain null, empty or whitespace values", "emailAddresses");
return ApiConnection.Delete(ApiUrls.Emails(), emailAddresses); return ApiConnection.Delete(ApiUrls.Emails(), emailAddresses);

View File

@@ -126,7 +126,7 @@ namespace Octokit
{ {
try try
{ {
if (!String.IsNullOrEmpty(responseContent)) if (!string.IsNullOrEmpty(responseContent))
{ {
return _jsonSerializer.Deserialize<ApiError>(responseContent) ?? new ApiError(responseContent); return _jsonSerializer.Deserialize<ApiError>(responseContent) ?? new ApiError(responseContent);
} }

View File

@@ -60,7 +60,7 @@ namespace Octokit
RepositoryName = name; RepositoryName = name;
_message = String.Format(CultureInfo.InvariantCulture, "There is already a repository named '{0}' for the current account.", name); _message = string.Format(CultureInfo.InvariantCulture, "There is already a repository named '{0}' for the current account.", name);
} }
/// <summary> /// <summary>

View File

@@ -19,7 +19,7 @@ namespace Octokit
if (input == null) if (input == null)
return null; return null;
return input.Select(item => new String(item.ToCharArray())).ToList(); return input.Select(item => new string(item.ToCharArray())).ToList();
} }
public static IDictionary<string, Uri> Clone(this IReadOnlyDictionary<string, Uri> input) public static IDictionary<string, Uri> Clone(this IReadOnlyDictionary<string, Uri> input)
@@ -27,7 +27,7 @@ namespace Octokit
if (input == null) if (input == null)
return null; return null;
return input.ToDictionary(item => new String(item.Key.ToCharArray()), item => new Uri(item.Value.ToString())); return input.ToDictionary(item => new string(item.Key.ToCharArray()), item => new Uri(item.Value.ToString()));
} }
} }
} }

View File

@@ -109,14 +109,14 @@ namespace Octokit
if (char.IsUpper(letters[i]) && !char.IsWhiteSpace(previousChar)) if (char.IsUpper(letters[i]) && !char.IsWhiteSpace(previousChar))
{ {
//Grab everything before the current character. //Grab everything before the current character.
yield return new String(letters, wordStartIndex, i - wordStartIndex); yield return new string(letters, wordStartIndex, i - wordStartIndex);
wordStartIndex = i; wordStartIndex = i;
} }
previousChar = letters[i]; previousChar = letters[i];
} }
//We need to have the last word. //We need to have the last word.
yield return new String(letters, wordStartIndex, letters.Length - wordStartIndex); yield return new string(letters, wordStartIndex, letters.Length - wordStartIndex);
} }
// the rule: // the rule:

View File

@@ -55,7 +55,7 @@ namespace Octokit
Func<string, string, string> mapValueFunc = (key, value) => key == "q" ? value : Uri.EscapeDataString(value); Func<string, string, string> mapValueFunc = (key, value) => key == "q" ? value : Uri.EscapeDataString(value);
string query = String.Join("&", p.Select(kvp => kvp.Key + "=" + mapValueFunc(kvp.Key, kvp.Value))); string query = string.Join("&", p.Select(kvp => kvp.Key + "=" + mapValueFunc(kvp.Key, kvp.Value)));
if (uri.IsAbsoluteUri) if (uri.IsAbsoluteUri)
{ {
var uriBuilder = new UriBuilder(uri) var uriBuilder = new UriBuilder(uri)

View File

@@ -66,7 +66,7 @@ namespace Octokit
return new ApiInfo(Links.Clone(), return new ApiInfo(Links.Clone(),
OauthScopes.Clone(), OauthScopes.Clone(),
AcceptedOauthScopes.Clone(), AcceptedOauthScopes.Clone(),
new String(this.Etag.ToCharArray()), new string(this.Etag.ToCharArray()),
RateLimit.Clone()); RateLimit.Clone());
} }
} }

View File

@@ -125,7 +125,7 @@ namespace Octokit
if (!baseAddress.IsAbsoluteUri) if (!baseAddress.IsAbsoluteUri)
{ {
throw new ArgumentException( throw new ArgumentException(
String.Format(CultureInfo.InvariantCulture, "The base address '{0}' must be an absolute URI", string.Format(CultureInfo.InvariantCulture, "The base address '{0}' must be an absolute URI",
baseAddress), "baseAddress"); baseAddress), "baseAddress");
} }
@@ -357,12 +357,12 @@ namespace Octokit
Task<IApiResponse<T>> SendDataInternal<T>(object body, string accepts, string contentType, CancellationToken cancellationToken, string twoFactorAuthenticationCode, Request request) Task<IApiResponse<T>> SendDataInternal<T>(object body, string accepts, string contentType, CancellationToken cancellationToken, string twoFactorAuthenticationCode, Request request)
{ {
if (!String.IsNullOrEmpty(accepts)) if (!string.IsNullOrEmpty(accepts))
{ {
request.Headers["Accept"] = accepts; request.Headers["Accept"] = accepts;
} }
if (!String.IsNullOrEmpty(twoFactorAuthenticationCode)) if (!string.IsNullOrEmpty(twoFactorAuthenticationCode))
{ {
request.Headers["X-GitHub-OTP"] = twoFactorAuthenticationCode; request.Headers["X-GitHub-OTP"] = twoFactorAuthenticationCode;
} }
@@ -593,7 +593,7 @@ namespace Octokit
if (restResponse == null || restResponse.Headers == null || !restResponse.Headers.Any()) return TwoFactorType.None; if (restResponse == null || restResponse.Headers == null || !restResponse.Headers.Any()) return TwoFactorType.None;
var otpHeader = restResponse.Headers.FirstOrDefault(header => var otpHeader = restResponse.Headers.FirstOrDefault(header =>
header.Key.Equals("X-GitHub-OTP", StringComparison.OrdinalIgnoreCase)); header.Key.Equals("X-GitHub-OTP", StringComparison.OrdinalIgnoreCase));
if (String.IsNullOrEmpty(otpHeader.Value)) return TwoFactorType.None; if (string.IsNullOrEmpty(otpHeader.Value)) return TwoFactorType.None;
var factorType = otpHeader.Value; var factorType = otpHeader.Value;
var parts = factorType.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries); var parts = factorType.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
if (parts.Length > 0 && parts[0] == "required") if (parts.Length > 0 && parts[0] == "required")

View File

@@ -226,7 +226,7 @@ namespace Octokit.Internal
} }
} }
newRequest.RequestUri = response.Headers.Location; newRequest.RequestUri = response.Headers.Location;
if (String.Compare(newRequest.RequestUri.Host, request.RequestUri.Host, StringComparison.OrdinalIgnoreCase) != 0) if (string.Compare(newRequest.RequestUri.Host, request.RequestUri.Host, StringComparison.OrdinalIgnoreCase) != 0)
{ {
newRequest.Headers.Authorization = null; newRequest.Headers.Authorization = null;
} }

View File

@@ -49,7 +49,7 @@ namespace Octokit.Internal
{ {
var body = response.Body as string; var body = response.Body as string;
// simple json does not support the root node being empty. Will submit a pr but in the mean time.... // simple json does not support the root node being empty. Will submit a pr but in the mean time....
if (!String.IsNullOrEmpty(body) && body != "{}") if (!string.IsNullOrEmpty(body) && body != "{}")
{ {
var typeIsDictionary = typeof(IDictionary).IsAssignableFrom(typeof(T)); var typeIsDictionary = typeof(IDictionary).IsAssignableFrom(typeof(T));
var typeIsEnumerable = typeof(IEnumerable).IsAssignableFrom(typeof(T)); var typeIsEnumerable = typeof(IEnumerable).IsAssignableFrom(typeof(T));

View File

@@ -96,7 +96,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Limit {0}, Remaining {1}, Reset {2} ", Limit, Remaining, Reset); return string.Format(CultureInfo.InvariantCulture, "Limit {0}, Remaining {1}, Reset {2} ", Limit, Remaining, Reset);
} }
} }

View File

@@ -55,7 +55,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "Name: {0} Email: {1} Date: {2}", Name, Email, Date); } get { return string.Format(CultureInfo.InvariantCulture, "Name: {0} Email: {1} Date: {2}", Name, Email, Date); }
} }
} }
} }

View File

@@ -46,7 +46,7 @@ namespace Octokit
get get
{ {
var scopes = Scopes ?? new List<string>(); var scopes = Scopes ?? new List<string>();
return String.Format(CultureInfo.InvariantCulture, "Scopes: {0} ", string.Join(",", scopes)); return string.Format(CultureInfo.InvariantCulture, "Scopes: {0} ", string.Join(",", scopes));
} }
} }
} }

View File

@@ -85,7 +85,7 @@ namespace Octokit
{ {
get get
{ {
var mergedParameters = String.Join("+", MergedQualifiers()); var mergedParameters = string.Join("+", MergedQualifiers());
return Term + (mergedParameters.IsNotBlank() ? "+" + mergedParameters : ""); return Term + (mergedParameters.IsNotBlank() ? "+" + mergedParameters : "");
} }
} }
@@ -104,7 +104,7 @@ namespace Octokit
, { "order", SortOrder } , { "order", SortOrder }
, { "q", TermAndQualifiers } , { "q", TermAndQualifiers }
}; };
if (!String.IsNullOrWhiteSpace(Sort)) if (!string.IsNullOrWhiteSpace(Sort))
{ {
d.Add("sort", Sort); d.Add("sort", Sort);
} }

View File

@@ -39,7 +39,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Sha: {0} ", Sha); return string.Format(CultureInfo.InvariantCulture, "Sha: {0} ", Sha);
} }
} }
} }

View File

@@ -66,7 +66,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message); return string.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message);
} }
} }
} }
@@ -100,7 +100,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Message: {0} Content: {1}", Message, Content); return string.Format(CultureInfo.InvariantCulture, "Message: {0} Content: {1}", Message, Content);
} }
} }
} }
@@ -128,7 +128,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message); return string.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message);
} }
} }
} }

View File

@@ -61,7 +61,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, return string.Format(CultureInfo.InvariantCulture,
"Repository Hook: Replacing Events: {0}, Adding Events: {1}, Removing Events: {2}", Events == null ? "no" : string.Join(", ", Events), "Repository Hook: Replacing Events: {0}, Adding Events: {1}, Removing Events: {2}", Events == null ? "no" : string.Join(", ", Events),
AddEvents == null ? "no" : string.Join(", ", AddEvents), AddEvents == null ? "no" : string.Join(", ", AddEvents),
RemoveEvents == null ? "no" : string.Join(", ", RemoveEvents)); RemoveEvents == null ? "no" : string.Join(", ", RemoveEvents));

View File

@@ -31,7 +31,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "NewFileName: {0}", NewFileName); } get { return string.Format(CultureInfo.InvariantCulture, "NewFileName: {0}", NewFileName); }
} }
} }
} }

View File

@@ -37,7 +37,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Since: {0}", Since); return string.Format(CultureInfo.InvariantCulture, "Since: {0}", Since);
} }
} }
} }

View File

@@ -34,7 +34,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); } get { return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); }
} }
} }
} }

View File

@@ -83,7 +83,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Filter: {0} State: {1}", Filter, State); return string.Format(CultureInfo.InvariantCulture, "Filter: {0} State: {1}", Filter, State);
} }
} }
} }

View File

@@ -58,7 +58,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title); return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
} }
} }

View File

@@ -53,7 +53,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0}", Name); return string.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
} }
} }
} }

View File

@@ -32,7 +32,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "LastReadAt: {0}", LastReadAt); } get { return string.Format(CultureInfo.InvariantCulture, "LastReadAt: {0}", LastReadAt); }
} }
} }
} }

View File

@@ -27,7 +27,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Message: '{0}', Sha: '{1}'", CommitMessage, Sha); return string.Format(CultureInfo.InvariantCulture, "Message: '{0}', Sha: '{1}'", CommitMessage, Sha);
} }
} }
} }

View File

@@ -30,7 +30,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "State {0} ", State); return string.Format(CultureInfo.InvariantCulture, "State {0} ", State);
} }
} }
} }

View File

@@ -34,7 +34,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Title: {0} State: {1}", Title, State); return string.Format(CultureInfo.InvariantCulture, "Title: {0} State: {1}", Title, State);
} }
} }
} }

View File

@@ -92,7 +92,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Text: {0}", Text); return string.Format(CultureInfo.InvariantCulture, "Text: {0}", Text);
} }
} }
} }

View File

@@ -67,7 +67,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Note: {0}", Note); return string.Format(CultureInfo.InvariantCulture, "Note: {0}", Note);
} }
} }
} }

View File

@@ -24,7 +24,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Encoding: {0}", Encoding); return string.Format(CultureInfo.InvariantCulture, "Encoding: {0}", Encoding);
} }
} }
} }

View File

@@ -101,7 +101,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Message: {0}", Message); return string.Format(CultureInfo.InvariantCulture, "Message: {0}", Message);
} }
} }
} }

View File

@@ -40,7 +40,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Path: {0}, Body: {1}", Path, Body); return string.Format(CultureInfo.InvariantCulture, "Path: {0}, Body: {1}", Path, Body);
} }
} }
} }

View File

@@ -36,7 +36,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Description: {0}, Context: {1}", Description, Context); return string.Format(CultureInfo.InvariantCulture, "Description: {0}, Context: {1}", Description, Context);
} }
} }
} }

View File

@@ -40,7 +40,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "Key: {0}, Title: {1}", Key, Title); } get { return string.Format(CultureInfo.InvariantCulture, "Key: {0}, Title: {1}", Key, Title); }
} }
} }
} }

View File

@@ -80,7 +80,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
} }
} }
} }

View File

@@ -40,7 +40,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "State: {0}", State); return string.Format(CultureInfo.InvariantCulture, "State: {0}", State);
} }
} }
} }

View File

@@ -36,7 +36,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
} }
} }
} }

View File

@@ -61,7 +61,7 @@ namespace Octokit
get get
{ {
var labels = Labels ?? new Collection<string>(); var labels = Labels ?? new Collection<string>();
return String.Format(CultureInfo.InvariantCulture, "Title: {0} Labels: {1}", Title, string.Join(",", labels)); return string.Format(CultureInfo.InvariantCulture, "Title: {0} Labels: {1}", Title, string.Join(",", labels));
} }
} }
} }

View File

@@ -53,7 +53,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0}", Name); return string.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
} }
} }
} }

View File

@@ -61,7 +61,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Message: {0}", CommitMessage); return string.Format(CultureInfo.InvariantCulture, "Message: {0}", CommitMessage);
} }
} }
} }

View File

@@ -46,7 +46,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Title {0} State: {1}", Title, State); return string.Format(CultureInfo.InvariantCulture, "Title {0} State: {1}", Title, State);
} }
} }
} }

View File

@@ -51,7 +51,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title); return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
} }
} }
} }

View File

@@ -70,7 +70,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Ref: {0} Sha: {1}", Ref, Sha); return string.Format(CultureInfo.InvariantCulture, "Ref: {0} Sha: {1}", Ref, Sha);
} }
} }
} }

View File

@@ -78,7 +78,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName); return string.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
} }
} }
} }

View File

@@ -87,7 +87,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Description: {1}", Name, Description); return string.Format(CultureInfo.InvariantCulture, "Name: {0} Description: {1}", Name, Description);
} }
} }
} }

View File

@@ -26,7 +26,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, return string.Format(CultureInfo.InvariantCulture,
"Repository Hook: Organization: {0}", Organization); "Repository Hook: Organization: {0}", Organization);
} }
} }

View File

@@ -109,7 +109,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, return string.Format(CultureInfo.InvariantCulture,
"Repository Hook: Name: {0}, Events: {1}", Name, string.Join(", ", Events)); "Repository Hook: Name: {0}, Events: {1}", Name, string.Join(", ", Events));
} }
} }

View File

@@ -33,7 +33,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored); return string.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
} }
} }
} }

View File

@@ -62,7 +62,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Tag {0} Type: {1}", Tag, Type); return string.Format(CultureInfo.InvariantCulture, "Tag {0} Type: {1}", Tag, Type);
} }
} }
} }

View File

@@ -55,7 +55,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Permission: {1}", Name, Permission); return string.Format(CultureInfo.InvariantCulture, "Name: {0} Permission: {1}", Name, Permission);
} }
} }
} }

View File

@@ -24,7 +24,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored); return string.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
} }
} }
} }

View File

@@ -35,7 +35,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "BaseTree: {0}", BaseTree); return string.Format(CultureInfo.InvariantCulture, "BaseTree: {0}", BaseTree);
} }
} }
} }

View File

@@ -46,7 +46,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "SHA: {0}, Path: {1}, Type: {2}", Sha, Path, Type); } get { return string.Format(CultureInfo.InvariantCulture, "SHA: {0}, Path: {1}, Type: {2}", Sha, Path, Type); }
} }
} }
} }

View File

@@ -40,7 +40,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "All: {0}, Participating: {1}, Since: {2}", All, Participating, Since); return string.Format(CultureInfo.InvariantCulture, "All: {0}, Participating: {1}, Since: {2}", All, Participating, Since);
} }
} }
} }

View File

@@ -64,7 +64,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "ClientId: {0}, RedirectUri: {1}, Scopes: {2}", return string.Format(CultureInfo.InvariantCulture, "ClientId: {0}, RedirectUri: {1}, Scopes: {2}",
ClientId, ClientId,
RedirectUri, RedirectUri,
Scopes); Scopes);

View File

@@ -61,7 +61,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "ClientId: {0}, ClientSecret: {1}, Code: {2}, RedirectUri: {3}", return string.Format(CultureInfo.InvariantCulture, "ClientId: {0}, ClientSecret: {1}, Code: {2}, RedirectUri: {3}",
ClientId, ClientId,
ClientSecret, ClientSecret,
Code, Code,

View File

@@ -48,7 +48,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "{0}", Name); return string.Format(CultureInfo.InvariantCulture, "{0}", Name);
} }
} }
} }

View File

@@ -33,7 +33,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Since: {0} ", Since); return string.Format(CultureInfo.InvariantCulture, "Since: {0} ", Since);
} }
} }
} }

View File

@@ -49,7 +49,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Base: {0} ", Base); return string.Format(CultureInfo.InvariantCulture, "Base: {0} ", Base);
} }
} }
} }

View File

@@ -51,7 +51,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "CommitId: {0}, Path: {1}, Position: {2}", CommitId, Path, Position); } get { return string.Format(CultureInfo.InvariantCulture, "CommitId: {0}, Path: {1}, Position: {2}", CommitId, Path, Position); }
} }
} }
} }

View File

@@ -28,7 +28,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "Body: {0}", Body); } get { return string.Format(CultureInfo.InvariantCulture, "Body: {0}", Body); }
} }
} }
} }

View File

@@ -35,7 +35,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "InReplyTo: {0}, Body: {1}", InReplyTo, Body); } get { return string.Format(CultureInfo.InvariantCulture, "InReplyTo: {0}, Body: {1}", InReplyTo, Body); }
} }
} }
} }

View File

@@ -38,7 +38,7 @@ namespace Octokit
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.InvariantCulture, "Sort: {0}, Direction: {1}, Since: {2}", Sort, Direction, Since); } get { return string.Format(CultureInfo.InvariantCulture, "Sort: {0}, Direction: {1}, Since: {2}", Sort, Direction, Since); }
} }
} }
} }

View File

@@ -29,7 +29,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title); return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
} }
} }
} }

View File

@@ -55,7 +55,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Sha: {0} Force: {1}", Sha, Force); return string.Format(CultureInfo.InvariantCulture, "Sha: {0} Force: {1}", Sha, Force);
} }
} }
} }

View File

@@ -37,7 +37,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name {0} Label: {1}", Name, Label); return string.Format(CultureInfo.InvariantCulture, "Name {0} Label: {1}", Name, Label);
} }
} }
} }

View File

@@ -77,7 +77,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "FileName: {0} ", FileName); return string.Format(CultureInfo.InvariantCulture, "FileName: {0} ", FileName);
} }
} }
} }

View File

@@ -68,7 +68,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName); return string.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
} }
} }
} }

View File

@@ -30,7 +30,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Sort: {0}", Sort); return string.Format(CultureInfo.InvariantCulture, "Sort: {0}", Sort);
} }
} }
} }

View File

@@ -41,7 +41,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Type: {0}, Sort: {1}, Direction: {2}", Type, Sort, Direction); return string.Format(CultureInfo.InvariantCulture, "Type: {0}, Sort: {1}, Direction: {2}", Type, Sort, Direction);
} }
} }
} }

View File

@@ -49,7 +49,7 @@ namespace Octokit
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal string DebuggerDisplay internal string DebuggerDisplay
{ {
get { return String.Format(CultureInfo.CurrentCulture, "RepositoryUpdate: Name: {0}", Name); } get { return string.Format(CultureInfo.CurrentCulture, "RepositoryUpdate: Name: {0}", Name); }
} }
} }
} }

View File

@@ -54,7 +54,7 @@ namespace Octokit
return (prop, value) => return (prop, value) =>
{ {
var list = ((IEnumerable<string>)value).ToArray(); var list = ((IEnumerable<string>)value).ToArray();
return !list.Any() ? null : String.Join(",", list); return !list.Any() ? null : string.Join(",", list);
}; };
} }

View File

@@ -148,45 +148,45 @@ namespace Octokit
if (In != null) if (In != null)
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "in:{0}", parameters.Add(string.Format(CultureInfo.InvariantCulture, "in:{0}",
String.Join(",", In.Select(i => i.ToParameter())))); string.Join(",", In.Select(i => i.ToParameter()))));
} }
if (Language != null) if (Language != null)
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter())); parameters.Add(string.Format(CultureInfo.InvariantCulture, "language:{0}", Language.ToParameter()));
} }
if (Forks != null) if (Forks != null)
{ {
// API is expecting 'true', bool.ToString() returns 'True', if there is a better way, // API is expecting 'true', bool.ToString() returns 'True', if there is a better way,
// please, oh please let me know... // please, oh please let me know...
parameters.Add(String.Format(CultureInfo.InvariantCulture, "fork:{0}", Forks.Value.ToString().ToLower())); parameters.Add(string.Format(CultureInfo.InvariantCulture, "fork:{0}", Forks.Value.ToString().ToLower()));
} }
if (Size != null) if (Size != null)
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "size:{0}", Size)); parameters.Add(string.Format(CultureInfo.InvariantCulture, "size:{0}", Size));
} }
if (Path.IsNotBlank()) if (Path.IsNotBlank())
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "path:{0}", Path)); parameters.Add(string.Format(CultureInfo.InvariantCulture, "path:{0}", Path));
} }
if (Extension.IsNotBlank()) if (Extension.IsNotBlank())
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "extension:{0}", Extension)); parameters.Add(string.Format(CultureInfo.InvariantCulture, "extension:{0}", Extension));
} }
if (FileName.IsNotBlank()) if (FileName.IsNotBlank())
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "filename:{0}", FileName)); parameters.Add(string.Format(CultureInfo.InvariantCulture, "filename:{0}", FileName));
} }
if (User.IsNotBlank()) if (User.IsNotBlank())
{ {
parameters.Add(String.Format(CultureInfo.InvariantCulture, "user:{0}", User)); parameters.Add(string.Format(CultureInfo.InvariantCulture, "user:{0}", User));
} }
if (Repos.Any()) if (Repos.Any())
@@ -208,7 +208,7 @@ namespace Octokit
{ {
get get
{ {
return String.Format(CultureInfo.InvariantCulture, "Term: {0} Sort: {1}", Term, Sort); return string.Format(CultureInfo.InvariantCulture, "Term: {0} Sort: {1}", Term, Sort);
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More