private PrefixContainer GetOrCreatePrefixContainer() { if (_prefixContainer == null) { _prefixContainer = new PrefixContainer(_values.Keys); } return(_prefixContainer); }
private async Task <PrefixContainer> GetPrefixContainerAsync() { if (_prefixContainer == null) { // Initialization race is OK providing data remains read-only and object identity is not significant var collection = await GetValueCollectionAsync(); _prefixContainer = new PrefixContainer(collection.Keys); } return(_prefixContainer); }
private async Task <PrefixContainer> GetPrefixContainerAsync() { if (_prefixContainer == null) { var dictionary = await GetDictionary(); // Initialization race is OK providing data remains read-only and object identity is not significant. _prefixContainer = new PrefixContainer(dictionary.Keys); } return(_prefixContainer); }
public Task <bool> ContainsPrefixAsync(string prefix) { return(Task.FromResult(PrefixContainer.IsPrefixMatch(prefix, Name))); }
public bool ContainsPrefix(string prefix) { return(PrefixContainer.IsPrefixMatch(prefix, Key)); }