2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-05-02 15:48:43 +00:00

async put

This commit is contained in:
2021-02-20 21:55:11 +03:00
parent 7c707637de
commit 4cfad2a242
6 changed files with 58 additions and 47 deletions
+3 -2
View File
@@ -48,7 +48,7 @@ namespace Esiur.Stores.MongoDB
IMongoDatabase database;
IMongoCollection<BsonDocument> resourcesCollection;
Dictionary<string, WeakReference> resources = new Dictionary<string, WeakReference>();
KeyList<string, WeakReference> resources = new KeyList<string, WeakReference>();
[Public]
@@ -158,7 +158,8 @@ namespace Esiur.Stores.MongoDB
else
resources.Add(id, new WeakReference(resource));
Warehouse.Put(resource, document["name"].AsString, this);
//@TODO this causes store.put to be invoked, need fix
await Warehouse.Put(resource, document["name"].AsString, this);
var parents = document["parents"].AsBsonArray;