using AyCode.Core.Helpers;
using AyCode.Core.Interfaces;
using AyCode.Core.Loggers;
using AyCode.Services.SignalRs;
using System.Collections.ObjectModel;
using System.Diagnostics;

namespace FruitBankHybrid.Shared.Services.SignalRs;

[Serializable]
[DebuggerDisplay("Count = {Count}")]
public class SignalRDataSourceList<TDataItem>(AcSignalRClientBase signalRClient, SignalRCrudTags signalRCrudTags, IAcLoggerBase? logger, params object[]? contextIds)
    : AcSignalRDataSource<TDataItem, int, List<TDataItem>>(signalRClient, signalRCrudTags, logger, contextIds) where TDataItem : class, IId<int>;

[Serializable]
[DebuggerDisplay("Count = {Count}")]
public class SignalRDataSourceObservable<TDataItem>(AcSignalRClientBase signalRClient, SignalRCrudTags signalRCrudTags, IAcLoggerBase? logger, params object[]? contextIds)
    : AcSignalRDataSource<TDataItem, int, AcObservableCollection<TDataItem>>(signalRClient, signalRCrudTags, logger, contextIds) where TDataItem : class, IId<int>;