32 lines
1.0 KiB
C#
32 lines
1.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using WeldingCommon.Data.Services.History;
|
|
|
|
namespace ILSOS_PrismaticGun.Process.Services.History
|
|
{
|
|
public sealed class CellHistoryService<T> : IHistoryWriter<T>, IHistoryReader<T>, IDisposable
|
|
{
|
|
private readonly HistoryService<eStage, T> _core;
|
|
|
|
public CellHistoryService(int maxCount = 50, int pumpMs = 100)
|
|
{
|
|
_core = new HistoryService<eStage, T>(maxCount, pumpMs);
|
|
|
|
_ = _core.GetHistory(eStage.A);
|
|
_ = _core.GetHistory(eStage.B);
|
|
}
|
|
|
|
public ReadOnlyObservableCollection<T> HistoryA => _core.GetHistory(eStage.A);
|
|
public ReadOnlyObservableCollection<T> HistoryB => _core.GetHistory(eStage.B);
|
|
|
|
public void Append(eStage stage, T snapshot) => _core.Append(stage, snapshot);
|
|
public void Clear(eStage stage) => _core.Clear(stage);
|
|
|
|
public void Dispose() => _core.Dispose();
|
|
}
|
|
}
|