/// <summary> /// Initializes a new instance of the <see cref="PublicEventFilterProcessor"/> class. /// </summary> /// <param name="filterId">The unique <see cref="FilterId"/> for the event filter.</param> /// <param name="client">The <see cref="FiltersClient"/> to use to connect to the Runtime.</param> /// <param name="reverseCallClients">The <see cref="IReverseCallClients"/> to use for creating instances of <see cref="IReverseCallClient{TClientMessage, TServerMessage, TConnectArguments, TConnectResponse, TRequest, TResponse}"/>.</param> /// <param name="filter">The <see cref="ICanFilterPublicEvents"/> to use for filtering the events.</param> /// <param name="converter">The <see cref="IEventConverter"/> to use to convert events.</param> /// <param name="logger">The <see cref="ILogger"/> to use for logging.</param> public PublicEventFilterProcessor( FilterId filterId, FiltersClient client, IReverseCallClients reverseCallClients, ICanFilterPublicEvents filter, IEventConverter converter, ILogger logger) : base(filterId, converter, logger) { _client = client; _reverseCallClients = reverseCallClients; _filter = filter; }
/// <summary> /// Creates a <see cref="PublicEventFilterProcessor"/> for registering and invoking an instance of <see cref="ICanFilterPublicEvents"/>. /// </summary> /// <param name="id">The unique <see cref="FilterId"/> for the event filter.</param> /// <param name="filter">The <see cref="ICanFilterPublicEvents"/> to use for filtering the events.</param> /// <returns>A <see cref="PublicEventFilterProcessor"/> for registering and invoking an instance of <see cref="ICanFilterPublicEvents"/>.</returns> public PublicEventFilterProcessor GetFor(FilterId id, ICanFilterPublicEvents filter) => new PublicEventFilterProcessor(id, _client, _reverseCallClients, filter, _converter, _loggerManager.CreateLogger <PublicEventFilterProcessor>());
/// <inheritdoc/> public Task Register(FilterId id, ICanFilterPublicEvents filter, CancellationToken cancellationToken) => _processors.GetFor(id, filter).RegisterAndHandleForeverWithPolicy(_policy, cancellationToken);