@@ -123,21 +123,6 @@ public static string ComputeLuhnNumber(this string number)
123
123
}
124
124
125
125
#if NET8_0_OR_GREATER
126
- /// <summary>
127
- /// Checks whether the Luhn Number is valid
128
- /// </summary>
129
- /// <param name="luhnNumber">An identification number w/ check digit (Luhn Number).</param>
130
- /// <returns><see langword="true" /> if the <paramref name="luhnNumber"/> is valid;
131
- /// otherwise <see langword="false" /></returns>
132
- /// <exception cref="ArgumentException"><paramref name="luhnNumber"/> is not valid.
133
- /// It contains none-numeric characters.</exception>
134
- /// <remarks>The check digit must be at the end of the <paramref name="luhnNumber"/>
135
- /// (on the right side).</remarks>
136
- [ SuppressMessage ( "ReSharper" , "UnusedMember.Global" ) ]
137
- [ SuppressMessage ( "ReSharper" , "HeapView.ObjectAllocation" ) ]
138
- [ Obsolete ( "Use the IsValidLuhnNumber method instead." , false ) ]
139
- public static bool IsValid ( this ReadOnlySpan < char > luhnNumber ) => luhnNumber . IsValidLuhnNumber ( ) ;
140
-
141
126
/// <summary>
142
127
/// Checks whether the Luhn Number is valid
143
128
/// </summary>
@@ -154,21 +139,6 @@ public static bool IsValidLuhnNumber(this ReadOnlySpan<char> luhnNumber) =>
154
139
luhnNumber . IsNumber ( ) . GetDigits ( ) . DoubleEverySecondDigit ( true ) . SumDigits ( ) == 0 ;
155
140
#endif
156
141
157
- /// <summary>
158
- /// Checks whether the Luhn Number is valid
159
- /// </summary>
160
- /// <param name="luhnNumber">An identification number w/ check digit (Luhn Number).</param>
161
- /// <returns><see langword="true" /> if the <paramref name="luhnNumber"/> is valid;
162
- /// otherwise <see langword="false" /></returns>
163
- /// <exception cref="ArgumentException"><paramref name="luhnNumber"/> is not valid.
164
- /// It contains none-numeric characters.</exception>
165
- /// <remarks>The check digit must be at the end of the <paramref name="luhnNumber"/>
166
- /// (on the right side).</remarks>
167
- [ SuppressMessage ( "ReSharper" , "UnusedMember.Global" ) ]
168
- [ SuppressMessage ( "ReSharper" , "HeapView.ObjectAllocation" ) ]
169
- [ Obsolete ( "Use the IsValidLuhnNumber method instead." , false ) ]
170
- public static bool IsValid ( this string luhnNumber ) => luhnNumber . IsValidLuhnNumber ( ) ;
171
-
172
142
/// <summary>
173
143
/// Checks whether the Luhn Number is valid
174
144
/// </summary>
@@ -189,23 +159,6 @@ public static bool IsValidLuhnNumber(this string luhnNumber) =>
189
159
#endif
190
160
191
161
#if NET8_0_OR_GREATER
192
- /// <summary>
193
- /// Checks whether the concatenation of number and corresponding Luhn check digit is valid
194
- /// </summary>
195
- /// <param name="number">Identification number w/o Luhn check digit</param>
196
- /// <param name="checkDigit">The Luhn check digit</param>
197
- /// <returns><see langword="true" /> if the <paramref name="number"/> is valid;
198
- /// otherwise <see langword="false" /></returns>
199
- /// <exception cref="ArgumentException"><paramref name="number"/> is not valid.
200
- /// It contains none-numeric characters.</exception>
201
- /// <exception cref="ArgumentOutOfRangeException">The <paramref name="checkDigit"/> value is greater than 9.
202
- /// The <paramref name="checkDigit"/> value must be between 0 and 9.</exception>
203
- [ SuppressMessage ( "ReSharper" , "UnusedMember.Global" ) ]
204
- [ SuppressMessage ( "ReSharper" , "HeapView.ObjectAllocation" ) ]
205
- [ Obsolete ( "Use the IsValidLuhnCheckDigit method instead." , false ) ]
206
- public static bool IsValid ( this ReadOnlySpan < char > number , byte checkDigit ) =>
207
- checkDigit . IsValidLuhnCheckDigit ( number ) ;
208
-
209
162
/// <summary>
210
163
/// Checks whether the concatenation of number and corresponding Luhn check digit is valid
211
164
/// </summary>
@@ -238,22 +191,6 @@ public static bool IsValidLuhnCheckDigit(this byte checkDigit, ReadOnlySpan<char
238
191
}
239
192
#endif
240
193
241
- /// <summary>
242
- /// Checks whether the concatenation of number and corresponding Luhn check digit is valid
243
- /// </summary>
244
- /// <param name="number">Identification number w/o Luhn check digit</param>
245
- /// <param name="checkDigit">The Luhn check digit</param>
246
- /// <returns><see langword="true" /> if the <paramref name="number"/> is valid;
247
- /// otherwise <see langword="false" /></returns>
248
- /// <exception cref="ArgumentException"><paramref name="number"/> is not valid.
249
- /// It contains none-numeric characters.</exception>
250
- /// <exception cref="ArgumentOutOfRangeException">The <paramref name="checkDigit"/> value is greater than 9.
251
- /// The <paramref name="checkDigit"/> value must be between 0 and 9.</exception>
252
- [ SuppressMessage ( "ReSharper" , "UnusedMember.Global" ) ]
253
- [ SuppressMessage ( "ReSharper" , "HeapView.ObjectAllocation" ) ]
254
- [ Obsolete ( "Use the IsValidLuhnCheckDigit method instead." , false ) ]
255
- public static bool IsValid ( this string number , byte checkDigit ) => checkDigit . IsValidLuhnCheckDigit ( number ) ;
256
-
257
194
/// <summary>
258
195
/// Checks whether the concatenation of number and corresponding Luhn check digit is valid
259
196
/// </summary>
0 commit comments