Show / Hide Table of Contents

Class EventAggregator<T>

A class which aggregates events.

Inheritance
object
EventPublisher<T>
EventAggregator<T>
DelayedEventAggregator<T>
Implements
IEventAggregator<T>
IEventPublisher<T>
Inherited Members
EventPublisher<T>.EventReceived
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Microsoft.XboxStudios.GameStateTracker.Events
Assembly: GameStateTracker.Events.dll
Syntax
public class EventAggregator<T> : EventPublisher<T>, IEventAggregator<T>, IEventPublisher<T> where T : class
Type Parameters
Name Description
T

The event type.

Constructors

View Source

EventAggregator(params IEventPublisher<T>[])

Initializes a new instance of the EventAggregator<T> class.

Declaration
public EventAggregator(params IEventPublisher<T>[] publishers)
Parameters
Type Name Description
IEventPublisher<T>[] publishers

The event publishers to aggregate events from.

Properties

View Source

RecentEvents

Gets a read-only list of recent events.

Declaration
public IReadOnlyList<T> RecentEvents { get; }
Property Value
Type Description
IReadOnlyList<T>

Methods

View Source

ClearEvents()

Clears the list of events.

Declaration
public void ClearEvents()
View Source

Forward<TOther>(IEventPublisher<TOther>)

Forwards events from an IEventPublisher<T> by publishing them from this event aggregator.

Declaration
public void Forward<TOther>(IEventPublisher<TOther> input) where TOther : T
Parameters
Type Name Description
IEventPublisher<TOther> input

The event publisher to forward events from.

Type Parameters
Name Description
TOther

The other event type.

View Source

Publish(object?, T)

Publishes an event.

Declaration
protected override void Publish(object? sender, T e)
Parameters
Type Name Description
object sender

The event source.

T e

The event.

Overrides
EventPublisher<T>.Publish(object, T)

Implements

IEventAggregator<T>
IEventPublisher<T>
  • View Source
In this article
Back to top Generated by DocFX