using System.Collections.Generic; using System.Linq; namespace FrostFS.SDK.Client; internal sealed class WorkList { private readonly List elements = []; internal int Length { get { return elements.Count; } } internal void Add(int element) { elements.Add(element); } internal int Remove() { int last = elements.LastOrDefault(); elements.RemoveAt(elements.Count - 1); return last; } }