@@ -12,12 +12,6 @@ namespace StrongGrid
1212 [ Obsolete ( "The legacy client, legacy resources and legacy model classes are obsolete" ) ]
1313 public class LegacyClient : BaseClient , ILegacyClient
1414 {
15- private static readonly StrongGridClientOptions _defaultOptions = new StrongGridClientOptions ( )
16- {
17- LogLevelSuccessfulCalls = LogLevel . Debug ,
18- LogLevelFailedCalls = LogLevel . Debug
19- } ;
20-
2115 #region PROPERTIES
2216
2317 /// <summary>
@@ -87,7 +81,7 @@ public class LegacyClient : BaseClient, ILegacyClient
8781 /// <param name="options">Options for the SendGrid client.</param>
8882 /// <param name="logger">Logger.</param>
8983 public LegacyClient ( string apiKey , StrongGridClientOptions options = null , ILogger logger = null )
90- : base ( apiKey , null , false , options ?? _defaultOptions , logger )
84+ : base ( apiKey , null , false , options , logger )
9185 {
9286 Init ( ) ;
9387 }
@@ -100,7 +94,7 @@ public LegacyClient(string apiKey, StrongGridClientOptions options = null, ILogg
10094 /// <param name="options">Options for the SendGrid client.</param>
10195 /// <param name="logger">Logger.</param>
10296 public LegacyClient ( string apiKey , IWebProxy proxy , StrongGridClientOptions options = null , ILogger logger = null )
103- : base ( apiKey , new HttpClient ( new HttpClientHandler { Proxy = proxy , UseProxy = proxy != null } ) , true , options ?? _defaultOptions , logger )
97+ : base ( apiKey , new HttpClient ( new HttpClientHandler { Proxy = proxy , UseProxy = proxy != null } ) , true , options , logger )
10498 {
10599 Init ( ) ;
106100 }
@@ -113,7 +107,7 @@ public LegacyClient(string apiKey, IWebProxy proxy, StrongGridClientOptions opti
113107 /// <param name="options">Options for the SendGrid client.</param>
114108 /// <param name="logger">Logger.</param>
115109 public LegacyClient ( string apiKey , HttpMessageHandler handler , StrongGridClientOptions options = null , ILogger logger = null )
116- : base ( apiKey , new HttpClient ( handler ) , true , options ?? _defaultOptions , logger )
110+ : base ( apiKey , new HttpClient ( handler ) , true , options , logger )
117111 {
118112 Init ( ) ;
119113 }
@@ -126,7 +120,7 @@ public LegacyClient(string apiKey, HttpMessageHandler handler, StrongGridClientO
126120 /// <param name="options">Options for the SendGrid client.</param>
127121 /// <param name="logger">Logger.</param>
128122 public LegacyClient ( string apiKey , HttpClient httpClient , StrongGridClientOptions options = null , ILogger logger = null )
129- : base ( apiKey , httpClient , false , options ?? _defaultOptions , logger )
123+ : base ( apiKey , httpClient , false , options , logger )
130124 {
131125 Init ( ) ;
132126 }
0 commit comments