2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2025-09-13 20:43:19 +00:00

AsyncReply

This commit is contained in:
2025-08-19 15:24:05 +03:00
parent 39da379569
commit 46b7744852
15 changed files with 1473 additions and 1721 deletions

View File

@@ -68,7 +68,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan
string link;
//ulong age;
//ulong[] ages;
protected object[] properties;
internal List<DistributedResource> parents = new List<DistributedResource>();
internal List<DistributedResource> children = new List<DistributedResource>();
@@ -174,16 +174,31 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan
/// <returns></returns>
internal PropertyValue[] _Serialize()
{
var props = new PropertyValue[properties.Length];
for (byte i = 0; i < properties.Length; i++)
props[i] = new PropertyValue(properties[i], Instance.GetAge(i), Instance.GetModificationDate(i));
props[i] = new PropertyValue(properties[i],
Instance.GetAge(i),
Instance.GetModificationDate(i));
return props;
}
internal Map<byte, PropertyValue> _SerializeAfter(ulong age = 0)
{
var rt = new Map<byte, PropertyValue>();
for (byte i = 0; i < properties.Length; i++)
if (Instance.GetAge(i) > age)
rt.Add(i, new PropertyValue(properties[i],
Instance.GetAge(i),
Instance.GetModificationDate(i)));
return rt;
}
internal bool _Attach(PropertyValue[] properties)
{
if (attached)
@@ -568,7 +583,7 @@ public class DistributedResource : DynamicObject, IResource, INotifyPropertyChan
protected virtual void EmitPropertyChanged(string name)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
}
~DistributedResource()