mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 03:19:56 +00:00
Implemented most of the updating mechanism
This commit is contained in:
1 parent
0cd65a2ebf
commit
acd005e4a2
27 files changed
+1055
-383
No files matched your search
@@ -9,4 +9,6 @@ public interface IQueuedActionRepository : IRepository
|
||||
void Remove(QueuedActionEntity queuedActionEntity);
|
||||
List<QueuedActionEntity> GetAll();
|
||||
List<QueuedActionEntity> GetByType(string type);
|
||||
bool IsTypeQueued(string type);
|
||||
void ClearByType(string type);
|
||||
}
|
||||
@@ -41,5 +41,17 @@ public class QueuedActionRepository : IQueuedActionRepository
|
||||
return _repository.Query<QueuedActionEntity>().Where(q => q.Type == type).ToList();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsTypeQueued(string type)
|
||||
{
|
||||
return _repository.Query<QueuedActionEntity>().Where(q => q.Type == type).Count() > 0;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void ClearByType(string type)
|
||||
{
|
||||
_repository.DeleteMany<QueuedActionEntity>(q => q.Type == type);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
Reference in new issue
Block a user