@@ -58,20 +58,20 @@ public static Task<IMessageResponse<IAccessTokenResponse>> RequestAccessTokenAsy
5858 throw new ArgumentNullException ( nameof ( password ) ) ;
5959
6060 Uri requestUri = new Uri ( baseUri , "oauth/token" ) ;
61- IEnumerable < KeyValuePair < string , string > > parameters = GetRequestAccessTokenParameters ( ) ;
61+ IEnumerable < KeyValuePair < string ? , string ? > > parameters = GetRequestAccessTokenParameters ( ) ;
6262
6363 return
6464 client
6565 . PostFormAsync ( requestUri , parameters , cancellationToken : cancellationToken )
6666 . ReadJsonAsAsync < IAccessTokenResponse , AccessTokenResponse > ( cancellationToken ) ;
6767
68- IEnumerable < KeyValuePair < string , string > > GetRequestAccessTokenParameters ( )
68+ IEnumerable < KeyValuePair < string ? , string ? > > GetRequestAccessTokenParameters ( )
6969 {
70- yield return new KeyValuePair < string , string > ( "grant_type" , "password" ) ;
71- yield return new KeyValuePair < string , string > ( "client_id" , clientId ) ;
72- yield return new KeyValuePair < string , string > ( "client_secret" , clientSecret ) ;
73- yield return new KeyValuePair < string , string > ( "email" , email ) ;
74- yield return new KeyValuePair < string , string > ( "password" , password ) ;
70+ yield return new KeyValuePair < string ? , string ? > ( "grant_type" , "password" ) ;
71+ yield return new KeyValuePair < string ? , string ? > ( "client_id" , clientId ) ;
72+ yield return new KeyValuePair < string ? , string ? > ( "client_secret" , clientSecret ) ;
73+ yield return new KeyValuePair < string ? , string ? > ( "email" , email ) ;
74+ yield return new KeyValuePair < string ? , string ? > ( "password" , password ) ;
7575 }
7676 }
7777
@@ -106,19 +106,19 @@ public static Task<IMessageResponse<IAccessTokenResponse>> RefreshAccessTokenAsy
106106 throw new ArgumentNullException ( nameof ( refreshToken ) ) ;
107107
108108 Uri requestUri = new Uri ( baseUri , "oauth/token" ) ;
109- IEnumerable < KeyValuePair < string , string > > parameters = GetRefreshAccessTokenParameters ( ) ;
109+ IEnumerable < KeyValuePair < string ? , string ? > > parameters = GetRefreshAccessTokenParameters ( ) ;
110110
111111 return
112112 client
113113 . PostFormAsync ( requestUri , parameters , cancellationToken : cancellationToken )
114114 . ReadJsonAsAsync < IAccessTokenResponse , AccessTokenResponse > ( cancellationToken ) ;
115115
116- IEnumerable < KeyValuePair < string , string > > GetRefreshAccessTokenParameters ( )
116+ IEnumerable < KeyValuePair < string ? , string ? > > GetRefreshAccessTokenParameters ( )
117117 {
118- yield return new KeyValuePair < string , string > ( "grant_type" , "refresh_token" ) ;
119- yield return new KeyValuePair < string , string > ( "client_id" , clientId ) ;
120- yield return new KeyValuePair < string , string > ( "client_secret" , clientSecret ) ;
121- yield return new KeyValuePair < string , string > ( "refresh_token" , refreshToken ) ;
118+ yield return new KeyValuePair < string ? , string ? > ( "grant_type" , "refresh_token" ) ;
119+ yield return new KeyValuePair < string ? , string ? > ( "client_id" , clientId ) ;
120+ yield return new KeyValuePair < string ? , string ? > ( "client_secret" , clientSecret ) ;
121+ yield return new KeyValuePair < string ? , string ? > ( "refresh_token" , refreshToken ) ;
122122 }
123123 }
124124
@@ -146,16 +146,16 @@ public static Task<IMessageResponse<object>> RevokeAccessTokenAsync(
146146
147147 Uri requestUri = new Uri ( baseUri , "oauth/revoke" ) ;
148148
149- IEnumerable < KeyValuePair < string , string > > parameters = GetRevokeAccessTokenParameters ( ) ;
149+ IEnumerable < KeyValuePair < string ? , string ? > > parameters = GetRevokeAccessTokenParameters ( ) ;
150150
151151 return
152152 client
153153 . PostFormAsync ( requestUri , parameters , accessToken , cancellationToken )
154154 . ReadJsonAsAsync < object , object > ( cancellationToken ) ;
155155
156- IEnumerable < KeyValuePair < string , string > > GetRevokeAccessTokenParameters ( )
156+ IEnumerable < KeyValuePair < string ? , string ? > > GetRevokeAccessTokenParameters ( )
157157 {
158- yield return new KeyValuePair < string , string > ( "token" , accessToken ) ;
158+ yield return new KeyValuePair < string ? , string ? > ( "token" , accessToken ) ;
159159 }
160160 }
161161
@@ -318,7 +318,7 @@ public static Task<IMessageResponse<IResponseDataWrapper<IVehicleState>>> GetVeh
318318 private static async Task < HttpResponseMessage > PostFormAsync (
319319 this HttpClient client ,
320320 Uri requestUri ,
321- IEnumerable < KeyValuePair < string , string > > parameters ,
321+ IEnumerable < KeyValuePair < string ? , string ? > > parameters ,
322322 string ? accessToken = null ,
323323 CancellationToken cancellationToken = default )
324324 {
@@ -497,7 +497,7 @@ private static bool IsContentJson(HttpResponseMessage responseMessage)
497497 if ( responseMessage == null )
498498 throw new ArgumentNullException ( nameof ( responseMessage ) ) ;
499499
500- string ? mediaType = responseMessage . Content ? . Headers . ContentType . MediaType ;
500+ string ? mediaType = responseMessage . Content . Headers . ContentType ? . MediaType ;
501501 return string . Equals ( mediaType , "application/json" , StringComparison . OrdinalIgnoreCase ) ;
502502 }
503503
0 commit comments