public QuoteFinder(StringComparison stringComparison, Dispatcher dispatcher, int cacheThreshold) { // checking preconditions if (stringComparison == StringComparison.Ordinal || stringComparison == StringComparison.OrdinalIgnoreCase) { throw new NotSupportedException(); } else if (cacheThreshold < 0) { throw new ArgumentOutOfRangeException(); } _cacheThreshold = cacheThreshold; _stringComparison = stringComparison; _stringComparer = stringComparison.GetStringComparer(); _searchCacheKeyEqualityComparer = new SearchCacheKeyEqualityComparer(stringComparison, _stringComparer); _dispatcher = dispatcher; }
public ConfigFile(IDictionary <string, ConfigSection> sections = null, StringComparison comparisonType = DefaultStringComparison) { _sections = sections ?? new Dictionary <string, ConfigSection>(comparisonType.GetStringComparer()); ComparisonType = comparisonType; }
public ConfigSection(IDictionary <string, ConfigProperty> properties = null, StringComparison comparisonType = ConfigFile.DefaultStringComparison) { _properties = properties ?? new Dictionary <string, ConfigProperty>(comparisonType.GetStringComparer()); ComparisonType = comparisonType; }