// System
using System.Collections.Generic;
using System.Threading.Tasks;
// GUPS - AntiCheat - Core
using GUPS.AntiCheat.Core.Integrity;
namespace GUPS.AntiCheat.Protected.Collection.Chain
{
///
/// Represents a generic data chain interface, providing functionality to iterate, and manipulate a linked list of elements of type T that validates it integrity.
///
/// The type of elements stored in the data chain.
public interface IDataChain : IEnumerable, IDataIntegrity
{
///
/// Gets the linked list containing the elements of the data chain.
///
LinkedList Chain { get; }
///
/// Appends a new item to the end of the data chain.
///
/// The item to be appended to the data chain.
/// True if the element is appended successfully and the chain has its integrity; otherwise, false.
bool Append(T _Item);
///
/// Appends a new item to the end of the data chain.
///
/// The item to be appended to the data chain.
/// True if the element is appended successfully and the chain has its integrity; otherwise, false.
Task AppendAsync(T _Item);
}
}