< Summary

Information
Class: IceRpc.Ice.Identity
Assembly: IceRpc.Ice
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Ice/Identity.cs
Tag: 1321_24790053727
Line coverage
85%
Covered lines: 6
Uncovered lines: 1
Coverable lines: 7
Total lines: 28
Line coverage: 85.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
75%
Covered methods: 3
Fully covered methods: 3
Total methods: 4
Method coverage: 75%
Full method coverage: 75%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Empty()100%11100%
Parse(...)100%11100%
ToPath()100%11100%
ToString()100%210%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/IceRpc.Ice/Identity.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3using IceRpc.Internal;
 4
 5namespace IceRpc.Ice;
 6
 7public partial record struct Identity
 8{
 9    /// <summary>Gets the null identity.</summary>
 1010    internal static Identity Empty { get; } = new("", "");
 11
 12    /// <summary>Parses a path into an identity, including the null/empty identity.</summary>
 13    /// <param name="path">The path (percent escaped).</param>
 14    /// <returns>The corresponding identity.</returns>
 15    public static Identity Parse(string path)
 6616    {
 6617        var iceIdentity = IceIdentity.Parse(path);
 6318        return new(iceIdentity.Name, iceIdentity.Category);
 6319    }
 20
 21    /// <summary>Converts this identity into a path.</summary>
 22    /// <returns>The identity converted into a path string.</returns>
 6023    public readonly string ToPath() => new IceIdentity(Name, Category).ToPath();
 24
 25    /// <summary>Converts this identity into a path string.</summary>
 26    /// <returns>The identity converted into a path string.</returns>
 027    public override readonly string ToString() => ToPath();
 28}