< Summary

Information
Class: MyNet.IO.Registry.RegistryPath
Assembly: MyNet.IO
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.IO/Registry/RegistryPath.cs
Tag: 323_28699572109
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 30
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
Combine(...)100%11100%
ToString()100%11100%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.IO/Registry/RegistryPath.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="RegistryPath.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.IO.Registry;
 8
 9/// <summary>
 10/// Represents a registry path, which is a string that specifies the location of a registry key in the Windows Registry.
 11/// </summary>
 12/// <param name="Parent">The parent registry path.</param>
 13/// <param name="Key">The child key to append to the parent path.</param>
 14public readonly record struct RegistryPath(string Parent, string Key)
 15{
 16    /// <summary>
 17    /// Combines a parent registry path with a child key to create a new registry path. This method takes a parent regis
 18    /// </summary>
 19    /// <param name="parent">The parent registry path.</param>
 20    /// <param name="key">The child key to append to the parent path.</param>
 21    /// <returns>A new <see cref="RegistryPath"/> instance representing the combined path.</returns>
 16722    public static RegistryPath Combine(string parent, string key) => new(parent, key);
 23
 24    /// <summary>
 25    /// Returns a string representation of the registry path in the format "Parent\Key". This method overrides the defau
 26    /// </summary>
 27    /// <returns>A string representation of the registry path in the format "Parent\Key".</returns>
 29128    public override string ToString() => $@"{Parent}\{Key}";
 29}
 30