• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

icerpc / icerpc-csharp / 20870171951

10 Jan 2026 01:03AM UTC coverage: 83.304% (-0.1%) from 83.399%
20870171951

Pull #4221

github

web-flow
Merge fe4f556d8 into f39e9819d
Pull Request #4221: Use new C#14 extension block syntax

12030 of 14441 relevant lines covered (83.3%)

2957.05 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/IceRpc.RequestContext/RequestContextRouterExtensions.cs
1
// Copyright (c) ZeroC, Inc.
2

3
using IceRpc.RequestContext;
4

5
namespace IceRpc;
6

7
/// <summary>Provides an extension method for <see cref="Router" /> to add the request context middleware.</summary>
8
public static class RequestContextRouterExtensions
9
{
10
    /// <summary>Extension methods for <see cref="Router" />.</summary>
11
    /// <param name="router">The router being configured.</param>
12
    extension(Router router)
13
    {
14
        /// <summary>Adds a <see cref="RequestContextMiddleware" /> to this router.</summary>
15
        /// <returns>The router being configured.</returns>
16
        /// <example>
17
        /// The following code adds the request context middleware to the dispatch pipeline.
18
        /// <code source="../../docfx/examples/IceRpc.RequestContext.Examples/RequestContextMiddlewareExamples.cs"
19
        /// region="UseRequestContext" lang="csharp" />
20
        /// The greeter service can then access the request context from the features parameter as shown in
21
        /// the following code.
22
        /// <code source="../../docfx/examples/IceRpc.RequestContext.Examples/Chatbot.cs"
23
        /// region="RequestContextFeature" lang="csharp" />
24
        /// </example>
25
        /// <seealso href="https://github.com/icerpc/icerpc-csharp/tree/main/examples/RequestContext"/>
26
        public Router UseRequestContext() =>
27
            router.Use(next => new RequestContextMiddleware(next));
×
28
    }
29
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc