Headless CMS and Content Managment Hub
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.
 
 
 
 
 

35 lines
1.0 KiB

// ==========================================================================
// Squidex Headless CMS
// ==========================================================================
// Copyright (c) Squidex UG (haftungsbeschränkt)
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
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>(long total, IEnumerable<T> items)
{
return new Impl<T>(items, total);
}
public static IResultList<T> Create<T>(long total, params T[] items)
{
return new Impl<T>(items, total);
}
}
}