Table of Contents

Interface IConsumerProvider

Namespace
ReflectionEventing
Assembly
ReflectionEventing.dll

Defines a provider for retrieving types of event consumers.

public interface IConsumerProvider

Remarks

An implementation of this interface should be able to provide all types that are consumers of a specific event type. The consumers are not necessarily instances, but rather the types that can be used to create instances of consumers.

Methods

GetConsumers(Type)

Gets the consumers objects for the specified event type.

IEnumerable<object?> GetConsumers(Type consumerType)

Parameters

consumerType Type

The type of the event that the consumers handle.

Returns

IEnumerable<object>

An enumerable of object's that are consumers of the specified event type.

Examples

Type consumerType = typeof(MyEvent);
IEnumerable<object> consumerTypes = consumerProvider.GetConsumers(consumerType);