< Summary

Information
Class: IceRpc.Features.RequestContextFeature
Assembly: IceRpc
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Features/RequestContextFeature.cs
Tag: 1856_27024993493
Line coverage
66%
Covered lines: 2
Uncovered lines: 1
Coverable lines: 3
Total lines: 21
Line coverage: 66.6%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
66%
Covered methods: 2
Fully covered methods: 2
Total methods: 3
Method coverage: 66.6%
Full method coverage: 66.6%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Value()100%11100%
.ctor()100%210%
.ctor(...)100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc/Features/RequestContextFeature.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.Collections.Immutable;
 4
 5namespace IceRpc.Features;
 6
 7/// <summary>Default implementation of <see cref="IRequestContextFeature" />.</summary>
 8public sealed class RequestContextFeature : IRequestContextFeature
 9{
 10    /// <inheritdoc/>
 3111    public IReadOnlyDictionary<string, string> Value { get; }
 12
 13    /// <summary>Constructs an empty request context feature.</summary>
 014    public RequestContextFeature() => Value = ImmutableDictionary<string, string>.Empty;
 15
 16    /// <summary>Constructs a request context feature wrapping the specified dictionary.</summary>
 17    /// <param name="value">The dictionary held by the new feature. It is copied to an
 18    /// <see cref="ImmutableDictionary{TKey, TValue}" /> unless it is already one, so post-construction mutations
 19    /// to <paramref name="value" /> cannot alter the feature.</param>
 4620    public RequestContextFeature(IReadOnlyDictionary<string, string> value) => Value = value.ToImmutableDictionary();
 21}