mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-31 10:12:38 +00:00
4e804f61a6
* updated XML docs and added some missing bits. * prefer nameof(x) over literal "x"
36 lines
836 B
C#
36 lines
836 B
C#
using System;
|
|
|
|
namespace Octokit
|
|
{
|
|
public static class ApiInfoExtensions
|
|
{
|
|
public static Uri GetPreviousPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, nameof(info));
|
|
|
|
return info.Links.SafeGet("prev");
|
|
}
|
|
|
|
public static Uri GetNextPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, nameof(info));
|
|
|
|
return info.Links.SafeGet("next");
|
|
}
|
|
|
|
public static Uri GetFirstPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, nameof(info));
|
|
|
|
return info.Links.SafeGet("first");
|
|
}
|
|
|
|
public static Uri GetLastPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, nameof(info));
|
|
|
|
return info.Links.SafeGet("last");
|
|
}
|
|
}
|
|
}
|