< Summary - SonghayCore

Information
Class: Songhay.Models.DbmsMetadata
Assembly: SonghayCore
File(s): /home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/DbmsMetadata.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 12
Coverable lines: 12
Total lines: 45
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 10
Branch coverage: 0%
Method coverage

Method coverage is only available for sponsors.

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_ConnectionString()100%10%
get_ConnectionStringKey()100%10%
get_EncryptionMetadata()100%10%
get_ProviderName()100%10%
ToString()0%100%

File(s)

/home/rasx/sourceRoot/SonghayCore/SonghayCore/Models/DbmsMetadata.cs

#LineLine coverage
 1namespace Songhay.Models;
 2
 3/// <summary>
 4/// Defines DBMS metadata
 5/// </summary>
 6public class DbmsMetadata
 7{
 8    /// <summary>
 9    /// Gets or sets the connection string.
 10    /// </summary>
 011    public string? ConnectionString { get; set; }
 12
 13    /// <summary>
 14    /// Gets or sets the connection string key.
 15    /// </summary>
 016    public string? ConnectionStringKey { get; set; }
 17
 18    /// <summary>
 19    /// Gets or sets the encryption metadata.
 20    /// </summary>
 021    public EncryptionMetadata? EncryptionMetadata { get; set; }
 22
 23    /// <summary>
 24    /// Gets or sets the name of the provider.
 25    /// </summary>
 026    public string? ProviderName { get; set; }
 27
 28    /// <summary>
 29    /// Returns a <see cref="String" /> that represents this instance.
 30    /// </summary>
 31    /// <returns>
 32    /// A <see cref="String" /> that represents this instance.
 33    /// </returns>
 34    public override string ToString()
 035    {
 036        var sb = new StringBuilder();
 37
 038        if (!string.IsNullOrWhiteSpace(ProviderName)) sb.Append($"{nameof(ProviderName)}: {ProviderName} | ");
 039        if (!string.IsNullOrWhiteSpace(ConnectionString))
 040            sb.Append($"{nameof(ConnectionString)}: {ConnectionString[..72]}... ");
 041        if (EncryptionMetadata != null) sb.Append("| has encryption metadata");
 42
 043        return (sb.Length > 0) ? sb.ToString() : base.ToString() ?? GetType().Name;
 044    }
 45}