diff options
Diffstat (limited to 'cs/src/Ice/DefaultsAndOverrides.cs')
-rwxr-xr-x | cs/src/Ice/DefaultsAndOverrides.cs | 166 |
1 files changed, 83 insertions, 83 deletions
diff --git a/cs/src/Ice/DefaultsAndOverrides.cs b/cs/src/Ice/DefaultsAndOverrides.cs index efbf69e80bd..d7413dbf24d 100755 --- a/cs/src/Ice/DefaultsAndOverrides.cs +++ b/cs/src/Ice/DefaultsAndOverrides.cs @@ -14,75 +14,75 @@ namespace IceInternal public sealed class DefaultsAndOverrides { - internal DefaultsAndOverrides(Ice.Properties properties) - { - string val; - - defaultProtocol = properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); - - val = properties.getProperty("Ice.Default.Host"); - if(val.Length != 0) - { - defaultHost = val; - } - - val = properties.getProperty("Ice.Override.Timeout"); - if(val.Length > 0) - { - overrideTimeout = true; - overrideTimeoutValue = properties.getPropertyAsInt("Ice.Override.Timeout"); - } - else - { - overrideTimeout = false; - overrideTimeoutValue = -1; - } - - val = properties.getProperty("Ice.Override.ConnectTimeout"); - if(val.Length > 0) - { - overrideConnectTimeout = true; - overrideConnectTimeoutValue = properties.getPropertyAsInt("Ice.Override.ConnectTimeout"); - } - else - { - overrideConnectTimeout = false; - overrideConnectTimeoutValue = -1; - } + internal DefaultsAndOverrides(Ice.Properties properties) + { + string val; + + defaultProtocol = properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp"); + + val = properties.getProperty("Ice.Default.Host"); + if(val.Length != 0) + { + defaultHost = val; + } + + val = properties.getProperty("Ice.Override.Timeout"); + if(val.Length > 0) + { + overrideTimeout = true; + overrideTimeoutValue = properties.getPropertyAsInt("Ice.Override.Timeout"); + } + else + { + overrideTimeout = false; + overrideTimeoutValue = -1; + } + + val = properties.getProperty("Ice.Override.ConnectTimeout"); + if(val.Length > 0) + { + overrideConnectTimeout = true; + overrideConnectTimeoutValue = properties.getPropertyAsInt("Ice.Override.ConnectTimeout"); + } + else + { + overrideConnectTimeout = false; + overrideConnectTimeoutValue = -1; + } - val = properties.getProperty("Ice.Override.Compress"); - if(val.Length > 0) - { - overrideCompress = true; - overrideCompressValue = properties.getPropertyAsInt("Ice.Override.Compress") != 0; - if(!BasicStream.compressible() && overrideCompressValue) - { - Console.Error.WriteLine("warning: libbz2 not installed, Ice.Override.Compress ignored"); - overrideCompressValue = false; - } - } - else - { - overrideCompress = !BasicStream.compressible(); - overrideCompressValue = false; - } + val = properties.getProperty("Ice.Override.Compress"); + if(val.Length > 0) + { + overrideCompress = true; + overrideCompressValue = properties.getPropertyAsInt("Ice.Override.Compress") != 0; + if(!BasicStream.compressible() && overrideCompressValue) + { + Console.Error.WriteLine("warning: libbz2 not installed, Ice.Override.Compress ignored"); + overrideCompressValue = false; + } + } + else + { + overrideCompress = !BasicStream.compressible(); + overrideCompressValue = false; + } - val = properties.getProperty("Ice.Override.Secure"); - if(val.Length > 0) - { - overrideSecure = true; - overrideSecureValue = properties.getPropertyAsInt("Ice.Override.Secure") > 0; - } - else - { - overrideSecure = false; - overrideSecureValue = false; - } + val = properties.getProperty("Ice.Override.Secure"); + if(val.Length > 0) + { + overrideSecure = true; + overrideSecureValue = properties.getPropertyAsInt("Ice.Override.Secure") > 0; + } + else + { + overrideSecure = false; + overrideSecureValue = false; + } - defaultCollocationOptimization = - properties.getPropertyAsIntWithDefault("Ice.Default.CollocationOptimization", 1) > 0; + defaultCollocationOptimization = + properties.getPropertyAsIntWithDefault("Ice.Default.CollocationOptimization", 1) > 0; - val = properties.getPropertyWithDefault("Ice.Default.EndpointSelection", "Random"); + val = properties.getPropertyWithDefault("Ice.Default.EndpointSelection", "Random"); if(val.Equals("Random")) { defaultEndpointSelection = Ice.EndpointSelectionType.Random; @@ -98,26 +98,26 @@ namespace IceInternal throw ex; } - defaultLocatorCacheTimeout = properties.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout", -1); + defaultLocatorCacheTimeout = properties.getPropertyAsIntWithDefault("Ice.Default.LocatorCacheTimeout", -1); - defaultPreferSecure = properties.getPropertyAsIntWithDefault("Ice.Default.PreferSecure", 0) > 0; - } - - public string defaultHost; - public string defaultProtocol; - public bool defaultCollocationOptimization; + defaultPreferSecure = properties.getPropertyAsIntWithDefault("Ice.Default.PreferSecure", 0) > 0; + } + + public string defaultHost; + public string defaultProtocol; + public bool defaultCollocationOptimization; public Ice.EndpointSelectionType defaultEndpointSelection; - public int defaultLocatorCacheTimeout; - public bool defaultPreferSecure; - - public bool overrideTimeout; - public int overrideTimeoutValue; - public bool overrideConnectTimeout; - public int overrideConnectTimeoutValue; - public bool overrideCompress; - public bool overrideCompressValue; - public bool overrideSecure; - public bool overrideSecureValue; + public int defaultLocatorCacheTimeout; + public bool defaultPreferSecure; + + public bool overrideTimeout; + public int overrideTimeoutValue; + public bool overrideConnectTimeout; + public int overrideConnectTimeoutValue; + public bool overrideCompress; + public bool overrideCompressValue; + public bool overrideSecure; + public bool overrideSecureValue; } } |