@@ -18,7 +18,7 @@ namespace AuthenticationSdk.core
1818 *============================================================================================*/
1919 public class MerchantConfig
2020 {
21- public MerchantConfig ( IReadOnlyDictionary < string , string > merchantConfigDictionary = null , Dictionary < string , bool > mapToControlMLEonAPI = null )
21+ public MerchantConfig ( IReadOnlyDictionary < string , string > merchantConfigDictionary = null , Dictionary < string , bool > mapToControlMLEonAPI = null )
2222 {
2323 var _propertiesSetUsing = string . Empty ;
2424
@@ -170,6 +170,10 @@ public MerchantConfig(IReadOnlyDictionary<string, string> merchantConfigDictiona
170170
171171 public string MleKeyAlias { get ; set ; }
172172
173+ public string MaxConnectionPoolSize { get ; set ; }
174+
175+ public string KeepAliveTime { get ; set ; }
176+
173177 #endregion
174178
175179 public void LogMerchantConfigurationProperties ( )
@@ -252,9 +256,27 @@ private void SetValuesFromAppConfig(NameValueCollection merchantConfigSection, D
252256 {
253257 MleKeyAlias = Constants . DefaultMleAliasForCert ;
254258 }
259+
260+ if ( merchantConfigSection [ "maxConnectionPoolSize" ] != null )
261+ {
262+ MaxConnectionPoolSize = merchantConfigSection [ "maxConnectionPoolSize" ] ;
263+ }
264+ else
265+ {
266+ MaxConnectionPoolSize = Constants . DefaultMaxConnectionPoolSize ;
267+ }
268+
269+ if ( merchantConfigSection [ "keepAliveTime" ] != null )
270+ {
271+ KeepAliveTime = merchantConfigSection [ "keepAliveTime" ] ;
272+ }
273+ else
274+ {
275+ KeepAliveTime = Constants . DefaultKeepAliveTime ;
276+ }
255277 }
256278
257- private void SetValuesUsingDictObj ( IReadOnlyDictionary < string , string > merchantConfigDictionary , Dictionary < string , bool > mapToControlMLEonAPI )
279+ private void SetValuesUsingDictObj ( IReadOnlyDictionary < string , string > merchantConfigDictionary , Dictionary < string , bool > mapToControlMLEonAPI )
258280 {
259281 var key = string . Empty ;
260282
@@ -278,6 +300,7 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary<string, string> merchantC
278300 UseMetaKey = "false" ;
279301 }
280302 }
303+
281304 key = "intermediateHost" ;
282305 if ( merchantConfigDictionary . ContainsKey ( key ) )
283306 {
@@ -464,7 +487,7 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary<string, string> merchantC
464487 PemFileDirectory = merchantConfigDictionary [ "pemFileDirectory" ] ;
465488 }
466489
467- if ( merchantConfigDictionary . ContainsKey ( "useMLEGlobally" ) && "true" . Equals ( merchantConfigDictionary [ "useMLEGlobally" ] , StringComparison . OrdinalIgnoreCase ) )
490+ if ( merchantConfigDictionary . ContainsKey ( "useMLEGlobally" ) && "true" . Equals ( merchantConfigDictionary [ "useMLEGlobally" ] , StringComparison . OrdinalIgnoreCase ) )
468491 {
469492 UseMLEGlobally = bool . Parse ( merchantConfigDictionary [ "useMLEGlobally" ] ) ;
470493 }
@@ -488,6 +511,24 @@ private void SetValuesUsingDictObj(IReadOnlyDictionary<string, string> merchantC
488511 {
489512 MleKeyAlias = Constants . DefaultMleAliasForCert ;
490513 }
514+
515+ if ( merchantConfigDictionary . ContainsKey ( "maxConnectionPoolSize" ) )
516+ {
517+ MaxConnectionPoolSize = merchantConfigDictionary [ "maxConnectionPoolSize" ] ;
518+ }
519+ else
520+ {
521+ MaxConnectionPoolSize = Constants . DefaultMaxConnectionPoolSize ;
522+ }
523+
524+ if ( merchantConfigDictionary . ContainsKey ( "keepAliveTime" ) )
525+ {
526+ KeepAliveTime = merchantConfigDictionary [ "keepAliveTime" ] ;
527+ }
528+ else
529+ {
530+ KeepAliveTime = Constants . DefaultKeepAliveTime ;
531+ }
491532 }
492533 }
493534 catch ( KeyNotFoundException err )
0 commit comments