You've already forked linux-packaging-mono
Imported Upstream version 5.4.0.167
Former-commit-id: 5624ac747d633e885131e8349322922b6a59baaa
This commit is contained in:
parent
e49d6f06c0
commit
536cd135cc
@ -12,6 +12,7 @@ namespace System.Runtime.Caching.Configuration {
|
||||
internal const string CacheMemoryLimitMegabytes = "cacheMemoryLimitMegabytes";
|
||||
internal const string PhysicalMemoryLimitPercentage = "physicalMemoryLimitPercentage";
|
||||
internal const string PollingInterval = "pollingInterval";
|
||||
internal const string UseMemoryCacheManager = "useMemoryCacheManager";
|
||||
internal const int DefaultPollingTimeMilliseconds = 120000;
|
||||
|
||||
internal static int GetIntValue(NameValueCollection config, string valueName, int defaultValue, bool zeroAllowed, int maxValueAllowed) {
|
||||
@ -63,5 +64,19 @@ namespace System.Runtime.Caching.Configuration {
|
||||
return iValue;
|
||||
}
|
||||
|
||||
internal static bool GetBooleanValue(NameValueCollection config, string valueName, bool defaultValue) {
|
||||
string sValue = config[valueName];
|
||||
|
||||
if (sValue == null) {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
bool bValue;
|
||||
if (!Boolean.TryParse(sValue, out bValue)) {
|
||||
throw new ArgumentException(RH.Format(R.Value_must_be_boolean, valueName, sValue), "config");
|
||||
}
|
||||
|
||||
return bValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user