public AzureAppConfigurationOptions Select()

in src/Microsoft.Extensions.Configuration.AzureAppConfiguration/AzureAppConfigurationOptions.cs [192:236]


        public AzureAppConfigurationOptions Select(string keyFilter, string labelFilter = LabelFilter.Null, IEnumerable<string> tagFilters = null)
        {
            if (string.IsNullOrEmpty(keyFilter))
            {
                throw new ArgumentNullException(nameof(keyFilter));
            }

            // Do not support * and , for label filter for now.
            if (labelFilter != null && (labelFilter.Contains('*') || labelFilter.Contains(',')))
            {
                throw new ArgumentException("The characters '*' and ',' are not supported in label filters.", nameof(labelFilter));
            }

            if (string.IsNullOrWhiteSpace(labelFilter))
            {
                labelFilter = LabelFilter.Null;
            }

            if (tagFilters != null)
            {
                foreach (string tag in tagFilters)
                {
                    if (string.IsNullOrEmpty(tag) || !tag.Contains('=') || tag.IndexOf('=') == 0)
                    {
                        throw new ArgumentException($"Tag filter '{tag}' does not follow the format \"tagName=tagValue\".", nameof(tagFilters));
                    }
                }
            }

            if (!_selectCalled)
            {
                _selectors.Remove(DefaultQuery);

                _selectCalled = true;
            }

            _selectors.AppendUnique(new KeyValueSelector
            {
                KeyFilter = keyFilter,
                LabelFilter = labelFilter,
                TagFilters = tagFilters
            });

            return this;
        }