@@ -26,7 +26,7 @@ public class RestApiClient
2626 private readonly Logger Logger = new Logger ( ) ;
2727 private readonly ISerializer JsonSerializer ;
2828 private readonly IDeserializer JsonDeserializer ;
29- private static KeyValueConfigurationCollection clientConfig ;
29+ private static KeyValueConfigurationCollection ClientConfig ;
3030
3131 /// <summary>
3232 /// RestSharp client configured to query Callfire API
@@ -50,7 +50,7 @@ public class RestApiClient
5050 /// loads client configuration
5151 /// </summary>
5252 static RestApiClient ( ) {
53- clientConfig = loadAppSettings ( ) ;
53+ ClientConfig = LoadAppSettings ( ) ;
5454 }
5555
5656 /// <summary>
@@ -59,7 +59,7 @@ static RestApiClient() {
5959 /// <value>configuration properties collection</value>
6060 public static KeyValueConfigurationCollection getClientConfig ( )
6161 {
62- return clientConfig ;
62+ return ClientConfig ;
6363 }
6464
6565 /// <summary>
@@ -70,7 +70,7 @@ public static KeyValueConfigurationCollection getClientConfig()
7070 /// </param>
7171 public RestApiClient ( IAuthenticator authenticator )
7272 {
73- ApiBasePath = clientConfig [ ClientConstants . CONFIG_API_BASE_PATH ] . Value ;
73+ ApiBasePath = ClientConfig [ ClientConstants . CONFIG_API_BASE_PATH ] . Value ;
7474 JsonSerializer = new CallfireJsonConverter ( ) ;
7575 JsonDeserializer = JsonSerializer as IDeserializer ;
7676
@@ -80,8 +80,8 @@ public RestApiClient(IAuthenticator authenticator)
8080 RestClient . AddHandler ( "application/json" , JsonDeserializer ) ;
8181
8282
83- String proxyAddress = clientConfig [ ClientConstants . PROXY_ADDRESS_PROPERTY ] != null ? clientConfig [ ClientConstants . PROXY_ADDRESS_PROPERTY ] . Value : null ;
84- String proxyCredentials = clientConfig [ ClientConstants . PROXY_CREDENTIALS_PROPERTY ] != null ? clientConfig [ ClientConstants . PROXY_CREDENTIALS_PROPERTY ] . Value : null ;
83+ String proxyAddress = ClientConfig [ ClientConstants . PROXY_ADDRESS_PROPERTY ] ? . Value ;
84+ String proxyCredentials = ClientConfig [ ClientConstants . PROXY_CREDENTIALS_PROPERTY ] ? . Value ;
8585
8686 if ( ! String . IsNullOrEmpty ( proxyAddress ) )
8787 {
@@ -96,7 +96,7 @@ public RestApiClient(IAuthenticator authenticator)
9696 {
9797 if ( parsedCredentials . Length > 1 )
9898 {
99- proxy . Credentials = new NetworkCredential ( parsedCredentials [ 0 ] , parsedCredentials [ 0 ] ) ;
99+ proxy . Credentials = new NetworkCredential ( parsedCredentials [ 0 ] , parsedCredentials [ 1 ] ) ;
100100 }
101101 else
102102 {
@@ -112,7 +112,7 @@ public RestApiClient(IAuthenticator authenticator)
112112 /// <summary>
113113 /// Loads client's app settings config section
114114 /// </summary>
115- public static KeyValueConfigurationCollection loadAppSettings ( )
115+ public static KeyValueConfigurationCollection LoadAppSettings ( )
116116 {
117117 var path = typeof ( RestApiClient ) . Assembly . Location ;
118118 var config = ConfigurationManager . OpenExeConfiguration ( path ) ;
0 commit comments