< Summary

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

Metrics

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

File(s)

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

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace IceRpc.Features;
 4
 5/// <summary>Default implementation of <see cref="ICompressFeature" />.</summary>
 6public sealed class CompressFeature : ICompressFeature
 7{
 8    /// <summary>Gets an <see cref="ICompressFeature" /> with <see cref="Value" /> set to <see langword="true" />.
 9    /// </summary>
 10    /// <value>A shared <see cref="ICompressFeature" /> with <see cref="Value" /> set to <see langword="true" />.
 11    /// </value>
 1112    public static ICompressFeature Compress { get; } = new CompressFeature(true);
 13
 14    /// <summary>Gets an <see cref="ICompressFeature" /> with <see cref="Value" /> set to <see langword="false" />.
 15    /// </summary>
 16    /// <value>A shared <see cref="ICompressFeature" /> with <see cref="Value" /> set to <see langword="false" />.
 17    /// </value>
 118    public static ICompressFeature DoNotCompress { get; } = new CompressFeature(false);
 19
 20    /// <inheritdoc/>
 1421    public bool Value { get; }
 22
 423    private CompressFeature(bool value) => Value = value;
 24}