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
handlerTopicHandlerThe callback delegate.
Subscribe(TopicHandler, string)
Subscribe to the topic for a specific topic.
public void Subscribe(TopicHandler handler, string topic)
Parameters
handlerTopicHandlerThe callback delegate.
topicstringThe topic to subscribe to.
Unsubscribe(TopicHandler)
Unsubscribe an all subscriber.
public void Unsubscribe(TopicHandler handler)
Parameters
handlerTopicHandlerThe subscriber to remove.
Unsubscribe(TopicHandler, string)
Unsubscribe a topic subscriber.
public void Unsubscribe(TopicHandler handler, string topic)
Parameters
handlerTopicHandlerThe subscriber to remove
topicstringThe topic to unsubscribe from.