| | 1 | | // Copyright (c) ZeroC, Inc. |
| | 2 | |
|
| | 3 | | using IceRpc.RequestContext; |
| | 4 | |
|
| | 5 | | namespace IceRpc.Extensions.DependencyInjection; |
| | 6 | |
|
| | 7 | | /// <summary>Provides an extension method for <see cref="IInvokerBuilder" /> to add the request context interceptor. |
| | 8 | | /// </summary> |
| | 9 | | public static class RequestContextInvokerBuilderExtensions |
| | 10 | | { |
| | 11 | | /// <summary>Adds a <see cref="RequestContextInterceptor" /> to this builder.</summary> |
| | 12 | | /// <param name="builder">The builder being configured.</param> |
| | 13 | | /// <returns>The builder being configured.</returns> |
| | 14 | | public static IInvokerBuilder UseRequestContext(this IInvokerBuilder builder) => |
| 8 | 15 | | builder.Use(next => new RequestContextInterceptor(next)); |
| | 16 | | } |