File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public partial class Client : IFunctionsClient
2020 {
2121 private HttpClient _httpClient = new HttpClient ( ) ;
2222 private readonly string _baseUrl ;
23- private FunctionRegion _region ;
23+ private readonly FunctionRegion _region ;
2424
2525 /// <summary>
2626 /// Function that can be set to return dynamic headers.
@@ -128,14 +128,15 @@ private async Task<HttpResponseMessage> HandleRequest(
128128
129129 options . Headers [ "X-Client-Info" ] = Util . GetAssemblyVersion ( typeof ( Client ) ) ;
130130
131- if ( options . FunctionRegion != null )
131+ var region = options . FunctionRegion ;
132+ if ( region == null )
132133 {
133- _region = options . FunctionRegion ;
134+ region = _region ;
134135 }
135136
136137 if ( _region != FunctionRegion . Any )
137138 {
138- options . Headers [ "x-region" ] = _region . ToString ( ) ;
139+ options . Headers [ "x-region" ] = region . ToString ( ) ;
139140 }
140141
141142 var builder = new UriBuilder ( url ) ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public bool Equals(FunctionRegion other)
164164 /// <summary>
165165 /// Overloading the operator ==
166166 /// </summary>
167- public static bool operator == ( FunctionRegion left , FunctionRegion right ) =>
167+ public static bool operator == ( FunctionRegion ? left , FunctionRegion ? right ) =>
168168 Equals ( left , right ) ;
169169
170170 /// <summary>
You can’t perform that action at this time.
0 commit comments