mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-24 13:36:50 +01:00
Nullify PaginatableResult
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user