mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-02 10:55:53 +00:00
use IReadOnlyList as return type
This commit is contained in:
@@ -115,7 +115,6 @@ public class UsersClientTests
|
||||
Assert.NotEmpty(emails);
|
||||
var email = emails.First();
|
||||
Assert.True(email.Primary);
|
||||
Assert.False(email.Verified);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,6 @@ namespace Octokit
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
|
||||
Task<IReadOnlyCollection<EmailAddress>> GetEmails();
|
||||
Task<IReadOnlyList<EmailAddress>> GetEmails();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,9 +64,9 @@ namespace Octokit
|
||||
/// Returns emails for the current user.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public Task<IReadOnlyCollection<EmailAddress>> GetEmails()
|
||||
public Task<IReadOnlyList<EmailAddress>> GetEmails()
|
||||
{
|
||||
return ApiConnection.Get<IReadOnlyCollection<EmailAddress>>(ApiUrls.Emails(), null);
|
||||
return ApiConnection.GetAll<EmailAddress>(ApiUrls.Emails(), null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1638,7 +1638,7 @@ namespace Octokit
|
||||
|
||||
Type genericDefinition = type.GetGenericTypeDefinition();
|
||||
|
||||
return genericDefinition == typeof(IList<>) || genericDefinition == typeof(ICollection<>) || genericDefinition == typeof(IEnumerable<>) || genericDefinition == typeof(IReadOnlyCollection<>);
|
||||
return genericDefinition == typeof(IList<>) || genericDefinition == typeof(ICollection<>) || genericDefinition == typeof(IEnumerable<>);
|
||||
}
|
||||
|
||||
public static bool IsAssignableFrom(Type type1, Type type2)
|
||||
|
||||
Reference in New Issue
Block a user