< Summary

Information
Class: IceRpc.RequestContextPipelineExtensions
Assembly: IceRpc.RequestContext
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.RequestContext/RequestContextPipelineExtensions.cs
Tag: 275_13775359185
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 24
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
0%
Covered methods: 0
Total methods: 1
Method coverage: 0%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
UseRequestContext(...)100%210%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.RequestContext/RequestContextPipelineExtensions.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.RequestContext;
 4
 5namespace IceRpc;
 6
 7/// <summary>Provides an extension method for <see cref="Pipeline" /> to add the request context interceptor.</summary>
 8public static class RequestContextPipelineExtensions
 9{
 10    /// <summary>Adds a <see cref="RequestContextInterceptor" /> to this pipeline.</summary>
 11    /// <param name="pipeline">The pipeline being configured.</param>
 12    /// <returns>The pipeline being configured.</returns>
 13    /// <example>
 14    /// The following code adds the request context interceptor to the invocation pipeline.
 15    /// <code source="../../docfx/examples/IceRpc.RequestContext.Examples/RequestContextInterceptorExamples.cs" region="
 16    /// The following code shows how to set the request context feature with a Slice proxy.
 17    /// <code source="../../docfx/examples/IceRpc.RequestContext.Examples/RequestContextInterceptorExamples.cs" region="
 18    /// The following code shows how to set the request context feature with a Protobuf client.
 19    /// <code source="../../docfx/examples/IceRpc.RequestContext.Examples/RequestContextInterceptorExamples.cs" region="
 20    /// </example>
 21    /// <seealso href="https://github.com/icerpc/icerpc-csharp/tree/main/examples/RequestContext"/>
 22    public static Pipeline UseRequestContext(this Pipeline pipeline) =>
 023        pipeline.Use(next => new RequestContextInterceptor(next));
 24}