2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 12:43:17 +00:00
This commit is contained in:
2025-08-23 18:16:19 +03:00
parent c4b4a2e4cb
commit 0d4ea04ef4
21 changed files with 306 additions and 305 deletions

View File

@@ -185,25 +185,7 @@ public class EntityStore : IStore
//throw new NotImplementedException();
}
public bool Remove(IResource resource)
{
var type = ResourceProxy.GetBaseType(resource);
var eid = TypesByType[type].PrimaryKey.GetValue(resource);
lock (DBLock)
{
if (DB[type].ContainsKey(eid))
{
DB[type].Remove(eid);
return true;
}
}
return false;
//throw new NotImplementedException();
}
public AsyncReply<bool> AddChild(IResource parent, IResource child)
{
throw new NotImplementedException();
@@ -290,4 +272,32 @@ public class EntityStore : IStore
{
OnDestroy?.Invoke(this);
}
public AsyncReply<bool> Remove(IResource resource)
{
var type = ResourceProxy.GetBaseType(resource);
var eid = TypesByType[type].PrimaryKey.GetValue(resource);
lock (DBLock)
{
if (DB[type].ContainsKey(eid))
{
DB[type].Remove(eid);
return new AsyncReply<bool>(true);
}
}
return new AsyncReply<bool>(false);
}
public AsyncReply<bool> Remove(string path)
{
throw new NotImplementedException();
}
public AsyncReply<bool> Move(IResource resource, string newPath)
{
throw new NotImplementedException();
}
}