Skip to content

Messaging API

ChangeMessenger

Global messaging center for event publishing and subscription.

Static Properties

PropertyTypeDescription
EnableWeakMessengerboolEnable weak reference messaging
EnableRxStreamboolEnable Rx streams
EnableMetricsboolEnable performance metrics
UseSynchronousPublishboolUse synchronous publishing

Scheduler Registration

csharp
static void RegisterDispatcher(string envName);
static void RegisterThreadPool(string envName);
static void RegisterDedicatedThread(string envName, string threadName);

Publishing

csharp
static void Publish(BubblingChange change, string envName = null);
static void PublishToDefaultEnv(BubblingChange change);
static void PublishToNamedEnv(BubblingChange change, string envName);

Subscription

csharp
static IObservable<BubblingChange> AsObservable(string envName = null);
static IObservable<BubblingChange> AsThrottledObservable(TimeSpan? throttleTime = null, string envName = null);

Filter Management

csharp
static void RegisterFilter(string name, IChangeEventFilter filter);
static void RemoveFilter(string name);

Performance Monitoring

csharp
static PerformanceMetrics GetPerformanceMetrics();
static Dictionary<NodeChangeKind, long> GetEventTypeStatistics();

BubblingChange

Change event structure.

Properties

PropertyTypeDescription
KindNodeChangeKindChange type
NodeNamestringNode name
PropertyNamestring?Property name
PathstringFull path
OldValueobject?Old value
NewValueobject?New value
TimestampDateTimeTimestamp

NodeChangeKind

Change type enumeration.

ValueDescription
PropertyChangedProperty value changed
CollectionAddElement added
CollectionRemoveElement removed
CollectionReplaceElement replaced
CollectionClearCollection cleared
ChildAttachedChild attached
ChildDetachedChild detached

Released under the MIT License