| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | using IceRpc.Deadline; |
| | | 4 | | |
| | | 5 | | namespace IceRpc.Extensions.DependencyInjection; |
| | | 6 | | |
| | | 7 | | /// <summary>Provides an extension method for <see cref="IDispatcherBuilder" /> to add the deadline |
| | | 8 | | /// middleware.</summary> |
| | | 9 | | public static class DeadlineDispatcherBuilderExtensions |
| | | 10 | | { |
| | | 11 | | /// <summary>Adds a <see cref="DeadlineMiddleware" /> to this dispatcher builder.</summary> |
| | | 12 | | /// <param name="builder">The builder being configured.</param> |
| | | 13 | | /// <returns>The builder being configured.</returns> |
| | | 14 | | public static IDispatcherBuilder UseDeadline(this IDispatcherBuilder builder) => |
| | 0 | 15 | | builder.Use(next => new DeadlineMiddleware(next)); |
| | | 16 | | } |