< Summary

Information
Class: IceRpc.Protobuf.RpcMethods.RpcMethodAttribute
Assembly: IceRpc.Protobuf
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Protobuf/RpcMethods/RpcMethodAttribute.cs
Tag: 1321_24790053727
Line coverage
0%
Covered lines: 0
Uncovered lines: 2
Coverable lines: 2
Total lines: 27
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: 2
Method coverage: 0%
Full method coverage: 0%

Metrics

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

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Protobuf/RpcMethods/RpcMethodAttribute.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using System.ComponentModel;
 4
 5namespace IceRpc.Protobuf.RpcMethods;
 6
 7/// <summary>An attribute that IceRpc.Protobuf.Generator applies to abstract methods it generates on server-side
 8/// interfaces (I{Name}Service). This attribute communicates information about the Protobuf rpc method to the Service
 9/// Generator (IceRpc.ServiceGenerator): currently only the name of the rpc method. The Service Generator generates code
 10/// that matches the operation name in incoming requests to the method name specified by this attribute.
 11/// </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 method
 14/// kind (unary, client streaming, server streaming, or bidi streaming).</remarks>
 15[AttributeUsage(AttributeTargets.Method, Inherited = false)]
 16[EditorBrowsable(EditorBrowsableState.Never)]
 17public sealed class RpcMethodAttribute : Attribute
 18{
 19    /// <summary>Gets the method name. It corresponds to the name of the rpc method in the Protobuf file, with the
 20    /// same spelling and the same case.</summary>
 21    /// <value>The method name.</value>
 022    public string Name { get; }
 23
 24    /// <summary>Constructs an RPC method attribute.</summary>
 25    /// <param name="name">The method name.</param>
 026    public RpcMethodAttribute(string name) => Name = name;
 27}

Methods/Properties

get_Name()
.ctor(System.String)