< Summary

Information
Class: IceRpc.Slice.Operations.SliceOperationAttribute
Assembly: IceRpc.Slice
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Slice/Operations/SliceOperationAttribute.cs
Tag: 1321_24790053727
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 41
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
0%
Covered methods: 0
Fully covered methods: 0
Total methods: 5
Method coverage: 0%
Full method coverage: 0%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Name()100%210%
get_CompressReturn()100%210%
get_EncodedReturn()100%210%
get_Idempotent()100%210%
.ctor(...)100%210%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Slice/Operations/SliceOperationAttribute.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.ComponentModel;
 4
 5namespace IceRpc.Slice.Operations;
 6
 7/// <summary>An attribute that IceRpc.Slice.Generator applies to abstract methods it generates on server-side
 8/// interfaces (I{Name}Service). This attribute communicates information about the Slice operation to the IceRPC
 9/// Service Generator (IceRpc.ServiceGenerator): the name of the Slice operation plus various optional properties
 10/// (see below). The Service Generator generates code that matches the operation name in incoming requests to the
 11/// operation name specified by this attribute.</summary>
 12/// <remarks>We limit the information communicated through this attribute to the strict minimum. The Service Generator
 13/// can deduce most information from the signature of the method decorated with this attribute, such as the number of
 14/// parameters and their mapped types.</remarks>
 15[AttributeUsage(AttributeTargets.Method, Inherited = false)]
 16[EditorBrowsable(EditorBrowsableState.Never)]
 17public sealed class SliceOperationAttribute : Attribute
 18{
 19    /// <summary>Gets the operation name.</summary>
 20    /// <value>The operation name.</value>
 021    public string Name { get; }
 22
 23    /// <summary>Gets a value indicating whether the return value needs to be compressed.</summary>
 24    /// <value><see langword="true"/> if the return value needs to be compressed; otherwise, <see langword="false"/>.
 25    /// </value>
 026    public bool CompressReturn { get; init; }
 27
 28    /// <summary>Gets a value indicating whether the non-stream portion of the return value is pre-encoded by the
 29    /// application.</summary>
 30    /// <value><see langword="true"/> if the non-stream portion of the return value is pre-encoded; otherwise,
 31    /// <see langword="false"/>.</value>
 032    public bool EncodedReturn { get; init; }
 33
 34    /// <summary>Gets a value indicating whether the operation is idempotent.</summary>
 35    /// <value><see langword="true"/> if the operation is idempotent; otherwise, <see langword="false"/>.</value>
 036    public bool Idempotent { get; init; }
 37
 38    /// <summary>Constructs a Slice operation attribute.</summary>
 39    /// <param name="name">The operation name.</param>
 040    public SliceOperationAttribute(string name) => Name = name;
 41}