2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-06-27 13:33:13 +00:00

UInt8Array fix

This commit is contained in:
2020-01-13 14:45:06 +03:00
parent f9bbd603ce
commit 5f4660fde2
8 changed files with 40 additions and 10 deletions

View File

@ -16,7 +16,7 @@ namespace Esyur.Stores
public event DestroyedEvent OnDestroy;
Dictionary<uint, IResource> resources = new Dictionary<uint, IResource>();
KeyList<uint, IResource> resources = new KeyList<uint, IResource>();
public void Destroy()
{
@ -37,11 +37,13 @@ namespace Esyur.Stores
if (r.Value.Instance.Name == path)
return new AsyncReply<IResource>(r.Value);
return new AsyncReply<IResource>(null);
}
public bool Put(IResource resource)
{
resources.Add(resource.Instance.Id, resource);// new WeakReference<IResource>(resource));
resource.Instance.Attributes["children"] = new AutoList<IResource, Instance>(resource.Instance);
resource.Instance.Attributes["parents"] = new AutoList<IResource, Instance>(resource.Instance);