1- namespace PortaCapena . OdooJsonRpcClient . Models
1+ using System ;
2+
3+ namespace PortaCapena . OdooJsonRpcClient . Models
24{
35 public class OdooConfig
46 {
@@ -7,30 +9,32 @@ public class OdooConfig
79 public string DbName { get ; }
810 public string UserName { get ; }
911 public string Password { get ; }
12+ public TimeSpan Timeout { get ; }
1013
1114 public OdooContext Context { get ; }
1215
1316
14- public OdooConfig ( string apiUrl , string dbName , string userName , string password )
17+ public OdooConfig ( string apiUrl , string dbName , string userName , string password , TimeSpan timeout = default ( TimeSpan ) )
1518 {
1619 this . ApiUrl = apiUrl . TrimEnd ( new [ ] { '/' } ) ;
1720 this . DbName = dbName ;
1821 this . UserName = userName ;
1922 this . Password = password ;
2023 this . Context = new OdooContext ( ) ;
24+ this . Timeout = timeout ;
2125 }
2226
23- public OdooConfig ( string apiUrl , string dbName , string userName , string password , OdooContext context ) : this ( apiUrl , dbName , userName , password )
27+ public OdooConfig ( string apiUrl , string dbName , string userName , string password , OdooContext context , TimeSpan timeout = default ( TimeSpan ) ) : this ( apiUrl , dbName , userName , password , timeout )
2428 {
2529 this . Context = new OdooContext ( context ) ;
2630 }
2731
28- public OdooConfig ( string apiUrl , string dbName , string userName , string password , string language ) : this ( apiUrl , dbName , userName , password )
32+ public OdooConfig ( string apiUrl , string dbName , string userName , string password , string language , TimeSpan timeout = default ( TimeSpan ) ) : this ( apiUrl , dbName , userName , password , timeout )
2933 {
3034 this . Context = new OdooContext ( language ) ;
3135 }
3236
33- public OdooConfig ( string apiUrl , string dbName , string userName , string password , string language , string timezone ) : this ( apiUrl , dbName , userName , password )
37+ public OdooConfig ( string apiUrl , string dbName , string userName , string password , string language , string timezone , TimeSpan timeout = default ( TimeSpan ) ) : this ( apiUrl , dbName , userName , password , timeout )
3438 {
3539 this . Context = new OdooContext ( language , timezone ) ;
3640 }
0 commit comments