• Articles
  • API Documentation
Search Results for

    Show / Hide Table of Contents
    • SixLabors.ImageSharp.Web
      • CaseHandlingUriBuilder
      • CaseHandlingUriBuilder.CaseHandling
      • CommandHandling
      • ExifOrientationUtilities
      • Format
      • FormatCommand
      • FormatUtilities
      • FormattedImage
      • HMACUtilities
      • ImageCacheMetadata
      • ImageMetadata
      • RequestAuthorizationUtilities
      • Resampler
      • ResamplerCommand
    • SixLabors.ImageSharp.Web.Caching
      • ICacheHash
      • ICacheKey
      • IImageCache
      • LegacyV1CacheKey
      • PhysicalFileSystemCache
      • PhysicalFileSystemCacheOptions
      • SHA256CacheHash
      • UriAbsoluteCacheKey
      • UriAbsoluteLowerInvariantCacheKey
      • UriRelativeCacheKey
      • UriRelativeLowerInvariantCacheKey
    • SixLabors.ImageSharp.Web.Commands
      • CommandCollection
      • CommandCollectionExtensions
      • CommandParser
      • IRequestParser
      • PresetOnlyQueryCollectionRequestParser
      • PresetOnlyQueryCollectionRequestParserOptions
      • QueryCollectionRequestParser
    • SixLabors.ImageSharp.Web.Commands.Converters
      • ArrayConverter<T>
      • ColorConverter
      • EnumConverter
      • ICommandConverter
      • ICommandConverter<T>
      • IntegralNumberConverter<T>
      • ListConverter<T>
      • SimpleCommandConverter<T>
    • SixLabors.ImageSharp.Web.DependencyInjection
      • ApplicationBuilderExtensions
      • IImageSharpBuilder
      • ImageSharpBuilderExtensions
      • ServiceCollectionExtensions
    • SixLabors.ImageSharp.Web.Middleware
      • ImageCommandContext
      • ImageProcessingContext
      • ImageSharpMiddleware
      • ImageSharpMiddlewareOptions
    • SixLabors.ImageSharp.Web.Processors
      • AutoOrientWebProcessor
      • BackgroundColorWebProcessor
      • FormatWebProcessor
      • IImageWebProcessor
      • QualityWebProcessor
      • ResizeWebProcessor
    • SixLabors.ImageSharp.Web.Providers
      • FileProviderImageProvider
      • IImageProvider
      • PhysicalFileSystemProvider
      • PhysicalFileSystemProviderOptions
      • ProcessingBehavior
      • WebRootImageProvider
    • SixLabors.ImageSharp.Web.Resolvers
      • FileProviderImageResolver
      • IImageCacheResolver
      • IImageResolver
      • PhysicalFileSystemCacheResolver
    • SixLabors.ImageSharp.Web.Synchronization
      • AsyncKeyLock<TKey>
      • AsyncKeyReaderWriterLock<TKey>
      • AsyncLock
      • AsyncReaderWriterLock
      • RefCountedConcurrentDictionary<TKey, TValue>
    • SixLabors.ImageSharp.Web.TagHelpers
      • HmacTokenTagHelper
      • ImageTagHelper

    Class CommandCollection

    Represents an ordered collection of processing commands.

    Inheritance
    object
    Collection<KeyValuePair<string, string>>
    KeyedCollection<string, KeyValuePair<string, string>>
    CommandCollection
    Implements
    IList<KeyValuePair<string, string>>
    ICollection<KeyValuePair<string, string>>
    IReadOnlyList<KeyValuePair<string, string>>
    IReadOnlyCollection<KeyValuePair<string, string>>
    IEnumerable<KeyValuePair<string, string>>
    IList
    ICollection
    IEnumerable
    Inherited Members
    KeyedCollection<string, KeyValuePair<string, string>>.Contains(string)
    KeyedCollection<string, KeyValuePair<string, string>>.Remove(string)
    KeyedCollection<string, KeyValuePair<string, string>>.TryGetValue(string, out KeyValuePair<string, string>)
    KeyedCollection<string, KeyValuePair<string, string>>.Comparer
    KeyedCollection<string, KeyValuePair<string, string>>.this[string]
    Collection<KeyValuePair<string, string>>.Add(KeyValuePair<string, string>)
    Collection<KeyValuePair<string, string>>.Clear()
    Collection<KeyValuePair<string, string>>.Contains(KeyValuePair<string, string>)
    Collection<KeyValuePair<string, string>>.CopyTo(KeyValuePair<string, string>[], int)
    Collection<KeyValuePair<string, string>>.GetEnumerator()
    Collection<KeyValuePair<string, string>>.IndexOf(KeyValuePair<string, string>)
    Collection<KeyValuePair<string, string>>.Insert(int, KeyValuePair<string, string>)
    Collection<KeyValuePair<string, string>>.Remove(KeyValuePair<string, string>)
    Collection<KeyValuePair<string, string>>.RemoveAt(int)
    Collection<KeyValuePair<string, string>>.Count
    Collection<KeyValuePair<string, string>>.this[int]
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: SixLabors.ImageSharp.Web.Commands
    Assembly: SixLabors.ImageSharp.Web.dll
    Syntax
    public sealed class CommandCollection : KeyedCollection<string, KeyValuePair<string, string?>>, IList<KeyValuePair<string, string?>>, ICollection<KeyValuePair<string, string?>>, IReadOnlyList<KeyValuePair<string, string?>>, IReadOnlyCollection<KeyValuePair<string, string?>>, IEnumerable<KeyValuePair<string, string?>>, IList, ICollection, IEnumerable

    Constructors

    | Edit this page View Source

    CommandCollection()

    Initializes a new instance of the CommandCollection class.

    Declaration
    public CommandCollection()

    Properties

    | Edit this page View Source

    this[string]

    Gets or sets the value associated with the specified key.

    Declaration
    public string this[string key] { get; set; }
    Parameters
    Type Name Description
    string key

    The key of the value to get or set.

    Property Value
    Type Description
    string

    The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    KeyNotFoundException

    An element with the specified key does not exist in the collection.

    | Edit this page View Source

    Keys

    Gets an IEnumerable<T> representing the keys of the collection.

    Declaration
    public IEnumerable<string> Keys { get; }
    Property Value
    Type Description
    IEnumerable<string>

    Methods

    | Edit this page View Source

    Add(string, string)

    Adds an element with the provided key and value to the CommandCollection.

    Declaration
    public void Add(string key, string value)
    Parameters
    Type Name Description
    string key

    The string to use as the key of the element to add.

    string value

    The string to use as the value of the element to add.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    | Edit this page View Source

    FindIndex(Predicate<string>)

    Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire CommandCollection.

    Declaration
    public int FindIndex(Predicate<string> match)
    Parameters
    Type Name Description
    Predicate<string> match

    The Predicate<T> delegate that defines the conditions of the element to search for.

    Returns
    Type Description
    int

    The zero-based index of the first occurrence of an element that matches the conditions defined by match, if found; otherwise, -1.

    Exceptions
    Type Condition
    ArgumentNullException

    match is null.

    | Edit this page View Source

    GetKeyForItem(KeyValuePair<string, string?>)

    When implemented in a derived class, extracts the key from the specified element.

    Declaration
    protected override string GetKeyForItem(KeyValuePair<string, string?> item)
    Parameters
    Type Name Description
    KeyValuePair<string, string> item

    The element from which to extract the key.

    Returns
    Type Description
    string

    The key for the specified element.

    Overrides
    KeyedCollection<string, KeyValuePair<string, string>>.GetKeyForItem(KeyValuePair<string, string>)
    | Edit this page View Source

    IndexOf(string)

    Searches for the specified key and returns the zero-based index of the first occurrence within the entire CommandCollection.

    Declaration
    public int IndexOf(string key)
    Parameters
    Type Name Description
    string key

    The key to locate in the CommandCollection.

    Returns
    Type Description
    int

    The zero-based index of the first occurrence of key within the entire CommandCollection, if found; otherwise, -1.

    | Edit this page View Source

    Insert(int, string, string)

    Inserts an element into the CommandCollection at the specified index.

    Declaration
    public void Insert(int index, string key, string value)
    Parameters
    Type Name Description
    int index

    The zero-based index at which item should be inserted.

    string key

    The string to use as the key of the element to insert.

    string value

    The string to use as the value of the element to insert.

    Exceptions
    Type Condition
    ArgumentOutOfRangeException

    index is less than zero. -or- index is greater than CommandCollection.Count.

    | Edit this page View Source

    TryGetValue(string, out string?)

    Gets the value associated with the specified key.

    Declaration
    public bool TryGetValue(string key, out string? value)
    Parameters
    Type Name Description
    string key

    The key whose value to get.

    string value

    When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized.

    Returns
    Type Description
    bool

    true if the object that implements CommandCollection contains an element with the specified key; otherwise, false.

    Exceptions
    Type Condition
    ArgumentNullException

    key is null.

    Implements

    IList<T>
    ICollection<T>
    IReadOnlyList<T>
    IReadOnlyCollection<T>
    IEnumerable<T>
    IList
    ICollection
    IEnumerable

    Extension Methods

    CommandCollectionExtensions.GetValueOrDefault(CommandCollection, string)
    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX