/// <summary> /// Deletes the existing <see cref="IEventProcessor"/>s and registers the given elements. /// </summary> /// <param name="builder">The <see cref="IRepositoryBuilder"/> instance.</param> /// <param name="processors">One or more <see cref="IEventProcessor"/> instance.</param> /// <returns>The updated <see cref="IRepositoryBuilder"/>.</returns> public static IRepositoryBuilder UseAsyncEventProcessors(this IRepositoryBuilder builder, params IEventProcessor[] processors) { var list = Providers.Instance.AsyncEventProcessors; list.Clear(); builder.AddAsyncEventProcessors(processors); return(builder); }