mirror of
https://github.com/zoriya/octokit.net.git
synced 2025-12-06 07:16:09 +00:00
use string per recommended style
This commit is contained in:
@@ -91,7 +91,7 @@ namespace Octokit.Reactive
|
||||
[Obsolete("Use GetArchive to download the archive instead")]
|
||||
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>
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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}"
|
||||
.FormatWithNewLine(
|
||||
type.Name,
|
||||
|
||||
@@ -21,14 +21,14 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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)
|
||||
{
|
||||
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)
|
||||
@@ -36,8 +36,8 @@ namespace Octokit.Tests.Conventions
|
||||
var mainMethods = clientInterface.GetMethodsOrdered();
|
||||
var observableMethods = observableInterface.GetMethodsOrdered();
|
||||
|
||||
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 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)));
|
||||
|
||||
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}"
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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}"
|
||||
.FormatWithNewLine(type.Name, methodsFormatted);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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}"
|
||||
.FormatWithNewLine(
|
||||
type.Name,
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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)
|
||||
@@ -30,7 +30,7 @@ namespace Octokit.Tests.Conventions
|
||||
var expectedMethodSignature = CreateMethodSignature(expected);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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)
|
||||
@@ -28,7 +28,7 @@ namespace Octokit.Tests.Conventions
|
||||
var expectedMethodSignature = CreateParameterSignature(expected);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace Octokit.Tests.Conventions
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ namespace Octokit.Tests.Conventions
|
||||
? s
|
||||
: s.Replace("\r\n", Environment.NewLine);
|
||||
|
||||
return String.Format(template, args);
|
||||
return string.Format(template, args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,9 +17,9 @@ namespace Octokit.Tests.Integration.Clients
|
||||
|
||||
var created = await github.Authorization.Create(newAuthorization);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
|
||||
|
||||
var get = await github.Authorization.Get(created.Id);
|
||||
|
||||
@@ -55,9 +55,9 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Helper.ClientSecret,
|
||||
newAuthorization);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.HashedToken));
|
||||
|
||||
// we can then query it through the regular API
|
||||
var get = await github.Authorization.Get(created.Id);
|
||||
@@ -75,10 +75,10 @@ namespace Octokit.Tests.Integration.Clients
|
||||
Assert.Equal(created.Id, getExisting.Id);
|
||||
|
||||
// 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
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
}
|
||||
@@ -100,7 +100,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
newAuthorization);
|
||||
|
||||
Assert.NotNull(created);
|
||||
Assert.False(String.IsNullOrWhiteSpace(created.Token));
|
||||
Assert.False(string.IsNullOrWhiteSpace(created.Token));
|
||||
|
||||
// we can then query it through the regular API
|
||||
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
|
||||
// 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
|
||||
// to help identify the authorization at hand
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(String.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.TokenLastEight));
|
||||
Assert.False(string.IsNullOrWhiteSpace(getExisting.HashedToken));
|
||||
|
||||
await github.Authorization.Delete(created.Id);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public class BlobClientTests : IDisposable
|
||||
|
||||
var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(result.Sha));
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.Sha));
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
@@ -47,7 +47,7 @@ public class BlobClientTests : IDisposable
|
||||
|
||||
var result = await _fixture.Create(_context.RepositoryOwner, _context.RepositoryName, blob);
|
||||
|
||||
Assert.False(String.IsNullOrWhiteSpace(result.Sha));
|
||||
Assert.False(string.IsNullOrWhiteSpace(result.Sha));
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
|
||||
@@ -29,7 +29,7 @@ public class GitHubClientTests
|
||||
Assert.True(result.Links.Count == 0);
|
||||
Assert.True(result.AcceptedOauthScopes.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.Remaining > -1);
|
||||
Assert.NotNull(result.RateLimit.Reset);
|
||||
@@ -50,7 +50,7 @@ public class GitHubClientTests
|
||||
Assert.True(result.Links.Count > 0);
|
||||
Assert.True(result.AcceptedOauthScopes.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.Remaining > -1);
|
||||
Assert.NotNull(result.RateLimit.Reset);
|
||||
@@ -70,7 +70,7 @@ public class GitHubClientTests
|
||||
Assert.True(result.Links.Count == 0);
|
||||
Assert.True(result.AcceptedOauthScopes.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.Remaining > -1);
|
||||
Assert.NotNull(result.RateLimit.Reset);
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ReferencesClientTests : IDisposable
|
||||
|
||||
// validate the git reference
|
||||
Assert.Equal(TaggedType.Commit, @ref.Object.Type);
|
||||
Assert.False(String.IsNullOrWhiteSpace(@ref.Object.Sha));
|
||||
Assert.False(string.IsNullOrWhiteSpace(@ref.Object.Sha));
|
||||
}
|
||||
|
||||
[IntegrationTest]
|
||||
|
||||
@@ -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 textContent = String.Empty;
|
||||
var textContent = string.Empty;
|
||||
|
||||
using (var zipstream = new MemoryStream((byte[])response.Body))
|
||||
using (var archive = new ZipArchive(zipstream))
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork());
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Octokit.Tests.Integration.Clients
|
||||
var forkCreated = await github.Repository.Forks.Create("octokit", "octokit.net", new NewRepositoryFork { Organization = Helper.Organization });
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace Octokit.Tests.Integration
|
||||
{
|
||||
get
|
||||
{
|
||||
return !String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_OAUTHTOKEN"));
|
||||
return !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_OAUTHTOKEN"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace Octokit.Tests.Integration
|
||||
{
|
||||
get
|
||||
{
|
||||
return !String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_PRIVATEREPOSITORIES"));
|
||||
return !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("OCTOKIT_PRIVATEREPOSITORIES"));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,8 +19,8 @@ namespace Octokit.Tests.Integration
|
||||
|
||||
public IEnumerable<IXunitTestCase> Discover(ITestFrameworkDiscoveryOptions discoveryOptions, ITestMethod testMethod, IAttributeInfo factAttribute)
|
||||
{
|
||||
if (String.IsNullOrWhiteSpace(Helper.ClientId)
|
||||
&& String.IsNullOrWhiteSpace(Helper.ClientSecret))
|
||||
if (string.IsNullOrWhiteSpace(Helper.ClientId)
|
||||
&& string.IsNullOrWhiteSpace(Helper.ClientSecret))
|
||||
{
|
||||
return Enumerable.Empty<IXunitTestCase>();
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Octokit.Tests.Clients
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -676,7 +676,7 @@ namespace Octokit.Tests.Clients
|
||||
connection.Received().Get<SearchRepositoryResult>(
|
||||
Arg.Is<Uri>(u => u.ToString() == "search/repositories"),
|
||||
Arg.Is<Dictionary<string, string>>(d =>
|
||||
String.IsNullOrEmpty(d["q"])));
|
||||
string.IsNullOrEmpty(d["q"])));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ public static class ReflectionExtensions
|
||||
{
|
||||
public static string GetAsyncVoidMethodsList(this Assembly assembly)
|
||||
{
|
||||
return String.Join("\r\n",
|
||||
return string.Join("\r\n",
|
||||
GetLoadableTypes(assembly)
|
||||
.SelectMany(type => type.GetMethods())
|
||||
.Where(HasAttribute<AsyncStateMachineAttribute>)
|
||||
.Where(method => method.ReturnType == typeof(void))
|
||||
.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.DeclaringType.Name))
|
||||
.ToList());
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SearchCodeRequestTests
|
||||
public void SortNotSpecifiedByDefault()
|
||||
{
|
||||
var request = new SearchCodeRequest("test");
|
||||
Assert.True(String.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.True(string.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.False(request.Parameters.ContainsKey("sort"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ internal class SearchIssuesRequestTests
|
||||
public void SortNotSpecifiedByDefault()
|
||||
{
|
||||
var request = new SearchIssuesRequest("test");
|
||||
Assert.True(String.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.True(string.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.False(request.Parameters.ContainsKey("sort"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SearchRepositoryRequestTests
|
||||
public void SortNotSpecifiedByDefault()
|
||||
{
|
||||
var request = new SearchCodeRequest("test");
|
||||
Assert.True(String.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.True(string.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.False(request.Parameters.ContainsKey("sort"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ internal class SearchUsersRequestTests
|
||||
public void SortNotSpecifiedByDefault()
|
||||
{
|
||||
var request = new SearchUsersRequest("shiftkey");
|
||||
Assert.True(String.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.True(string.IsNullOrWhiteSpace(request.Sort));
|
||||
Assert.False(request.Parameters.ContainsKey("sort"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace Octokit
|
||||
{
|
||||
string errorMessage = e.ApiError.FirstErrorMessageSafe();
|
||||
|
||||
if (String.Equals(
|
||||
if (string.Equals(
|
||||
"name already exists on this account",
|
||||
errorMessage,
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
@@ -101,7 +101,7 @@ namespace Octokit
|
||||
baseAddress, e);
|
||||
}
|
||||
|
||||
if (String.Equals(
|
||||
if (string.Equals(
|
||||
"please upgrade your plan to create a new private repository.",
|
||||
errorMessage,
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
@@ -109,7 +109,7 @@ namespace Octokit
|
||||
throw new PrivateRepositoryQuotaExceededException(e);
|
||||
}
|
||||
|
||||
if (String.Equals(
|
||||
if (string.Equals(
|
||||
"name can't be private. You are over your quota.",
|
||||
errorMessage,
|
||||
StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace Octokit
|
||||
Ensure.ArgumentNotNullOrEmptyString(name, "name");
|
||||
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.");
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace Octokit
|
||||
public Task<IReadOnlyList<EmailAddress>> Add(params string[] 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");
|
||||
|
||||
return ApiConnection.Post<IReadOnlyList<EmailAddress>>(ApiUrls.Emails(), emailAddresses);
|
||||
@@ -61,7 +61,7 @@ namespace Octokit
|
||||
public Task Delete(params string[] 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");
|
||||
|
||||
return ApiConnection.Delete(ApiUrls.Emails(), emailAddresses);
|
||||
|
||||
@@ -126,7 +126,7 @@ namespace Octokit
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!String.IsNullOrEmpty(responseContent))
|
||||
if (!string.IsNullOrEmpty(responseContent))
|
||||
{
|
||||
return _jsonSerializer.Deserialize<ApiError>(responseContent) ?? new ApiError(responseContent);
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Octokit
|
||||
|
||||
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>
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Octokit
|
||||
if (input == 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)
|
||||
@@ -27,7 +27,7 @@ namespace Octokit
|
||||
if (input == 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()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,14 +109,14 @@ namespace Octokit
|
||||
if (char.IsUpper(letters[i]) && !char.IsWhiteSpace(previousChar))
|
||||
{
|
||||
//Grab everything before the current character.
|
||||
yield return new String(letters, wordStartIndex, i - wordStartIndex);
|
||||
yield return new string(letters, wordStartIndex, i - wordStartIndex);
|
||||
wordStartIndex = i;
|
||||
}
|
||||
previousChar = letters[i];
|
||||
}
|
||||
|
||||
//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:
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Octokit
|
||||
|
||||
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)
|
||||
{
|
||||
var uriBuilder = new UriBuilder(uri)
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Octokit
|
||||
return new ApiInfo(Links.Clone(),
|
||||
OauthScopes.Clone(),
|
||||
AcceptedOauthScopes.Clone(),
|
||||
new String(this.Etag.ToCharArray()),
|
||||
new string(this.Etag.ToCharArray()),
|
||||
RateLimit.Clone());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Octokit
|
||||
if (!baseAddress.IsAbsoluteUri)
|
||||
{
|
||||
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");
|
||||
}
|
||||
|
||||
@@ -357,12 +357,12 @@ namespace Octokit
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
if (!String.IsNullOrEmpty(twoFactorAuthenticationCode))
|
||||
if (!string.IsNullOrEmpty(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;
|
||||
var otpHeader = restResponse.Headers.FirstOrDefault(header =>
|
||||
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 parts = factorType.Split(new[] { ';' }, StringSplitOptions.RemoveEmptyEntries);
|
||||
if (parts.Length > 0 && parts[0] == "required")
|
||||
|
||||
@@ -226,7 +226,7 @@ namespace Octokit.Internal
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Octokit.Internal
|
||||
{
|
||||
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....
|
||||
if (!String.IsNullOrEmpty(body) && body != "{}")
|
||||
if (!string.IsNullOrEmpty(body) && body != "{}")
|
||||
{
|
||||
var typeIsDictionary = typeof(IDictionary).IsAssignableFrom(typeof(T));
|
||||
var typeIsEnumerable = typeof(IEnumerable).IsAssignableFrom(typeof(T));
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace Octokit
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Octokit
|
||||
get
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
var mergedParameters = String.Join("+", MergedQualifiers());
|
||||
var mergedParameters = string.Join("+", MergedQualifiers());
|
||||
return Term + (mergedParameters.IsNotBlank() ? "+" + mergedParameters : "");
|
||||
}
|
||||
}
|
||||
@@ -104,7 +104,7 @@ namespace Octokit
|
||||
, { "order", SortOrder }
|
||||
, { "q", TermAndQualifiers }
|
||||
};
|
||||
if (!String.IsNullOrWhiteSpace(Sort))
|
||||
if (!string.IsNullOrWhiteSpace(Sort))
|
||||
{
|
||||
d.Add("sort", Sort);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Sha: {0} ", Sha);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Sha: {0} ", Sha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ namespace Octokit
|
||||
{
|
||||
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
|
||||
{
|
||||
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
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message);
|
||||
return string.Format(CultureInfo.InvariantCulture, "SHA: {0} Message: {1}", Sha, Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Octokit
|
||||
{
|
||||
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),
|
||||
AddEvents == null ? "no" : string.Join(", ", AddEvents),
|
||||
RemoveEvents == null ? "no" : string.Join(", ", RemoveEvents));
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Octokit
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "NewFileName: {0}", NewFileName); }
|
||||
get { return string.Format(CultureInfo.InvariantCulture, "NewFileName: {0}", NewFileName); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Since: {0}", Since);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Since: {0}", Since);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Octokit
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); }
|
||||
get { return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Filter: {0} State: {1}", Filter, State);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Filter: {0} State: {1}", Filter, State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Octokit
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "LastReadAt: {0}", LastReadAt); }
|
||||
get { return string.Format(CultureInfo.InvariantCulture, "LastReadAt: {0}", LastReadAt); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Message: '{0}', Sha: '{1}'", CommitMessage, Sha);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Message: '{0}', Sha: '{1}'", CommitMessage, Sha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "State {0} ", State);
|
||||
return string.Format(CultureInfo.InvariantCulture, "State {0} ", State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title: {0} State: {1}", Title, State);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Title: {0} State: {1}", Title, State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Text: {0}", Text);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Text: {0}", Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Note: {0}", Note);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Note: {0}", Note);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Encoding: {0}", Encoding);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Encoding: {0}", Encoding);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Message: {0}", Message);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Message: {0}", Message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Path: {0}, Body: {1}", Path, Body);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Path: {0}, Body: {1}", Path, Body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Description: {0}, Context: {1}", Description, Context);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Description: {0}, Context: {1}", Description, Context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "State: {0}", State);
|
||||
return string.Format(CultureInfo.InvariantCulture, "State: {0}", State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Description: {0}", Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Octokit
|
||||
get
|
||||
{
|
||||
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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0}", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Message: {0}", CommitMessage);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Message: {0}", CommitMessage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title {0} State: {1}", Title, State);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Title {0} State: {1}", Title, State);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Ref: {0} Sha: {1}", Ref, Sha);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Ref: {0} Sha: {1}", Ref, Sha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Description: {1}", Name, Description);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0} Description: {1}", Name, Description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture,
|
||||
return string.Format(CultureInfo.InvariantCulture,
|
||||
"Repository Hook: Organization: {0}", Organization);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,7 +109,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture,
|
||||
return string.Format(CultureInfo.InvariantCulture,
|
||||
"Repository Hook: Name: {0}, Events: {1}", Name, string.Join(", ", Events));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Tag {0} Type: {1}", Tag, Type);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Tag {0} Type: {1}", Tag, Type);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Permission: {1}", Name, Permission);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0} Permission: {1}", Name, Permission);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Subscribed: {0} Ignored: {1}", Subscribed, Ignored);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "BaseTree: {0}", BaseTree);
|
||||
return string.Format(CultureInfo.InvariantCulture, "BaseTree: {0}", BaseTree);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -40,7 +40,7 @@ namespace Octokit
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "ClientId: {0}, RedirectUri: {1}, Scopes: {2}",
|
||||
return string.Format(CultureInfo.InvariantCulture, "ClientId: {0}, RedirectUri: {1}, Scopes: {2}",
|
||||
ClientId,
|
||||
RedirectUri,
|
||||
Scopes);
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Octokit
|
||||
{
|
||||
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,
|
||||
ClientSecret,
|
||||
Code,
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "{0}", Name);
|
||||
return string.Format(CultureInfo.InvariantCulture, "{0}", Name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Since: {0} ", Since);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Since: {0} ", Since);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Base: {0} ", Base);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Base: {0} ", Base);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Octokit
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "Body: {0}", Body); }
|
||||
get { return string.Format(CultureInfo.InvariantCulture, "Body: {0}", Body); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace Octokit
|
||||
|
||||
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); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Title: {0}", Title);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Sha: {0} Force: {1}", Sha, Force);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Sha: {0} Force: {1}", Sha, Force);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name {0} Label: {1}", Name, Label);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name {0} Label: {1}", Name, Label);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "FileName: {0} ", FileName);
|
||||
return string.Format(CultureInfo.InvariantCulture, "FileName: {0} ", FileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Name: {0} TagName: {1}", Name, TagName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Octokit
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Sort: {0}", Sort);
|
||||
return string.Format(CultureInfo.InvariantCulture, "Sort: {0}", Sort);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Octokit
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace Octokit
|
||||
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get { return String.Format(CultureInfo.CurrentCulture, "RepositoryUpdate: Name: {0}", Name); }
|
||||
get { return string.Format(CultureInfo.CurrentCulture, "RepositoryUpdate: Name: {0}", Name); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace Octokit
|
||||
return (prop, value) =>
|
||||
{
|
||||
var list = ((IEnumerable<string>)value).ToArray();
|
||||
return !list.Any() ? null : String.Join(",", list);
|
||||
return !list.Any() ? null : string.Join(",", list);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -148,45 +148,45 @@ namespace Octokit
|
||||
|
||||
if (In != null)
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "in:{0}",
|
||||
String.Join(",", In.Select(i => i.ToParameter()))));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "in:{0}",
|
||||
string.Join(",", In.Select(i => i.ToParameter()))));
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
// API is expecting 'true', bool.ToString() returns 'True', if there is a better way,
|
||||
// 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)
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "size:{0}", Size));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "size:{0}", Size));
|
||||
}
|
||||
|
||||
if (Path.IsNotBlank())
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "path:{0}", Path));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "path:{0}", Path));
|
||||
}
|
||||
|
||||
if (Extension.IsNotBlank())
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "extension:{0}", Extension));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "extension:{0}", Extension));
|
||||
}
|
||||
|
||||
if (FileName.IsNotBlank())
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "filename:{0}", FileName));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "filename:{0}", FileName));
|
||||
}
|
||||
|
||||
if (User.IsNotBlank())
|
||||
{
|
||||
parameters.Add(String.Format(CultureInfo.InvariantCulture, "user:{0}", User));
|
||||
parameters.Add(string.Format(CultureInfo.InvariantCulture, "user:{0}", User));
|
||||
}
|
||||
|
||||
if (Repos.Any())
|
||||
@@ -208,7 +208,7 @@ namespace Octokit
|
||||
{
|
||||
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
Reference in New Issue
Block a user