MessengerBase

Ecng.ComponentModel

Shared IMessenger implementation. Registrations are kept per message type and token; derived messengers decide whether recipients are held strongly or weakly. Handlers receive the recipient as an argument, so a weak messenger never roots it. All operations are thread-safe; handlers are invoked outside the internal lock so they may register, unregister or send re-entrantly.

Implementiert: IMessenger

Eigenschaften

IsWeak
protected abstract bool IsWeak { get; }
value = messengerBase.IsWeak

When true, recipients are held through weak references and may be collected while still registered; when false, they are held strongly until explicitly unregistered.