Table of Contents

Class TopicBase

Namespace
ReFuel.Ecs
Assembly
ReFuel.dll

Represents a topic.

public abstract class TopicBase : EcsNode, IDisposable
Inheritance
TopicBase
Implements
Derived
Inherited Members

Properties

Kind

public override EcsNodeKind Kind { get; }

Property Value

EcsNodeKind

Type

The message type for this topic.

public abstract Type Type { get; }

Property Value

Type

Methods

Publish(EcsNode?, object?)

Publish a message on the topic.

public void Publish(EcsNode? sender, object? details)

Parameters

sender EcsNode

The object sending the message.

details object

Text details.

Subscribe(TopicHandler)

Subscribe to the topic for all topics.

public void Subscribe(TopicHandler handler)

Parameters

handler TopicHandler

The callback delegate.

Subscribe(TopicHandler, string)

Subscribe to the topic for a specific topic.

public void Subscribe(TopicHandler handler, string topic)

Parameters

handler TopicHandler

The callback delegate.

topic string

The topic to subscribe to.

Unsubscribe(TopicHandler)

Unsubscribe an all subscriber.

public void Unsubscribe(TopicHandler handler)

Parameters

handler TopicHandler

The subscriber to remove.

Unsubscribe(TopicHandler, string)

Unsubscribe a topic subscriber.

public void Unsubscribe(TopicHandler handler, string topic)

Parameters

handler TopicHandler

The subscriber to remove

topic string

The topic to unsubscribe from.