Class TopicBase
Represents a topic.
public abstract class TopicBase : EcsNode, IDisposable
- Inheritance
-
TopicBase
- Implements
- Derived
- Inherited Members
Properties
Kind
public override EcsNodeKind Kind { get; }
Property Value
Type
The message type for this topic.
public abstract Type Type { get; }
Property Value
Methods
Publish(EcsNode?, object?)
Publish a message on the topic.
public void Publish(EcsNode? sender, object? details)
Parameters
Subscribe(TopicHandler)
Subscribe to the topic for all topics.
public void Subscribe(TopicHandler handler)
Parameters
handler
TopicHandlerThe callback delegate.
Subscribe(TopicHandler, string)
Subscribe to the topic for a specific topic.
public void Subscribe(TopicHandler handler, string topic)
Parameters
handler
TopicHandlerThe callback delegate.
topic
stringThe topic to subscribe to.
Unsubscribe(TopicHandler)
Unsubscribe an all subscriber.
public void Unsubscribe(TopicHandler handler)
Parameters
handler
TopicHandlerThe subscriber to remove.
Unsubscribe(TopicHandler, string)
Unsubscribe a topic subscriber.
public void Unsubscribe(TopicHandler handler, string topic)
Parameters
handler
TopicHandlerThe subscriber to remove
topic
stringThe topic to unsubscribe from.