本文整理汇总了C#中Ice.getPropertyAsInt方法的典型用法代码示例。如果您正苦于以下问题:C# Ice.getPropertyAsInt方法的具体用法?C# Ice.getPropertyAsInt怎么用?C# Ice.getPropertyAsInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ice
的用法示例。
在下文中一共展示了Ice.getPropertyAsInt方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoggerAdminI
internal LoggerAdminI(Ice.Properties props, LoggerAdminLoggerI logger)
{
_maxLogCount = props.getPropertyAsIntWithDefault("Ice.Admin.Logger.KeepLogs", 100);
_maxTraceCount = props.getPropertyAsIntWithDefault("Ice.Admin.Logger.KeepTraces", 100);
_traceLevel = props.getPropertyAsInt("Ice.Trace.Admin.Logger");
_logger = logger;
}
示例2: TraceLevels
internal TraceLevels(Ice.Properties properties)
{
networkCat = "Network";
protocolCat = "Protocol";
retryCat = "Retry";
locationCat = "Locator";
slicingCat = "Slicing";
threadPoolCat = "ThreadPool";
string keyBase = "Ice.Trace.";
network = properties.getPropertyAsInt(keyBase + networkCat);
protocol = properties.getPropertyAsInt(keyBase + protocolCat);
retry = properties.getPropertyAsInt(keyBase + retryCat);
location = properties.getPropertyAsInt(keyBase + locationCat);
slicing = properties.getPropertyAsInt(keyBase + slicingCat);
threadPool = properties.getPropertyAsInt(keyBase + threadPoolCat);
}
示例3: 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;
}
else
{
defaultHost = null;
}
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.CloseTimeout");
if(val.Length > 0)
{
overrideCloseTimeout = true;
overrideCloseTimeoutValue = properties.getPropertyAsInt("Ice.Override.CloseTimeout");
}
else
{
overrideCloseTimeout = false;
overrideCloseTimeoutValue = -1;
}
#if COMPACT
overrideCompress = false;
overrideCompressValue = false;
#else
val = properties.getProperty("Ice.Override.Compress");
if(val.Length > 0)
{
overrideCompress = true;
overrideCompressValue = properties.getPropertyAsInt("Ice.Override.Compress") != 0;
if(!BasicStream.compressible() && overrideCompressValue)
{
string lib = AssemblyUtil.runtime_ == AssemblyUtil.Runtime.Mono ? "bzip2 library" : "bzip2.dll";
Console.Error.WriteLine("warning: " + lib + " not found, Ice.Override.Compress ignored.");
overrideCompressValue = false;
}
}
else
{
overrideCompress = !BasicStream.compressible();
overrideCompressValue = false;
}
#endif
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.CollocationOptimized", 1) > 0;
val = properties.getPropertyWithDefault("Ice.Default.EndpointSelection", "Random");
if(val.Equals("Random"))
{
defaultEndpointSelection = Ice.EndpointSelectionType.Random;
}
else if(val.Equals("Ordered"))
{
defaultEndpointSelection = Ice.EndpointSelectionType.Ordered;
}
else
//.........这里部分代码省略.........
示例4: DefaultsAndOverrides
internal DefaultsAndOverrides(Ice.Properties properties, Ice.Logger logger)
{
string val;
defaultProtocol = properties.getPropertyWithDefault("Ice.Default.Protocol", "tcp");
val = properties.getProperty("Ice.Default.Host");
if(val.Length != 0)
{
defaultHost = val;
}
else
{
defaultHost = null;
}
val = properties.getProperty("Ice.Default.SourceAddress");
if(val.Length > 0)
{
defaultSourceAddress = Network.getNumericAddress(val);
if(defaultSourceAddress == null)
{
throw new Ice.InitializationException("invalid IP address set for Ice.Default.SourceAddress: `" +
val + "'");
}
}
else
{
defaultSourceAddress = null;
}
val = properties.getProperty("Ice.Override.Timeout");
if(val.Length > 0)
{
overrideTimeout = true;
overrideTimeoutValue = properties.getPropertyAsInt("Ice.Override.Timeout");
if(overrideTimeoutValue < 1 && overrideTimeoutValue != -1)
{
overrideTimeoutValue = -1;
StringBuilder msg = new StringBuilder("invalid value for Ice.Override.Timeout `");
msg.Append(properties.getProperty("Ice.Override.Timeout"));
msg.Append("': defaulting to -1");
logger.warning(msg.ToString());
}
}
else
{
overrideTimeout = false;
overrideTimeoutValue = -1;
}
val = properties.getProperty("Ice.Override.ConnectTimeout");
if(val.Length > 0)
{
overrideConnectTimeout = true;
overrideConnectTimeoutValue = properties.getPropertyAsInt("Ice.Override.ConnectTimeout");
if(overrideConnectTimeoutValue < 1 && overrideConnectTimeoutValue != -1)
{
overrideConnectTimeoutValue = -1;
StringBuilder msg = new StringBuilder("invalid value for Ice.Override.ConnectTimeout `");
msg.Append(properties.getProperty("Ice.Override.ConnectTimeout"));
msg.Append("': defaulting to -1");
logger.warning(msg.ToString());
}
}
else
{
overrideConnectTimeout = false;
overrideConnectTimeoutValue = -1;
}
val = properties.getProperty("Ice.Override.CloseTimeout");
if(val.Length > 0)
{
overrideCloseTimeout = true;
overrideCloseTimeoutValue = properties.getPropertyAsInt("Ice.Override.CloseTimeout");
if(overrideCloseTimeoutValue < 1 && overrideCloseTimeoutValue != -1)
{
overrideCloseTimeoutValue = -1;
StringBuilder msg = new StringBuilder("invalid value for Ice.Override.CloseTimeout `");
msg.Append(properties.getProperty("Ice.Override.CloseTimeout"));
msg.Append("': defaulting to -1");
logger.warning(msg.ToString());
}
}
else
{
overrideCloseTimeout = false;
overrideCloseTimeoutValue = -1;
}
#if COMPACT
overrideCompress = false;
overrideCompressValue = false;
#else
val = properties.getProperty("Ice.Override.Compress");
if(val.Length > 0)
{
overrideCompress = true;
overrideCompressValue = properties.getPropertyAsInt("Ice.Override.Compress") > 0;
//.........这里部分代码省略.........
示例5: LocatorManager
internal LocatorManager(Ice.Properties properties)
{
_table = new Dictionary<Ice.LocatorPrx, LocatorInfo>();
_locatorTables = new Dictionary<LocatorKey, LocatorTable>();
_background = properties.getPropertyAsInt("Ice.BackgroundLocatorCacheUpdates") > 0;
}
示例6: LocatorManager
internal LocatorManager(Ice.Properties properties)
{
_table = new Hashtable();
_locatorTables = new Hashtable();
_background = properties.getPropertyAsInt("Ice.BackgroundLocatorCacheUpdates") > 0;
}