mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-04-29 06:48:41 +00:00
up
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user