Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventFilterProcessor"/> class.
 /// </summary>
 /// <param name="filterId">The unique <see cref="FilterId"/> for the event filter.</param>
 /// <param name="scope">The <see cref="ScopeId"/> of the scope in the Event Store where the filter will run.</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="ICanFilterEvents"/> 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 EventFilterProcessor(
     FilterId filterId,
     ScopeId scope,
     FiltersClient client,
     IReverseCallClients reverseCallClients,
     ICanFilterEvents filter,
     IEventConverter converter,
     ILogger logger)
     : base(filterId, converter, logger)
 {
     _scope              = scope;
     _client             = client;
     _reverseCallClients = reverseCallClients;
     _filter             = filter;
 }
 /// <summary>
 /// Creates an <see cref="EventFilterProcessor"/> for registering and invoking an instance of <see cref="ICanFilterEvents"/>.
 /// </summary>
 /// <param name="id">The unique <see cref="FilterId"/> for the event filter.</param>
 /// <param name="scope">The <see cref="ScopeId"/> of the scope in the Event Store where the filter will run.</param>
 /// <param name="filter">The <see cref="ICanFilterEvents"/> to use for filtering the events.</param>
 /// <returns>An <see cref="EventFilterProcessor"/> for registering and invoking an instance of <see cref="ICanFilterEvents"/>.</returns>
 public EventFilterProcessor GetFor(FilterId id, ScopeId scope, ICanFilterEvents filter)
 => new EventFilterProcessor(id, scope, _client, _reverseCallClients, filter, _converter, _loggerManager.CreateLogger <EventFilterProcessor>());
Ejemplo n.º 3
0
 /// <inheritdoc/>
 public Task Register(FilterId id, ScopeId scope, ICanFilterEvents filter, CancellationToken cancellationToken)
 => _processors.GetFor(id, scope, filter).RegisterAndHandleForeverWithPolicy(_policy, cancellationToken);