From b935f4ad70ad8e33c21e44323dfa3a49381129cb Mon Sep 17 00:00:00 2001 From: Sumanth K B Date: Tue, 17 Oct 2023 16:03:26 +0530 Subject: [PATCH] CC Added --- src/LCT.Common/Tommy.cs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/LCT.Common/Tommy.cs b/src/LCT.Common/Tommy.cs index ef51073a..b546ebb9 100644 --- a/src/LCT.Common/Tommy.cs +++ b/src/LCT.Common/Tommy.cs @@ -167,6 +167,7 @@ public static implicit operator TomlNode(TomlNode[] nodes) #endregion } + [ExcludeFromCodeCoverage] public class TomlString : TomlNode { public override bool HasValue { get; } = true; @@ -194,6 +195,7 @@ public override string ToInlineToml() } } + [ExcludeFromCodeCoverage] public class TomlInteger : TomlNode { public enum Base @@ -218,6 +220,7 @@ public override string ToInlineToml() => : Value.ToString(CultureInfo.InvariantCulture); } + [ExcludeFromCodeCoverage] public class TomlFloat : TomlNode, IFormattable { public override bool IsFloat { get; } = true; @@ -241,6 +244,7 @@ var v when double.IsNegativeInfinity(v) => TomlSyntax.NEG_INF_VALUE, }; } + [ExcludeFromCodeCoverage] public class TomlBoolean : TomlNode { public override bool IsBoolean { get; } = true; @@ -253,6 +257,7 @@ public class TomlBoolean : TomlNode public override string ToInlineToml() => Value ? TomlSyntax.TRUE_VALUE : TomlSyntax.FALSE_VALUE; } + [ExcludeFromCodeCoverage] public class TomlDateTime : TomlNode, IFormattable { public int SecondsPrecision { get; set; } @@ -266,6 +271,7 @@ public override string ToInlineToml() => ToInlineTomlInternal() .Replace(TomlSyntax.ISO861ZeroZone, TomlSyntax.RFC3339ZeroZone); } + [ExcludeFromCodeCoverage] public class TomlDateTimeOffset : TomlDateTime { public override bool IsDateTimeOffset { get; } = true; @@ -280,6 +286,7 @@ public override string ToString(string format, IFormatProvider formatProvider) = protected override string ToInlineTomlInternal() => Value.ToString(TomlSyntax.RFC3339Formats[SecondsPrecision]); } + [ExcludeFromCodeCoverage] public class TomlDateTimeLocal : TomlDateTime { public enum DateTimeStyle @@ -309,6 +316,7 @@ public override string ToInlineToml() => }; } + [ExcludeFromCodeCoverage] public class TomlArray : TomlNode { private List values; @@ -420,6 +428,7 @@ public override void WriteTo(TextWriter tw, string name = null) } } + [ExcludeFromCodeCoverage] public class TomlTable : TomlNode { private Dictionary children; @@ -561,6 +570,7 @@ internal void WriteTo(TextWriter tw, string name, bool writeSectionName) } } + [ExcludeFromCodeCoverage] internal class TomlLazy : TomlNode { private readonly TomlNode parent; @@ -621,7 +631,7 @@ public override TomlNode this[string key] #endregion #region Parser - + [ExcludeFromCodeCoverage] public class TOMLParser : IDisposable { public enum ParseState @@ -1764,6 +1774,7 @@ private string ParseComment() #endregion + [ExcludeFromCodeCoverage] public static class TOML { public static bool ForceASCII { get; set; } = false; @@ -1776,12 +1787,13 @@ public static TomlTable Parse(TextReader reader) } #region Exception Types - + [ExcludeFromCodeCoverage] public class TomlFormatException : Exception { public TomlFormatException(string message) : base(message) { } } + [ExcludeFromCodeCoverage] public class TomlParseException : Exception { public TomlParseException(TomlTable parsed, IEnumerable exceptions) : @@ -1796,6 +1808,7 @@ public TomlParseException(TomlTable parsed, IEnumerable exc public IEnumerable SyntaxErrors { get; } } + [ExcludeFromCodeCoverage] public class TomlSyntaxException : Exception { public TomlSyntaxException(string message, TOMLParser.ParseState state, int line, int col) : base(message) @@ -1816,6 +1829,7 @@ public TomlSyntaxException(string message, TOMLParser.ParseState state, int line #region Parse utilities + [ExcludeFromCodeCoverage] internal static class TomlSyntax { #region Type Patterns @@ -1980,6 +1994,7 @@ public static bool IsValueSeparator(char c) => #endregion } + [ExcludeFromCodeCoverage] internal static class StringUtils { public static string AsKey(this string key)