File tree 2 files changed +6
-5
lines changed
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
20
20
{
21
21
private HttpClient _httpClient = new HttpClient ( ) ;
22
22
private readonly string _baseUrl ;
23
- private FunctionRegion _region ;
23
+ private readonly FunctionRegion _region ;
24
24
25
25
/// <summary>
26
26
/// Function that can be set to return dynamic headers.
@@ -128,14 +128,15 @@ private async Task<HttpResponseMessage> HandleRequest(
128
128
129
129
options . Headers [ "X-Client-Info" ] = Util . GetAssemblyVersion ( typeof ( Client ) ) ;
130
130
131
- if ( options . FunctionRegion != null )
131
+ var region = options . FunctionRegion ;
132
+ if ( region == null )
132
133
{
133
- _region = options . FunctionRegion ;
134
+ region = _region ;
134
135
}
135
136
136
137
if ( _region != FunctionRegion . Any )
137
138
{
138
- options . Headers [ "x-region" ] = _region . ToString ( ) ;
139
+ options . Headers [ "x-region" ] = region . ToString ( ) ;
139
140
}
140
141
141
142
var builder = new UriBuilder ( url ) ;
Original file line number Diff line number Diff line change @@ -164,7 +164,7 @@ public bool Equals(FunctionRegion other)
164
164
/// <summary>
165
165
/// Overloading the operator ==
166
166
/// </summary>
167
- public static bool operator == ( FunctionRegion left , FunctionRegion right ) =>
167
+ public static bool operator == ( FunctionRegion ? left , FunctionRegion ? right ) =>
168
168
Equals ( left , right ) ;
169
169
170
170
/// <summary>
You can’t perform that action at this time.
0 commit comments