improvements, fixes

This commit is contained in:
Loretta 2024-06-09 11:13:23 +02:00
parent bd565146e6
commit 74d679a5a9
3 changed files with 6 additions and 3 deletions

View File

@ -10,8 +10,9 @@ namespace AyCode.Core.Enums
{
None = 0,
Get = 1,
Add = 2,
Update = 3,
Remove = 4,
GetAll = 2,
Add = 3,
Update = 4,
Remove = 5,
}
}

View File

@ -8,6 +8,7 @@ namespace AyCode.Core.Extensions
{
public static TrackingState UpdateCollection<TDataItem>(this IList<TDataItem> source, TDataItem dataItem, bool isRemove) where TDataItem : IId<Guid>
{
if (source == null) throw new ArgumentNullException(nameof(source), $"source == null");
if (dataItem.Id.IsNullOrEmpty()) throw new ArgumentNullException(nameof(dataItem), "UpdateCollection->dataItem.Id.IsNullOrEmpty()");
var transferIndex = source.FindIndex(x => x.Id == dataItem.Id);

View File

@ -16,6 +16,7 @@ public sealed class SignalRCrudTags(int getAllTag, int getItemTag, int addTag, i
{
TrackingState.None => 0,
TrackingState.Get => GetItemMessageTag,
TrackingState.GetAll => GetAllMessageTag,
TrackingState.Add => AddMessageTag,
TrackingState.Update => UpdateMessageTag,
TrackingState.Remove => RemoveMessageTag,