mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-18 00:21:33 -07:00
* replace assetdelivery with thumbnails for rpc * update GetThumbnailUrlAsync logging * fix build error
26 lines
490 B
C#
26 lines
490 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Bloxstrap.Utility
|
|
{
|
|
internal class FixedSizeList<T> : List<T>
|
|
{
|
|
public int MaxSize { get; }
|
|
|
|
public FixedSizeList(int size)
|
|
{
|
|
MaxSize = size;
|
|
}
|
|
|
|
public new void Add(T item)
|
|
{
|
|
if (Count >= MaxSize)
|
|
RemoveAt(Count - 1);
|
|
base.Add(item);
|
|
}
|
|
}
|
|
}
|