11using System ;
22using System . IO ;
3- using System . Net ;
43using System . Threading ;
54
5+ // ReSharper disable MemberCanBeProtected.Global
6+ // ReSharper disable MemberCanBePrivate.Global
7+ // ReSharper disable UnusedAutoPropertyAccessor.Global
8+
69namespace Leaf . xNet . Services . Captcha
710{
811 public abstract class BaseCaptchaSolver : ICaptchaSolver , IDisposable
912 {
1013 public string ApiKey { get ; set ; }
1114 public bool IsApiKeyRequired { get ; protected set ; } = true ;
12- public virtual bool IsApiKeyValid => ! string . IsNullOrEmpty ( ApiKey ) ;
15+ public bool IsApiKeyValid => ! string . IsNullOrEmpty ( ApiKey ) ;
1316
1417 public uint UploadRetries { get ; set ; } = 40 ;
1518 public uint StatusRetries { get ; set ; } = 80 ;
@@ -25,25 +28,25 @@ public abstract class BaseCaptchaSolver : ICaptchaSolver, IDisposable
2528 #region SolveImage : Generic
2629
2730 /// <exception cref="NotImplementedException">Throws when method isn't implemented by your class.</exception>
28- public virtual string SolveImage ( string imageUrl , CancellationToken cancelToken = default ( CancellationToken ) )
31+ public virtual string SolveImage ( string imageUrl , CancellationToken cancelToken = default )
2932 {
3033 throw NotImplemented ( nameof ( SolveImage ) , NameOfString ) ;
3134 }
3235
3336 /// <exception cref="NotImplementedException">Throws when method isn't implemented by your class.</exception>
34- public virtual string SolveImage ( byte [ ] imageBytes , CancellationToken cancelToken = default ( CancellationToken ) )
37+ public virtual string SolveImage ( byte [ ] imageBytes , CancellationToken cancelToken = default )
3538 {
3639 throw NotImplemented ( nameof ( SolveImage ) , "byte[]" ) ;
3740 }
3841
3942 /// <exception cref="NotImplementedException">Throws when method isn't implemented by your class.</exception>
40- public virtual string SolveImage ( Stream imageStream , CancellationToken cancelToken = default ( CancellationToken ) )
43+ public virtual string SolveImage ( Stream imageStream , CancellationToken cancelToken = default )
4144 {
4245 throw NotImplemented ( nameof ( SolveImage ) , nameof ( Stream ) ) ;
4346 }
4447
4548 /// <exception cref="NotImplementedException">Throws when method isn't implemented by your class.</exception>
46- public string SolveImageFromBase64 ( string imageBase64 , CancellationToken cancelToken = default ( CancellationToken ) )
49+ public string SolveImageFromBase64 ( string imageBase64 , CancellationToken cancelToken = default )
4750 {
4851 throw NotImplemented ( nameof ( SolveImageFromBase64 ) , NameOfString ) ;
4952 }
@@ -54,7 +57,7 @@ public abstract class BaseCaptchaSolver : ICaptchaSolver, IDisposable
5457 #region SolveImage : Recaptcha
5558
5659 /// <exception cref="NotImplementedException">Throws when method isn't implemented by your class.</exception>
57- public virtual string SolveRecaptcha ( string pageUrl , string siteKey , CancellationToken cancelToken = default ( CancellationToken ) )
60+ public virtual string SolveRecaptcha ( string pageUrl , string siteKey , CancellationToken cancelToken = default )
5861 {
5962 throw NotImplemented ( nameof ( SolveRecaptcha ) , "string, string" ) ;
6063 }
@@ -67,6 +70,7 @@ protected void ThrowIfApiKeyRequiredAndInvalid()
6770 throw new CaptchaException ( CaptchaError . InvalidApiKey ) ;
6871 }
6972
73+ // ReSharper disable once UnusedParameter.Global
7074 protected void Delay ( TimeSpan delay , CancellationToken cancelToken )
7175 {
7276 if ( cancelToken != CancellationToken . None )
0 commit comments