Table of Contents

Class Topic<T>

Namespace
ReFuel.Ecs
Assembly
ReFuel.dll
public sealed class Topic<T> : TopicBase, IDisposable

Type Parameters

T
Inheritance
Topic<T>
Implements
Inherited Members

Properties

None

public static Topic<T> None { get; }

Property Value

Topic<T>

Type

The message type for this topic.

public override Type Type { get; }

Property Value

Type

Methods

Publish(EcsNode?, T)

Post a message on the topic.

public void Publish(EcsNode? sender, T details)

Parameters

sender EcsNode

The object sending the message.

details T

Text details.

Subscribe(TopicHandler<T>)

Subscribe to the topic for all topics.

public void Subscribe(TopicHandler<T> handler)

Parameters

handler TopicHandler<T>

The callback delegate.

Subscribe(TopicHandler<T>, string)

Subscribe to the mailbox for all topics.

public void Subscribe(TopicHandler<T> handler, string topic)

Parameters

handler TopicHandler<T>

The callback delegate.

topic string

The topic to subscribe to.

Unsubscribe(TopicHandler<T>)

Unsubscribe an all subscriber.

public void Unsubscribe(TopicHandler<T> handler)

Parameters

handler TopicHandler<T>

The subscriber to remove.

Unsubscribe(TopicHandler<T>, string)

Unsubscribe a topic subscriber.

public void Unsubscribe(TopicHandler<T> handler, string topic)

Parameters

handler TopicHandler<T>

The subscriber to remove

topic string

The topic to unsubscribe from.