2
0
mirror of https://github.com/esiur/esiur-dotnet.git synced 2026-04-29 06:48:41 +00:00
This commit is contained in:
2026-04-04 23:54:59 +03:00
parent 5b0fba89a4
commit 44983d7784
17 changed files with 181 additions and 66 deletions
@@ -1,24 +1,15 @@
using Esiur.Resource;
/// <summary>
/// A simple observable sensor resource.
/// Property changes are automatically propagated to all attached peers.
/// Shared observable sensor resource used across all scalability tests.
/// Property changes via Value setter are automatically propagated
/// to all attached remote peers by the Esiur runtime.
/// </summary>
[Resource]
public class SensorResource : Resource
public partial class SensorResource : Resource
{
public int SensorId { get; set; }
private double _value;
[ResourceProperty]
public double Value
{
get => _value;
set
{
_value = value;
PropertyModified("Value"); // notifies Esiur runtime to propagate
}
}
[Export]
public double value;
}