/// <summary> /// Register a middleware to decompress the message /// </summary> /// <typeparam name="T">A class that implements <see cref="IMessageCompressor"/></typeparam> public static IConsumerMiddlewareConfigurationBuilder AddCompressor <T>( this IConsumerMiddlewareConfigurationBuilder middlewares) where T : class, IMessageCompressor { return(middlewares.AddCompressor(resolver => resolver.Resolve <T>())); }
/// <summary> /// Registers a middleware to decompress the message /// </summary> public static IConsumerMiddlewareConfigurationBuilder AddCompressor <T>(this IConsumerMiddlewareConfigurationBuilder middlewares) where T : class, IMessageCompressor { middlewares.DependencyConfigurator.AddTransient <T>(); return(middlewares.AddCompressor(resolver => resolver.Resolve <T>())); }