SodaEvent<T>

class SodaEvent<T> : SodaEventBase<Action<T>>

An event with a parameter. In addition event responses, SodaEvents store the object that add the response for debugging purposes. SodaEvents are very robust and allow you to add and remove responses while they're invoked.

Properties

int responseCount

The number of registered responses.

Methods

bool AddResponseAndInvoke(Action<T> response)

Add a response to be invoked with the event. The callback is immediately invoked with the current value.

bool AddResponse(Action<T> response)

Add a response to be invoked with the event.

void RemoveResponse(Action<T> response)

Removes a response so it's no longer invoked.

bool AddResponse(Action response)

Add a parameterless response to be invoked with the event.

void RemoveResponse(Action response)

Removes a parameterless response so it's no longer invoked.


SodaEvent

class SodaEvent : SodaEventBase<Action>

An event without a parameter. In addition event responses, SodaEvents store the object that add the response for debugging purposes. SodaEvents are very robust and allow you to add and remove responses while they're invoked.

int responseCount

The number of registered responses.

Methods

bool AddResponse(Action response)

Add a response to be invoked with the event.

void RemoveResponse(Action response)

Removes a response so it's no longer invoked.