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 15:30:06 +03:00
parent 5f73cf7af7
commit 5b0fba89a4
14 changed files with 853 additions and 0 deletions
@@ -0,0 +1,24 @@
using Esiur.Resource;
/// <summary>
/// A simple observable sensor resource.
/// Property changes are automatically propagated to all attached peers.
/// </summary>
[Resource]
public 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
}
}
}