@@ -9,17 +9,21 @@ namespace Dataplat.Dbatools.Csv.TypeConverters
99 /// </summary>
1010 public sealed class Int16Converter : CultureAwareConverterBase < short >
1111 {
12+ /// <summary>Gets the default instance of the converter.</summary>
1213 public static Int16Converter Default { get ; } = new Int16Converter ( ) ;
1314
15+ /// <summary>Initializes a new instance of the <see cref="Int16Converter"/> class.</summary>
1416 public Int16Converter ( )
1517 {
1618 NumberStyles = NumberStyles . Integer ;
1719 }
1820
21+ /// <inheritdoc />
1922 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out short result )
2023 => short . TryParse ( value , styles , provider , out result ) ;
2124
2225#if NET8_0_OR_GREATER
26+ /// <inheritdoc />
2327 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out short result )
2428 => short . TryParse ( value , styles , provider , out result ) ;
2529#endif
@@ -31,17 +35,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
3135 /// </summary>
3236 public sealed class Int32Converter : CultureAwareConverterBase < int >
3337 {
38+ /// <summary>Gets the default instance of the converter.</summary>
3439 public static Int32Converter Default { get ; } = new Int32Converter ( ) ;
3540
41+ /// <summary>Initializes a new instance of the <see cref="Int32Converter"/> class.</summary>
3642 public Int32Converter ( )
3743 {
3844 NumberStyles = NumberStyles . Integer ;
3945 }
4046
47+ /// <inheritdoc />
4148 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out int result )
4249 => int . TryParse ( value , styles , provider , out result ) ;
4350
4451#if NET8_0_OR_GREATER
52+ /// <inheritdoc />
4553 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out int result )
4654 => int . TryParse ( value , styles , provider , out result ) ;
4755#endif
@@ -53,17 +61,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
5361 /// </summary>
5462 public sealed class Int64Converter : CultureAwareConverterBase < long >
5563 {
64+ /// <summary>Gets the default instance of the converter.</summary>
5665 public static Int64Converter Default { get ; } = new Int64Converter ( ) ;
5766
67+ /// <summary>Initializes a new instance of the <see cref="Int64Converter"/> class.</summary>
5868 public Int64Converter ( )
5969 {
6070 NumberStyles = NumberStyles . Integer ;
6171 }
6272
73+ /// <inheritdoc />
6374 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out long result )
6475 => long . TryParse ( value , styles , provider , out result ) ;
6576
6677#if NET8_0_OR_GREATER
78+ /// <inheritdoc />
6779 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out long result )
6880 => long . TryParse ( value , styles , provider , out result ) ;
6981#endif
@@ -75,17 +87,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
7587 /// </summary>
7688 public sealed class SingleConverter : CultureAwareConverterBase < float >
7789 {
90+ /// <summary>Gets the default instance of the converter.</summary>
7891 public static SingleConverter Default { get ; } = new SingleConverter ( ) ;
7992
93+ /// <summary>Initializes a new instance of the <see cref="SingleConverter"/> class.</summary>
8094 public SingleConverter ( )
8195 {
8296 NumberStyles = NumberStyles . Float | NumberStyles . AllowThousands ;
8397 }
8498
99+ /// <inheritdoc />
85100 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out float result )
86101 => float . TryParse ( value , styles , provider , out result ) ;
87102
88103#if NET8_0_OR_GREATER
104+ /// <inheritdoc />
89105 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out float result )
90106 => float . TryParse ( value , styles , provider , out result ) ;
91107#endif
@@ -97,17 +113,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
97113 /// </summary>
98114 public sealed class DoubleConverter : CultureAwareConverterBase < double >
99115 {
116+ /// <summary>Gets the default instance of the converter.</summary>
100117 public static DoubleConverter Default { get ; } = new DoubleConverter ( ) ;
101118
119+ /// <summary>Initializes a new instance of the <see cref="DoubleConverter"/> class.</summary>
102120 public DoubleConverter ( )
103121 {
104122 NumberStyles = NumberStyles . Float | NumberStyles . AllowThousands ;
105123 }
106124
125+ /// <inheritdoc />
107126 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out double result )
108127 => double . TryParse ( value , styles , provider , out result ) ;
109128
110129#if NET8_0_OR_GREATER
130+ /// <inheritdoc />
111131 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out double result )
112132 => double . TryParse ( value , styles , provider , out result ) ;
113133#endif
@@ -120,17 +140,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
120140 /// </summary>
121141 public sealed class DecimalConverter : CultureAwareConverterBase < decimal >
122142 {
143+ /// <summary>Gets the default instance of the converter.</summary>
123144 public static DecimalConverter Default { get ; } = new DecimalConverter ( ) ;
124145
146+ /// <summary>Initializes a new instance of the <see cref="DecimalConverter"/> class.</summary>
125147 public DecimalConverter ( )
126148 {
127149 NumberStyles = NumberStyles . Number ;
128150 }
129151
152+ /// <inheritdoc />
130153 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out decimal result )
131154 => decimal . TryParse ( value , styles , provider , out result ) ;
132155
133156#if NET8_0_OR_GREATER
157+ /// <inheritdoc />
134158 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out decimal result )
135159 => decimal . TryParse ( value , styles , provider , out result ) ;
136160#endif
@@ -142,17 +166,21 @@ protected override bool TryParseSpan(ReadOnlySpan<char> value, NumberStyles styl
142166 /// </summary>
143167 public sealed class ByteConverter : CultureAwareConverterBase < byte >
144168 {
169+ /// <summary>Gets the default instance of the converter.</summary>
145170 public static ByteConverter Default { get ; } = new ByteConverter ( ) ;
146171
172+ /// <summary>Initializes a new instance of the <see cref="ByteConverter"/> class.</summary>
147173 public ByteConverter ( )
148174 {
149175 NumberStyles = NumberStyles . Integer ;
150176 }
151177
178+ /// <inheritdoc />
152179 protected override bool TryParseCore ( string value , NumberStyles styles , IFormatProvider provider , out byte result )
153180 => byte . TryParse ( value , styles , provider , out result ) ;
154181
155182#if NET8_0_OR_GREATER
183+ /// <inheritdoc />
156184 protected override bool TryParseSpan ( ReadOnlySpan < char > value , NumberStyles styles , IFormatProvider provider , out byte result )
157185 => byte . TryParse ( value , styles , provider , out result ) ;
158186#endif
0 commit comments