Nullify PaginatableResult

This commit is contained in:
Jordan Dominion
2023-11-25 16:17:09 -05:00
parent 53bcad8fa5
commit 54beb2dbc6
@@ -1,10 +1,9 @@
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Microsoft.AspNetCore.Mvc;
#nullable disable
namespace Tgstation.Server.Host.Controllers.Results
{
/// <summary>
@@ -13,15 +12,22 @@ namespace Tgstation.Server.Host.Controllers.Results
/// <typeparam name="TModel">The <see cref="Type"/> of model intended to be returned.</typeparam>
public sealed class PaginatableResult<TModel>
{
/// <summary>
/// Whether or not the <see cref="PaginatableResult{TModel}"/> is valid.
/// </summary>
[MemberNotNullWhen(true, nameof(Results))]
[MemberNotNullWhen(false, nameof(EarlyOut))]
public bool Valid => EarlyOut == null;
/// <summary>
/// The <see cref="IOrderedQueryable{T}"/> <typeparamref name="TModel"/> results.
/// </summary>
public IOrderedQueryable<TModel> Results { get; }
public IOrderedQueryable<TModel>? Results { get; }
/// <summary>
/// An <see cref="IActionResult"/> to return immediately.
/// </summary>
public IActionResult EarlyOut { get; }
public IActionResult? EarlyOut { get; }
/// <summary>
/// Initializes a new instance of the <see cref="PaginatableResult{TModel}"/> class.