mirror of https://github.com/Squidex/squidex.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
875 B
31 lines
875 B
// ==========================================================================
|
|
// ResultList.cs
|
|
// Squidex Headless CMS
|
|
// ==========================================================================
|
|
// Copyright (c) Squidex Group
|
|
// All rights reserved.
|
|
// ==========================================================================
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace Squidex.Infrastructure
|
|
{
|
|
public static class ResultList
|
|
{
|
|
private sealed class Impl<T> : List<T>, IResultList<T>
|
|
{
|
|
public long Total { get; }
|
|
|
|
public Impl(IEnumerable<T> items, long total)
|
|
: base(items)
|
|
{
|
|
Total = total;
|
|
}
|
|
}
|
|
|
|
public static IResultList<T> Create<T>(IEnumerable<T> items, long total)
|
|
{
|
|
return new Impl<T>(items, total);
|
|
}
|
|
}
|
|
}
|
|
|