File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
ocaml/sdk-gen/csharp/autogen/src Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ public partial class Session : XenObject<Session>
4848 /// <summary>
4949 /// This string is used as the HTTP UserAgent for each request.
5050 /// </summary>
51- public static string UserAgent = $ "XenAPI/{ Helper . APIVersionString ( API_Version . LATEST ) } ";
51+ public static string UserAgent => $ "XenAPI/{ Helper . APIVersionString ( API_Version . LATEST ) } ";
5252
5353 /// <summary>
5454 /// If null, no proxy is used, otherwise this proxy is used for each request.
@@ -65,7 +65,8 @@ public Session(JsonRpcClient client)
6565 {
6666 client . Timeout = STANDARD_TIMEOUT ;
6767 client . KeepAlive = true ;
68- client . UserAgent = UserAgent ;
68+ if ( string . IsNullOrEmpty ( client . UserAgent ) )
69+ client . UserAgent = UserAgent ;
6970 client . WebProxy = Proxy ;
7071 client . AllowAutoRedirect = true ;
7172 JsonRpcClient = client ;
You can’t perform that action at this time.
0 commit comments