mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 06:16:37 +01:00
Create the settings object only in DEBUG mode.
This commit is contained in:
parent
a623e28a06
commit
1c579565ac
@ -212,7 +212,9 @@ namespace XenAPI
|
|||||||
// for performance reasons it's preferable to deserialize directly
|
// for performance reasons it's preferable to deserialize directly
|
||||||
// from the Stream rather than allocating strings inbetween
|
// from the Stream rather than allocating strings inbetween
|
||||||
// therefore the latter will be done only in DEBUG mode
|
// therefore the latter will be done only in DEBUG mode
|
||||||
|
#if DEBUG
|
||||||
var settings = new JsonSerializerSettings {Formatting = Formatting.Indented, Converters = serializer.Converters};
|
var settings = new JsonSerializerSettings {Formatting = Formatting.Indented, Converters = serializer.Converters};
|
||||||
|
#endif
|
||||||
|
|
||||||
using (var str = webRequest.GetRequestStream())
|
using (var str = webRequest.GetRequestStream())
|
||||||
using (var sw = new StreamWriter(str))
|
using (var sw = new StreamWriter(str))
|
||||||
|
Loading…
Reference in New Issue
Block a user