File tree Expand file tree Collapse file tree 2 files changed +10
-22
lines changed
FirebaseAdmin/FirebaseAdmin Expand file tree Collapse file tree 2 files changed +10
-22
lines changed Original file line number Diff line number Diff line change @@ -26,12 +26,13 @@ namespace FirebaseAdmin
26
26
/// </summary>
27
27
public sealed class AppOptions
28
28
{
29
- private HttpClientFactory httpClientFactory ;
30
-
31
29
/// <summary>
32
30
/// Initializes a new instance of the <see cref="AppOptions"/> class.
33
31
/// </summary>
34
- public AppOptions ( ) { }
32
+ public AppOptions ( )
33
+ {
34
+ this . HttpClientFactory = new HttpClientFactory ( ) ;
35
+ }
35
36
36
37
internal AppOptions ( AppOptions options )
37
38
{
@@ -66,24 +67,6 @@ internal AppOptions(AppOptions options)
66
67
/// <summary>
67
68
/// Gets or sets the HttpClientFactory to use when making Firebase requests.
68
69
/// </summary>
69
- public HttpClientFactory HttpClientFactory
70
- {
71
- get
72
- {
73
- if ( this . httpClientFactory != null )
74
- {
75
- return this . httpClientFactory ;
76
- }
77
- else
78
- {
79
- return new HttpClientFactory ( ) ;
80
- }
81
- }
82
-
83
- set
84
- {
85
- this . httpClientFactory = value ;
86
- }
87
- }
70
+ public HttpClientFactory HttpClientFactory { get ; set ; }
88
71
}
89
72
}
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ private FirebaseApp(AppOptions options, string name)
78
78
this . options . Credential = this . options . Credential . CreateScoped ( DefaultScopes ) ;
79
79
}
80
80
81
+ if ( this . options . HttpClientFactory == null )
82
+ {
83
+ throw new ArgumentNullException ( "HttpClientFactory must be set" ) ;
84
+ }
85
+
81
86
this . Name = name ;
82
87
}
83
88
You can’t perform that action at this time.
0 commit comments