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
2626 /// </summary>
2727 public sealed class AppOptions
2828 {
29- private HttpClientFactory httpClientFactory ;
30-
3129 /// <summary>
3230 /// Initializes a new instance of the <see cref="AppOptions"/> class.
3331 /// </summary>
34- public AppOptions ( ) { }
32+ public AppOptions ( )
33+ {
34+ this . HttpClientFactory = new HttpClientFactory ( ) ;
35+ }
3536
3637 internal AppOptions ( AppOptions options )
3738 {
@@ -66,24 +67,6 @@ internal AppOptions(AppOptions options)
6667 /// <summary>
6768 /// Gets or sets the HttpClientFactory to use when making Firebase requests.
6869 /// </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 ; }
8871 }
8972}
Original file line number Diff line number Diff line change @@ -78,6 +78,11 @@ private FirebaseApp(AppOptions options, string name)
7878 this . options . Credential = this . options . Credential . CreateScoped ( DefaultScopes ) ;
7979 }
8080
81+ if ( this . options . HttpClientFactory == null )
82+ {
83+ throw new ArgumentNullException ( "HttpClientFactory must be set" ) ;
84+ }
85+
8186 this . Name = name ;
8287 }
8388
You can’t perform that action at this time.
0 commit comments