66
77namespace SpotifyAPI . Web . Auth
88{
9- public class WebApiFactory
9+ public class WebAPIFactory
1010 {
11- private readonly string m_RedirectUrl ;
12- private readonly int m_ListeningPort ;
13- private readonly string m_ClientId ;
14- private readonly TimeSpan m_Timeout ;
15- private Scope m_Scope ;
11+ private readonly string _redirectUrl ;
12+ private readonly int _listeningPort ;
13+ private readonly string _clientId ;
14+ private readonly TimeSpan _timeout ;
15+ private readonly Scope _scope ;
1616
17- public WebApiFactory ( string redirectUrl , int listeningPort , string clientId , Scope scope , TimeSpan timeout )
17+ public WebAPIFactory ( string redirectUrl , int listeningPort , string clientId , Scope scope , TimeSpan timeout )
1818 {
19- m_RedirectUrl = redirectUrl ;
20- m_ListeningPort = listeningPort ;
21- m_ClientId = clientId ;
22- m_Scope = scope ;
23- m_Timeout = timeout ;
19+ _redirectUrl = redirectUrl ;
20+ _listeningPort = listeningPort ;
21+ _clientId = clientId ;
22+ _scope = scope ;
23+ _timeout = timeout ;
2424 }
2525
2626 public Task < SpotifyWebAPI > GetWebApi ( )
2727 {
2828 var authentication = new ImplicitGrantAuth
2929 {
30- RedirectUri = $ "{ m_RedirectUrl } :{ m_ListeningPort } ",
31- ClientId = m_ClientId ,
32- Scope = m_Scope ,
30+ RedirectUri = $ "{ _redirectUrl } :{ _listeningPort } ",
31+ ClientId = _clientId ,
32+ Scope = _scope ,
3333 State = "XSS"
3434 } ;
3535
@@ -43,13 +43,13 @@ public Task<SpotifyWebAPI> GetWebApi()
4343
4444 try
4545 {
46- authentication . StartHttpServer ( m_ListeningPort ) ;
46+ authentication . StartHttpServer ( _listeningPort ) ;
4747
4848 authentication . DoAuth ( ) ;
4949
50- authenticationWaitFlag . WaitOne ( m_Timeout ) ;
50+ authenticationWaitFlag . WaitOne ( _timeout ) ;
5151 if ( spotifyWebApi == null )
52- throw new TimeoutException ( $ "No valid response received for the last { m_Timeout . TotalSeconds } seconds") ;
52+ throw new TimeoutException ( $ "No valid response received for the last { _timeout . TotalSeconds } seconds") ;
5353 }
5454 finally
5555 {
0 commit comments