mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-10-24 03:50:57 +00:00
up
This commit is contained in:
1 parent
5b0fba89a4
commit
44983d7784
17 files changed
+181
-66
No files matched your search
@@ -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