Ejemplo n.º 1
0
        /// <inheritdoc/>
        public override string ToString()
        {
            var builder = new List <string>();

            var substring = ResourceTypeFilter?.GetFilterString();

            if (!string.IsNullOrWhiteSpace(substring))
            {
                builder.Add(substring);
            }

            substring = SubstringFilter?.GetFilterString();
            if (!string.IsNullOrWhiteSpace(substring))
            {
                builder.Add(substring);
            }

            substring = TagFilter?.GetFilterString();
            if (!string.IsNullOrWhiteSpace(substring))
            {
                builder.Add(substring);
            }

            return($"{string.Join(" and ", builder)}");
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceFilterCollection"/> class.
 /// </summary>
 /// <param name="type"> The resource type to filter by. </param>
 public ResourceFilterCollection(ResourceType type)
 {
     ResourceTypeFilter = new ResourceTypeFilter(type);
 }