using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Threading.Tasks; using GB5Shared.DTO.Framework.Login; using MMDAL.CustomCode.EventLog; using MMDAL.CustomCode.Item; using MMDAL.DTO.EventLog; using MMDAL.DTO.Item; namespace MMBLL.EventLog { public class EventLogBLL : IEventLogBLL { private IEventLogDAL _ieventlogdal; public EventLogBLL(IEventLogDAL IEventLogDAL) { _ieventlogdal = IEventLogDAL; } public async IAsyncEnumerable GetEventLogAsync(LoginDTO LoginDTO, [EnumeratorCancellation] CancellationToken cancellationToken = default) { await foreach (var item in _ieventlogdal.GetEventLogAsync( LoginDTO, cancellationToken)) { yield return item; await Task.Delay(100, cancellationToken); } } } }