mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-26 07:59:30 +00:00
2d81cb37cc
This makes it so GHfW doesn't have to reference Octokit.Internal
36 lines
812 B
C#
36 lines
812 B
C#
using System;
|
|
|
|
namespace Octokit
|
|
{
|
|
public static class ApiInfoExtensions
|
|
{
|
|
public static Uri GetPreviousPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, "info");
|
|
|
|
return info.Links.SafeGet("prev");
|
|
}
|
|
|
|
public static Uri GetNextPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, "info");
|
|
|
|
return info.Links.SafeGet("next");
|
|
}
|
|
|
|
public static Uri GetFirstPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, "info");
|
|
|
|
return info.Links.SafeGet("first");
|
|
}
|
|
|
|
public static Uri GetLastPageUrl(this ApiInfo info)
|
|
{
|
|
Ensure.ArgumentNotNull(info, "info");
|
|
|
|
return info.Links.SafeGet("last");
|
|
}
|
|
}
|
|
}
|