improvements, fixes
This commit is contained in:
parent
bd565146e6
commit
74d679a5a9
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue