Show / Hide Table of Contents

Class AVMultiDictionary

Represents a managed wrapper around FFmpeg's AVDictionary that supports multiple values for the same key.

Inheritance
object
AVMultiDictionary
Implements
ILookup<string, string>
IEnumerable<IGrouping<string, string>>
IEnumerable
IDisposable
IAVPointer<_AVDictionary>
Inherited Members
object.GetType()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: FFmpeg.Collections
Assembly: FFmpeg.dll
Syntax
public sealed class AVMultiDictionary : ILookup<string, string>, IEnumerable<IGrouping<string, string>>, IEnumerable, IDisposable, IAVPointer<_AVDictionary>
Remarks

Unlike AVDictionary, this class allows duplicate keys by storing multiple entries with the same key.

Constructors

View Source

AVMultiDictionary(bool)

Initializes a new empty AVMultiDictionary.

Declaration
public AVMultiDictionary(bool ignoreCase = true)
Parameters
Type Name Description
bool ignoreCase

If set to true, the dictionary will ignore case when comparing keys.

View Source

AVMultiDictionary(IDictionary<string, string>, bool)

Initializes a new AVMultiDictionary containing the specified key/value pairs.

Declaration
public AVMultiDictionary(IDictionary<string, string> values, bool ignoreCase = false)
Parameters
Type Name Description
IDictionary<string, string> values
bool ignoreCase
View Source

AVMultiDictionary(ILookup<string, string>, bool)

Initializes a new AVMultiDictionary containing the values from the specified lookup.

Declaration
public AVMultiDictionary(ILookup<string, string> values, bool ignoreCase = false)
Parameters
Type Name Description
ILookup<string, string> values
bool ignoreCase

Properties

View Source

Count

Gets the total number of key/value pairs contained in the dictionary.

Declaration
public int Count { get; }
Property Value
Type Description
int
Remarks

Multiple entries with the same key are counted individually.

View Source

this[string]

Gets an enumerable sequence containing all values associated with the specified key.

Declaration
public IEnumerable<string> this[string key] { get; }
Parameters
Type Name Description
string key

The key whose values to get.

Property Value
Type Description
IEnumerable<string>

An enumerable collection of values associated with the specified key.

Methods

View Source

Add(string, string)

Adds a key/value pair to the dictionary.

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

The key of the element to add.

string value

The value of the element to add.

Remarks

This method does not replace existing values. If the key already exists, an additional value is added.

View Source

Clear()

Removes all key/value pairs from the dictionary.

Declaration
public void Clear()
View Source

Contains(string)

Determines whether the dictionary contains the specified key.

Declaration
public bool Contains(string key)
Parameters
Type Name Description
string key

The key to locate in the dictionary.

Returns
Type Description
bool

true if the dictionary contains an element with the specified key; otherwise, false.

View Source

Dispose()

Releases the unmanaged FFmpeg dictionary associated with this instance.

Declaration
public void Dispose()
View Source

~AVMultiDictionary()

Declaration
protected ~AVMultiDictionary()
View Source

GetEnumerator()

Returns an enumerator that iterates through the dictionary.

Declaration
public IEnumerator<IGrouping<string, string>> GetEnumerator()
Returns
Type Description
IEnumerator<IGrouping<string, string>>

An enumerator that can be used to iterate through the dictionary.

View Source

RemoveAll(string)

Removes all values associated with the specified key.

Declaration
public bool RemoveAll(string key)
Parameters
Type Name Description
string key

The key whose values to remove.

Returns
Type Description
bool

true if any values were removed; otherwise, false.

Remarks

If multiple values exist for the specified key, only the first matching entry is removed.

View Source

RemoveFirst(string)

Removes the first value associated with the specified key.

Declaration
public bool RemoveFirst(string key)
Parameters
Type Name Description
string key

The key whose first value to remove.

Returns
Type Description
bool

true if a value was removed; otherwise, false.

Remarks

If multiple values exist for the specified key, only the first matching entry is removed.

View Source

ToString()

Returns a string representation of the dictionary.

Declaration
public override string ToString()
Returns
Type Description
string

A colon-separated list of key/value groups in the form key=value1,value2:key2=value3.

Overrides
object.ToString()

Implements

ILookup<TKey, TElement>
IEnumerable<T>
IEnumerable
IDisposable
IAVPointer<T>
  • View Source
In this article
Back to top Generated by DocFX