text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>Class MultiValueDictionary<TKey, TValue>
   </title>
    <meta name="viewport" content="width=device-width">
    <meta name="title" content="Class MultiValueDictionary<TKey, TValue>
   ">
    <meta name="generator" content="docfx 2.16.2.2">

    <link rel="shortcut icon" href="../favicon.ico">
    <link rel="stylesheet" href="../styles/docfx.vendor.css">
    <link rel="stylesheet" href="../styles/docfx.css">
    <link rel="stylesheet" href="../styles/main.css">
    <meta property="docfx:navrel" content="../toc.html">
    <meta property="docfx:tocrel" content="toc.html">

              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
                Toggle navigation

              </button>

              <form class="navbar-form navbar-right" role="search" id="search">

                  <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">

              </form>

          Show / Hide Table of Contents

Class MultiValueDictionary<TKey, TValue>

A MultiValueDictionary can be viewed as a IDictionary that allows multiple
values for any given unique key. While the MultiValueDictionary API is
mostly the same as that of a regular IDictionary, there is a distinction
in that getting the value for a key returns a IReadOnlyCollection<T> of values
rather than a single value associated with that key. Additionally,
there is functionality to allow adding or removing more than a single
value at once.

The MultiValueDictionary can also be viewed as a IReadOnlyDictionary<TKey,IReadOnlyCollection<TValue>t>
where the IReadOnlyCollection<T> is abstracted from the view of the programmer.

For a read-only MultiValueDictionary, see ILookup<TKey, TElement>.

Inheritance

Object

MultiValueDictionary<TKey, TValue>

Inherited Members

                  Object.Equals(Object)

                  Object.Equals(Object, Object)

                  Object.GetHashCode()

                  Object.GetType()

                  Object.MemberwiseClone()

                  Object.ReferenceEquals(Object, Object)

                  Object.ToString()

Namespace:System.Collections.Generic

Assembly:FubarDev.WebDavServer.dll

Syntax

public class MultiValueDictionary<TKey, TValue> : IReadOnlyDictionary<TKey, IReadOnlyCollection<TValue>>, IReadOnlyCollection<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, IEnumerable

Type Parameters

                    Name
                    Description

                    TKey

The type of the key.

                    TValue

The type of the value.

Constructors

                |
                Improve this Doc

                View Source

MultiValueDictionary()

Initializes a new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the default initial capacity, and uses the default
IEqualityComparer<T> for TKey.

Declaration

public MultiValueDictionary()

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.%23ctor(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____" data-uid="System.Collections.Generic.MultiValueDictionary`2.#ctor(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}})">MultiValueDictionary(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> and uses the
default IEqualityComparer<T> for the TKey type.

Declaration

public MultiValueDictionary(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable)

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

Exceptions

                    Type
                    Condition

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.%23ctor(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.#ctor(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}},System.Collections.Generic.IEqualityComparer{`0})">MultiValueDictionary(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, IEqualityComparer<TKey>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> and uses the
specified IEqualityComparer<T>.

Declaration

public MultiValueDictionary(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable, IEqualityComparer<TKey> comparer)

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.%23ctor(System.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2__ctor_System_Collections_Generic_IEqualityComparer__0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.#ctor(System.Collections.Generic.IEqualityComparer{`0})">MultiValueDictionary(IEqualityComparer<TKey>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class
that is empty, has the default initial capacity, and uses the
specified IEqualityComparer<T>.

Declaration

public MultiValueDictionary(IEqualityComparer<TKey> comparer)

Parameters

                    Type
                    Name
                    Description

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

                |
                Improve this Doc

                View Source

MultiValueDictionary(Int32)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that is
empty, has the specified initial capacity, and uses the default IEqualityComparer<T>
for TKey.

Declaration

public MultiValueDictionary(int capacity)

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

Exceptions

                    Type
                    Condition

                    ArgumentOutOfRangeException

capacity must be >= 0

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2__ctor_System_Int32_System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.%23ctor(System.Int32%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2__ctor_System_Int32_System_Collections_Generic_IEqualityComparer__0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.#ctor(System.Int32,System.Collections.Generic.IEqualityComparer{`0})">MultiValueDictionary(Int32, IEqualityComparer<TKey>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class
that is empty, has the specified initial capacity, and uses the
specified IEqualityComparer<T>.

Declaration

public MultiValueDictionary(int capacity, IEqualityComparer<TKey> comparer)

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    ArgumentOutOfRangeException

Capacity must be >= 0

Properties

                |
                Improve this Doc

                View Source

Count

Returns the number of TKeys with one or more associated TValue
in this MultiValueDictionary<TKey, TValue>.

Declaration

public int Count { get; }

Property Value

                    Type
                    Description

                    Int32

The number of TKeys in this MultiValueDictionary<TKey, TValue>.

Implements

IReadOnlyCollection<T>.Count

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Item__0_" data-uid="System.Collections.Generic.MultiValueDictionary`2.Item(`0)">Item[TKey]

Get every TValue associated with the given TKey. If
key is not found in this MultiValueDictionary<TKey, TValue>, will
throw a KeyNotFoundException.

Declaration

public IReadOnlyCollection<TValue> this[TKey key] { get; }

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the elements to retrieve.

Property Value

                    Type
                    Description

                    IReadOnlyCollection<TValue>

An IReadOnlyCollection<T> containing every TValue
associated with key.

Implements

IReadOnlyDictionary<TKey, TValue>.Item[TKey]

Remarks

Note that the IReadOnlyCollection<T> returned will change alongside any changes
to the MultiValueDictionary<TKey, TValue>

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key must be non-null

                    KeyNotFoundException

key does not have any associated
TValues in this MultiValueDictionary<TKey, TValue>.

                |
                Improve this Doc

                View Source

Keys

Gets each TKey in this MultiValueDictionary<TKey, TValue> that
has one or more associated TValue.

Declaration

public IEnumerable<TKey> Keys { get; }

Property Value

                    Type
                    Description

                    IEnumerable<TKey>

An IEnumerable<T> containing each TKey
in this MultiValueDictionary<TKey, TValue> that has one or more associated
TValue.

Implements

IReadOnlyDictionary<TKey, TValue>.Keys

                |
                Improve this Doc

                View Source

Values

Gets an enumerable of IReadOnlyCollection<T> from this MultiValueDictionary<TKey, TValue>,
where each IReadOnlyCollection<T> is the collection of every TValue associated
with a TKey present in the MultiValueDictionary<TKey, TValue>.

Declaration

public IEnumerable<IReadOnlyCollection<TValue>> Values { get; }

Property Value

                    Type
                    Description

                    IEnumerable<IReadOnlyCollection<TValue>>

An IEnumerable of each IReadOnlyCollection<T> in this
MultiValueDictionary<TKey, TValue>

Implements

IReadOnlyDictionary<TKey, TValue>.Values

Methods

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Add__0__1_" data-uid="System.Collections.Generic.MultiValueDictionary`2.Add(`0,`1)">Add(TKey, TValue)

Adds the specified TKey and TValue to the MultiValueDictionary<TKey, TValue>.

Declaration

public void Add(TKey key, TValue value)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the element to add.

                    TValue
                    value

The TValue of the element to add.

Remarks

Unlike the Add for IDictionary, the MultiValueDictionary<TKey, TValue> Add will not
throw any exceptions. If the given TKey is already in the MultiValueDictionary<TKey, TValue>,
then TValue will be added to IReadOnlyCollection<T> associated with key

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key is null.

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_AddRange__0_System_Collections_Generic_IEnumerable__1__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.AddRange(%600%2CSystem.Collections.Generic.IEnumerable%7B%601%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_AddRange__0_System_Collections_Generic_IEnumerable__1__" data-uid="System.Collections.Generic.MultiValueDictionary`2.AddRange(`0,System.Collections.Generic.IEnumerable{`1})">AddRange(TKey, IEnumerable<TValue>)

Adds a number of key-value pairs to this MultiValueDictionary<TKey, TValue>, where
the key for each value is key, and the value for a pair
is an element from values

Declaration

public void AddRange(TKey key, IEnumerable<TValue> values)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of all entries to add

                    IEnumerable<TValue>
                    values

An IEnumerable<T> of values to add

Remarks

A call to this AddRange method will always invalidate any currently running enumeration regardless
of whether the AddRange method actually modified the MultiValueDictionary<TKey, TValue>.

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key and values must be non-null

                |
                Improve this Doc

                View Source

Clear()

Removes every TKey and TValue from this
MultiValueDictionary<TKey, TValue>.

Declaration

public void Clear()

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Contains__0__1_" data-uid="System.Collections.Generic.MultiValueDictionary`2.Contains(`0,`1)">Contains(TKey, TValue)

Determines if the given TKey-TValue
pair exists within this MultiValueDictionary<TKey, TValue>.

Declaration

public bool Contains(TKey key, TValue value)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the element.

                    TValue
                    value

The TValue of the element.

Returns

                    Type
                    Description

                    Boolean

true if found; otherwise false

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key must be non-null

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_ContainsKey__0_" data-uid="System.Collections.Generic.MultiValueDictionary`2.ContainsKey(`0)">ContainsKey(TKey)

Determines if the given TKey exists within this MultiValueDictionary<TKey, TValue> and has
at least one TValue associated with it.

Declaration

public bool ContainsKey(TKey key)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey to search the MultiValueDictionary<TKey, TValue> for

Returns

                    Type
                    Description

                    Boolean

true if the MultiValueDictionary<TKey, TValue> contains the requested TKey;
    otherwise false.

Implements

IReadOnlyDictionary<TKey, TValue>.ContainsKey(TKey)

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key must be non-null

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_ContainsValue__1_" data-uid="System.Collections.Generic.MultiValueDictionary`2.ContainsValue(`1)">ContainsValue(TValue)

Determines if the given TValue exists within this MultiValueDictionary<TKey, TValue>.

Declaration

public bool ContainsValue(TValue value)

Parameters

                    Type
                    Name
                    Description

                    TValue
                    value

A TValue to search the MultiValueDictionary<TKey, TValue> for

Returns

                    Type
                    Description

                    Boolean

true if the MultiValueDictionary<TKey, TValue> contains the value; otherwise false

                |
                Improve this Doc

                View Source

Create<TValueCollection>()

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the default initial capacity, and uses the default
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>()where TValueCollection : ICollection<TValue>, new ()

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____" data-uid="System.Collections.Generic.MultiValueDictionary`2.Create``1(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}})">Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
and uses the default IEqualityComparer<T> for the TKey type.
The internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable)where TValueCollection : ICollection<TValue>, new ()

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.Create``1(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}},System.Collections.Generic.IEqualityComparer{`0})">Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, IEqualityComparer<TKey>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
and uses the specified IEqualityComparer<T> for the TKey type.
The internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable, IEqualityComparer<TKey> comparer)where TValueCollection : ICollection<TValue>, new ()

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__System_Func___0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D%2CSystem.Func%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Collections_Generic_IEqualityComparer__0__System_Func___0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.Create``1(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}},System.Collections.Generic.IEqualityComparer{`0},System.Func{``0})">Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, IEqualityComparer<TKey>, Func<TValueCollection>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
and uses the specified IEqualityComparer<T> for the TKey type.
The internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable, IEqualityComparer<TKey> comparer, Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Func___0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEnumerable%7BSystem.Collections.Generic.KeyValuePair%7B%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%7D%7D%2CSystem.Func%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEnumerable_System_Collections_Generic_KeyValuePair__0_System_Collections_Generic_IReadOnlyCollection__1____System_Func___0__" data-uid="System.Collections.Generic.MultiValueDictionary`2.Create``1(System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,System.Collections.Generic.IReadOnlyCollection{`1}}},System.Func{``0})">Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>, Func<TValueCollection>)

Initializes a new instance of the MultiValueDictionary<TKey, TValue> class that contains
elements copied from the specified IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
and uses the default IEqualityComparer<T> for the TKey type.
The internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEnumerable<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> enumerable, Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    IEnumerable<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>
                    enumerable

IEnumerable to copy elements into this from

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                    ArgumentNullException

enumerable must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

Create<TValueCollection>(IEqualityComparer<TKey>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the default initial capacity, and uses the specified
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEqualityComparer<TKey> comparer)where TValueCollection : ICollection<TValue>, new ()

Parameters

                    Type
                    Name
                    Description

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Collections_Generic_IEqualityComparer__0__System_Func___0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Collections.Generic.IEqualityComparer%7B%600%7D%2CSystem.Func%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

Create<TValueCollection>(IEqualityComparer<TKey>, Func<TValueCollection>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the default initial capacity, and uses the specified
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(IEqualityComparer<TKey> comparer, Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                |
                Improve this Doc

                View Source

Create<TValueCollection>(Func<TValueCollection>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the default initial capacity, and uses the default
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                |
                Improve this Doc

                View Source

Create<TValueCollection>(Int32)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the specified initial capacity, and uses the default
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(int capacity)where TValueCollection : ICollection<TValue>, new ()

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    ArgumentOutOfRangeException

Capacity must be >= 0

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Int32_System_Collections_Generic_IEqualityComparer__0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Int32%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

Create<TValueCollection>(Int32, IEqualityComparer<TKey>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the specified initial capacity, and uses the specified
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(int capacity, IEqualityComparer<TKey> comparer)where TValueCollection : ICollection<TValue>, new ()

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

TValueCollection must not have
    IsReadOnly set to true by default.

                    ArgumentOutOfRangeException

Capacity must be >= 0

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Int32_System_Collections_Generic_IEqualityComparer__0__System_Func___0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Int32%2CSystem.Collections.Generic.IEqualityComparer%7B%600%7D%2CSystem.Func%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

Create<TValueCollection>(Int32, IEqualityComparer<TKey>, Func<TValueCollection>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the specified initial capacity, and uses the specified
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(int capacity, IEqualityComparer<TKey> comparer, Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

                    IEqualityComparer<TKey>
                    comparer

Specified comparer to use for the TKeys

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

If comparer is set to null, then the default IEqualityComparer for TKey is used.

Exceptions

                    Type
                    Condition

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                    ArgumentOutOfRangeException

Capacity must be >= 0

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_Create__1_System_Int32_System_Func___0__.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.Create%60%601(System.Int32%2CSystem.Func%7B%60%600%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

Create<TValueCollection>(Int32, Func<TValueCollection>)

Creates a new new instance of the MultiValueDictionary<TKey, TValue>
class that is empty, has the specified initial capacity, and uses the default
IEqualityComparer<T> for TKey. The
internal dictionary will use instances of the TValueCollection
class as its collection type.

Declaration

public static MultiValueDictionary<TKey, TValue> Create<TValueCollection>(int capacity, Func<TValueCollection> collectionFactory)where TValueCollection : ICollection<TValue>

Parameters

                    Type
                    Name
                    Description

                    Int32
                    capacity

Initial number of keys that the MultiValueDictionary<TKey, TValue> will allocate space for

                    Func<TValueCollection>
                    collectionFactory

A function to create a new ICollection<T> to use
in the internal dictionary store of this MultiValueDictionary<TKey, TValue>.

Returns

                    Type
                    Description

                    MultiValueDictionary<TKey, TValue>

A new MultiValueDictionary<TKey, TValue> with the specified
parameters.

Type Parameters

                    Name
                    Description

                    TValueCollection

The collection type that this MultiValueDictionary<TKey, TValue>
will contain in its internal dictionary.

Remarks

Note that TValueCollection must implement ICollection<T>
in addition to being constructable through new(). The collection returned from the constructor
must also not have IsReadOnly set to True by default.

Exceptions

                    Type
                    Condition

                    ArgumentOutOfRangeException

Capacity must be >= 0

                    InvalidOperationException

collectionFactory must create collections with
    IsReadOnly set to true by default.

                |
                Improve this Doc

                View Source

GetEnumerator()

Get an Enumerator over the TKey-IReadOnlyCollection<T>
pairs in this MultiValueDictionary<TKey, TValue>.

Declaration

public IEnumerator<KeyValuePair<TKey, IReadOnlyCollection<TValue>>> GetEnumerator()

Returns

                    Type
                    Description

                    IEnumerator<System.Collections.Generic.KeyValuePair<TKey, IReadOnlyCollection<TValue>>>

an Enumerator over the TKey-IReadOnlyCollection<T>
pairs in this MultiValueDictionary<TKey, TValue>.

Implements

IEnumerable<T>.GetEnumerator()

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Remove__0_" data-uid="System.Collections.Generic.MultiValueDictionary`2.Remove(`0)">Remove(TKey)

Removes every TValue associated with the given TKey
from the MultiValueDictionary<TKey, TValue>.

Declaration

public bool Remove(TKey key)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the elements to remove

Returns

                    Type
                    Description

                    Boolean

true if the removal was successful; otherwise false

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key is null.

                |
                Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_Remove__0__1_" data-uid="System.Collections.Generic.MultiValueDictionary`2.Remove(`0,`1)">Remove(TKey, TValue)

Removes the first instance (if any) of the given TKey-TValue
pair from this MultiValueDictionary<TKey, TValue>.

Declaration

public bool Remove(TKey key, TValue value)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the element to remove

                    TValue
                    value

The TValue of the element to remove

Returns

                    Type
                    Description

                    Boolean

true if the removal was successful; otherwise false

Remarks

If the TValue being removed is the last one associated with its TKey, then that
TKey will be removed from the MultiValueDictionary<TKey, TValue> and its
associated IReadOnlyCollection<T> will be freed as if a call to Remove(TKey)
had been made.

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key must be non-null

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_TryGetValue__0_System_Collections_Generic_IReadOnlyCollection__1___.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.TryGetValue(%600%2CSystem.Collections.Generic.IReadOnlyCollection%7B%601%7D%40)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

              <h4 id="System_Collections_Generic_MultiValueDictionary_2_TryGetValue__0_System_Collections_Generic_IReadOnlyCollection__1___" data-uid="System.Collections.Generic.MultiValueDictionary`2.TryGetValue(`0,System.Collections.Generic.IReadOnlyCollection{`1}@)">TryGetValue(TKey, out IReadOnlyCollection<TValue>)

Attempts to get the TValue associated with the given
TKey and place it into value.

Declaration

public bool TryGetValue(TKey key, out IReadOnlyCollection<TValue> value)

Parameters

                    Type
                    Name
                    Description

                    TKey
                    key

The TKey of the element to retrieve

                    IReadOnlyCollection<TValue>
                    value

When this method returns, contains the TValue associated with the specified
TKey if it is found; otherwise contains the default value of TValue.

Returns

                    Type
                    Description

                    Boolean

true if the MultiValueDictionary<TKey, TValue> contains an element with the specified
TKey; otherwise, false.

Implements

IReadOnlyDictionary<TKey, TValue>.TryGetValue(TKey, TValue)

Exceptions

                    Type
                    Condition

                    ArgumentNullException

key must be non-null

Explicit Interface Implementations

                |
                <a href="https://github.com/FubarDevelopment/WebDavServer/new/master/apiSpec/new?filename=System_Collections_Generic_MultiValueDictionary_2_System_Collections_IEnumerable_GetEnumerator.md&value=---%0Auid%3A%20System.Collections.Generic.MultiValueDictionary%602.System%23Collections%23IEnumerable%23GetEnumerator%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc

                View Source

IEnumerable.GetEnumerator()

Declaration

IEnumerator IEnumerable.GetEnumerator()

Returns

                    Type
                    Description

                    IEnumerator

Implements

IEnumerable.GetEnumerator()

                    Improve this Doc

                    View Source

              Back to top

            Copyright © 2016-2017 Fubar Development Junker
Generated by DocFX


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<servico xsi:schemaLocation="http://servicos.gov.br/v3/schema.../servico.xsd" xmlns="http://servicos.gov.br/v3/schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <id>obter-concessao-de-imovel-no-distrito-agropecuario-da-suframa-para-implantacao-de-projeto-tecnico-economico</id>
    <dbId>4032</dbId>
    <nome>Obter concessão de imóvel no Distrito Agropecuário da SUFRAMA  para implantação de Projeto técnico-econômico</nome>
    <sigla></sigla>
    <nomes-populares>
        <item id="3296">Concessão de Imóvel</item>
        <item id="3297">Aquisição de Lote</item>
        <item id="3298">Aquisição de terras</item>
    </nomes-populares>
    <descricao>O Termo de Reserva de Área é o documento emitido pela SUFRAMA, que concede imóvel de sua propriedade para implantação de projeto técnico-econômico apresentado pelo interessado e aprovado pelo Conselho de Administração da SUFRAMA. Admite-se projetos voltados a agropecuária, colonização, turismo ecológico, mineração e áreas institucionais para preservação e pesquisas.
- Os procedimentos atualmente são regidos pelas Diretrizes e Normas Técnicas para a Ocupação do Distrito Agropecuário da SUFRAMA, aprovadas pela Resolução CAS nº 070/1997, disponível no site da SUFRAMA para consulta. Tais diretrizes ancontram-se em fase de revisão.</descricao>
    <contato>Coordenação Geral de Análise e Acompanhamento de Projetos Agropecuários - CGPAG. Avenida Ministro Mário Andreazza, 1.424, Distrito Industrial, Manaus/AM. Telefones: 3321-7101 / 3321-7103 / 3321-7098. E-mail: cgpag@suframa.gov.br</contato>
    <gratuito>false</gratuito>
    <porcentagem-manual>false</porcentagem-manual>
    <servico-digital>false</servico-digital>
    <link-servico-digital></link-servico-digital>
    <solicitantes>
        <solicitante id="5465">
            <tipo>Pessoa Física e Pessoa Jurídica</tipo>
            <requisitos></requisitos>
        </solicitante>
    </solicitantes>
    <tempo-total-estimado>
        <ate max="180" unidade="dias-corridos"/>
        <descricao></descricao>
    </tempo-total-estimado>
    <validade-documento>
        <descricao></descricao>
    </validade-documento>
    <etapas>
        <etapa id="9743">
            <titulo>Requerer área ao Superintendente da SUFRAMA</titulo>
            <descricao>Para início de processo de obtenção de área para implantação de projeto agropecuário, o interessado deverá encaminhar requerimento dirigido ao Superintendente da SUFRAMA, indicando o tamanho da área pretendida, atividades a serem desenvolvidas e origem dos recursos materiais, humanos e financeiros destinados ao empreendimento, além da documentação do requerente que será submetida à análise.</descricao>
            <documentos>
                <default>
                    <item id="13947">**DOCUMENTOS COMUNS**
Requerimento de acordo com as Diretrizes e Normas Técnicas para a Ocupação do Distrito Agropecuário da SUFRAMA, aprovadas pela Resolução CAS nº 070/1997.</item>
                    <item id="13948">**DOCUMENTOS PARA PESSOA FÍSICA**
Cópias da Carteira de Identidade (RG); Cadastro de Pessoas Físicas (CPF), ou Carteira Nacional de Habilitação; Cópia de Declaração do Imposto de Renda da Pessoa Física e Recibo de Entrega; Curriculum Vitae e Comprovante de Residência.</item>
                    <item id="13949">**DOCUMENTOS PARA PESSOA JURÍDICA**
Contrato Social e a última alteração contratual; Cópias do CNPJ) e da IE, Municipal e JUCEA; Cópia da Declaração do IRPJ; Certidões Negativas Federal: INSS e FGTS, Estadual: ICMS e Municipal: ISS, e quanto a dívida ativa da união; Alteração nos Objetivos Sociais, caso não estejam contempladas atividades agropecuárias; Cópias da C. Identidade, CPF, Curriculum Vitae e Declaração de IRPF dos Sócios e/ou acionistas; Certidão de Cadastro Regular na SUFRAMA.</item>
                </default>
            </documentos>
            <custos>
                <default>
                    <custo id="927">
                        <descricao>Não há custo envolvido nesta etapa.</descricao>
                        <moeda>R$</moeda>
                        <valorVariavel></valorVariavel>
                        <statusCustoVariavel>1</statusCustoVariavel>
                    </custo>
                </default>
            </custos>
            <tempo-total-estimado>
                <nao-estimado-ainda/>
            </tempo-total-estimado>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="10767" tipo="presencial" tempo-estimado-periodo="minutos" tempo-estimado-espera="60">
                        <descricao>Protocolo Geral
- Apresentação de documentos impressos e digitais.
- Av. Ministro Mário Andreazza n.º 1.424, Distrito Industrial, CEP:69075-830, Manaus/AM. Sede da Superintendência da Zona Franca de Manaus – SUFRAMA.</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
        <etapa id="9744">
            <titulo>Escolha da área e assinatura do Termo de Reserva de Área</titulo>
            <descricao>Aprovado o requerimento inicial e existindo área livre, o interessado será convocado para proceder a escolha do lote, após o que será assinado o Termo de Reserva de Área. Podem ser solicitadas informações ou outros documentos complementares.</descricao>
            <documentos>
                <default>
                    <item id="13950">Documento de Identidade, número do protocolo.</item>
                </default>
            </documentos>
            <custos>
                <default>
                    <custo id="928">
                        <descricao>Não custo envolvido nesta etapa.</descricao>
                        <moeda>R$</moeda>
                        <valorVariavel></valorVariavel>
                        <statusCustoVariavel>1</statusCustoVariavel>
                    </custo>
                </default>
            </custos>
            <tempo-total-estimado>
                <ate max="90" unidade="dias-corridos"/>
            </tempo-total-estimado>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="10768" tipo="presencial" tempo-estimado-periodo="horas" tempo-estimado-espera="2">
                        <descricao>Coordenação Geral de Análise e Acompanhamento de Projetos Agropecuários - CGPAG. Avenida Ministro Mário Andreazza, 1.424, Distrito Industrial, Manaus/AM.</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
        <etapa id="9745">
            <titulo>Apresentação e aprovação do projeto técnico-econômico</titulo>
            <descricao>O interessado deve apresentar à SUFRAMA o projeto técnico-econômico de implantação do empreendimento. Podendo ser solicitado informações complementares, correções, etc. O projeto deve apresentar toda a documentação legal exigida, de acordo com a atividade eleita, que será submetido ao Conselho de Administração da SUFRAMA - CAS para aprovação e autorização de alienação do lote onde será implantado o empreendimento, conforme critérios definidos na normativa que rege a matéria.</descricao>
            <documentos>
                <default>
                    <item id="13951">Projeto técnico-econômico e Anotação de Responsabilidade Técnica (ART).

- **Informações sobre o custo:**
O valor do lote é variável, de acordo com aspectos do imóvel, calculado com base no Capítulo IV da normativa que rege a matéria, e pode ser parcelado.</item>
                </default>
            </documentos>
            <custos>
                <default>
                    <custo id="929">
                        <descricao>Pagamento do valor do lote.</descricao>
                        <moeda>R$</moeda>
                        <valorVariavel></valorVariavel>
                        <statusCustoVariavel>1</statusCustoVariavel>
                    </custo>
                </default>
            </custos>
            <tempo-total-estimado>
                <ate max="90" unidade="dias-corridos"/>
            </tempo-total-estimado>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="10769" tipo="presencial" tempo-estimado-periodo="horas" tempo-estimado-espera="1">
                        <descricao>Protocolo Geral
- Apresentação de documentos impressos e digitais.
- Av. Ministro Mário Andreazza n.º 1.424, Distrito Industrial, CEP:69075-830, Manaus/AM. Sede da Superintendência da Zona Franca de Manaus – SUFRAMA.</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
        <etapa id="9746">
            <titulo>Implantação do projeto técnico-econômico e alienação do imóvel</titulo>
            <descricao>A partir da aprovação do projeto técnico-econômico, é expedida Ordem de Serviço devendo o interessado iniciar a implantação do projeto. Durante a implantação do projeto, a SUFRAMA acompanhará todo o processo com visitas ao empreendimento. Mediante as condições descritas na normativa que rege a matéria, a SUFRAMA poderá outorgar Escritura de Compra e Venda ao interessado.</descricao>
            <documentos>
                <default/>
            </documentos>
            <custos>
                <default>
                    <custo id="930">
                        <descricao>Não há custo envolvido nesta etapa.</descricao>
                        <moeda>R$</moeda>
                        <valorVariavel></valorVariavel>
                        <statusCustoVariavel>1</statusCustoVariavel>
                    </custo>
                </default>
            </custos>
            <tempo-total-estimado>
                <ate max="90" unidade="dias-corridos"/>
            </tempo-total-estimado>
            <canais-de-prestacao>
                <default>
                    <canal-de-prestacao id="10770" tipo="presencial" tempo-estimado-periodo="horas" tempo-estimado-espera="2">
                        <descricao>Visitas técnicas ao empreendimento.</descricao>
                    </canal-de-prestacao>
                </default>
            </canais-de-prestacao>
        </etapa>
    </etapas>
    <orgao id="http://estruturaorganizacional.dados.gov.br/id/unidade-organizacional/166" dbId="55699">
        <nomeOrgao>Superintendência da Zona Franca de Manaus (SUFRAMA)</nomeOrgao>
    </orgao>
    <segmentos-da-sociedade>
        <item idSegmento="1" idServicoSegmento="9436">Cidadãos</item>
        <item idSegmento="3" idServicoSegmento="9437">Empresas</item>
    </segmentos-da-sociedade>
    <areas-de-interesse>
        <item>Agropecuária</item>
        <item>Agropecuária, extrativismo e pesca</item>
        <item>Indústria</item>
    </areas-de-interesse>
    <palavras-chave>
        <item id="18133">Projeto agropecuário</item>
        <item id="18134">Concessão de imóvel</item>
        <item id="18135">Requerimento de lote</item>
        <item id="18136">implantação de projeto</item>
    </palavras-chave>
    <legislacoes>
        <item id="3256">Diretrizes e Normas Técnicas para a Ocupação do Distrito Agropecuário da SUFRAMA. (Resolução CAS nº 070/1997).</item>
    </legislacoes>
    <condicoes-acessibilidade>Acesso para automóvel até a rampa de cadeirante, placas de identificação das unidades, ambiente limpo e arejado, recepcionistas que auxiliam nas informações.</condicoes-acessibilidade>
    <tratamento-prioritario>Os idosos a partir dos 60 anos, as grávidas, as lactentes, as pessoas com deficiência, os acompanhantes de criança de colo com idade igual ou inferior a 2 anos, os obesos.</tratamento-prioritario>
    <tratamento-dispensado-atendimento>Por ordem de chegada, com urbanidade, impessoalidade e eficiência.</tratamento-dispensado-atendimento>
</servico>

redpajama_set_name: RedPajamaGithub


text:
require 'sinatra/base'
require 'sinatra/cross_origin'

module Ginatra
  class API < Sinatra::Base
    register Sinatra::CrossOrigin

    configure do
      enable :cross_origin
    end

    options '*' do
      response.headers['Allow'] = 'HEAD,GET,PUT,POST,DELETE,OPTIONS'
      response.headers['Access-Control-Allow-Headers'] = 'X-Requested-With, X-HTTP-Method-Override, Content-Type, Cache-Control, Accept'
      200
    end

    before '/api/*' do
      content_type 'application/json'
      @filter = params.inject({}) { |prms, v|
        if [:from, :til, :in, :labels, :limit, :time_stamps].include? v[0].to_sym
          prms[v[0].to_sym] = v[1]
        end
        prms
      }
    end

    get '/api/init_data' do
      threads = []
      repo_list = nil
      commits = nil
      overview = nil

      # Get all relevant data to initialize react dashboard
      threads << Thread.new{ repo_list = get_repo_list(@filter) }
      threads << Thread.new{ commits = get_commits(@filter) }
      threads << Thread.new{ overview = get_overview(@filter) }
      threads.each { |thread| thread.join }

      { repoList: repo_list, commits: commits , overview: overview }.to_json
    end

    get '/api/repo_list' do
      get_repo_list(@filter).to_json
    end

    get '/api/commits' do
      get_commits(@filter).to_json
    end

    get '/api/overview' do
      get_overview(@filter).to_json
    end

    def get_repo_list(params = {})
      repo_ids = Ginatra::Helper.repo_ids_from_param_in(params[:in])
      repos = Ginatra::Config.repositories.select{ |key| repo_ids.include?(key) }
      repos.map { |key, value|
        {
          id: key,
          name: value['name'],
          color: value['color']
        }
      }
    end

    def get_commits(params = {})
      repo_ids = Ginatra::Helper.repo_ids_from_param_in(@filter[:in])
      commits = Ginatra::RedisCache.get_commits(repo_ids)
      if !params[:from].nil? || !params[:til].nil?
        params[:from] ||= Time.new(0).to_s
        params[:til] ||= Time.now.to_s
        from = Ginatra::Helper.epoch_time(params[:from])
        til = Ginatra::Helper.epoch_time(params[:til])
        commits.each do |commit|
          commits[commit[0]] = commit[1].select{ |commit_value|
            commit_value[:commit_timestamp] >= from && commit_value[:commit_timestamp] <= til
          }
        end
      end
      commits.map{ |repo_commit|
        { repoId: repo_commit[0], commits: repo_commit[1] }
      }
    end

    def get_overview(params = {})
      repo_ids = Ginatra::Helper.repo_ids_from_param_in(params[:in])
      Ginatra::RedisCache.get_overview(repo_ids).map{ |repo_data|
        { repoId: repo_data[0], overview: repo_data[1] }
      }
    end
  end
end


text:
#ifndef SIMTA_DNS_H
#define SIMTA_DNS_H

#include <denser.h>
#include <netinet/in.h>
#include <stdbool.h>
#include <yasl.h>

#define S_MISMATCH "Mismatch"
#define S_ACCEPT "Accept"
#define S_BLOCK "Block"
#define S_LOG_ONLY "Log_Only"
#define S_TRUST "Trust"

#define REVERSE_MATCH 0
#define REVERSE_ERROR 1
#define REVERSE_UNKNOWN 2
#define REVERSE_MISMATCH 3
#define REVERSE_UNRESOLVED 4

bool                simta_dnsr_init(void);
struct dnsr_result *get_a(const char *);
struct dnsr_result *get_aaaa(const char *);
struct dnsr_result *get_mx(const char *);
struct dnsr_result *get_ptr(const struct sockaddr *);
struct dnsr_result *get_txt(const char *);
yastr               simta_dnsr_str(const struct dnsr_string *);
int                 check_reverse(char *, const struct sockaddr *);
int                 check_hostname(const char *);
bool                dnsr_result_is_cname(struct dnsr_result *);

#endif /* SIMTA_DNS_H */
/* vim: set softtabstop=4 shiftwidth=4 expandtab :*/


text:
package org.inferred.freebuilder.processor.property;

import static org.inferred.freebuilder.processor.source.feature.GuavaLibrary.GUAVA;
import static org.junit.Assume.assumeTrue;

import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;

import org.inferred.freebuilder.FreeBuilder;
import org.inferred.freebuilder.processor.FeatureSets;
import org.inferred.freebuilder.processor.NamingConvention;
import org.inferred.freebuilder.processor.Processor;
import org.inferred.freebuilder.processor.source.SourceBuilder;
import org.inferred.freebuilder.processor.source.feature.FeatureSet;
import org.inferred.freebuilder.processor.source.testing.BehaviorTester;
import org.inferred.freebuilder.processor.source.testing.ParameterizedBehaviorTestFactory;
import org.inferred.freebuilder.processor.source.testing.ParameterizedBehaviorTestFactory.Shared;
import org.inferred.freebuilder.processor.source.testing.TestBuilder;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.junit.runners.Parameterized.UseParametersRunnerFactory;

import java.util.Arrays;
import java.util.List;
import java.util.function.UnaryOperator;

@RunWith(Parameterized.class)
@UseParametersRunnerFactory(ParameterizedBehaviorTestFactory.class)
public class DefaultedMapperMethodTest {

  @SuppressWarnings("unchecked")
  @Parameters(name = "{0}, checked={1}, {2}, {3}")
  public static Iterable<Object[]> parameters() {
    List<ElementFactory> types = ElementFactory.TYPES_WITH_EXTRA_PRIMITIVES;
    List<Boolean> checked = ImmutableList.of(false, true);
    List<NamingConvention> conventions = Arrays.asList(NamingConvention.values());
    List<FeatureSet> features = FeatureSets.ALL;
    return () -> Lists
        .cartesianProduct(types, checked, conventions, features)
        .stream()
        .map(List::toArray)
        .iterator();
  }

  @Rule public final ExpectedException thrown = ExpectedException.none();
  @Shared public BehaviorTester behaviorTester;

  private final ElementFactory property;
  private final boolean checked;
  private final NamingConvention convention;
  private final FeatureSet features;
  private final SourceBuilder dataType;

  public DefaultedMapperMethodTest(
      ElementFactory property,
      boolean checked,
      NamingConvention convention,
      FeatureSet features) {
    this.property = property;
    this.checked = checked;
    this.convention = convention;
    this.features = features;

    dataType = SourceBuilder.forTesting()
        .addLine("package com.example;")
        .addLine("@%s", FreeBuilder.class)
        .addLine("public interface DataType {")
        .addLine("  %s %s;", property.unwrappedType(), convention.get("property"))
        .addLine("")
        .addLine("  public static class Builder extends DataType_Builder {")
        .addLine("    public Builder() {")
        .addLine("      %s(%s);", convention.set("property"), property.example(0))
        .addLine("    }");
    if (checked) {
      dataType
          .addLine("")
          .addLine("    @Override public Builder %s(%s property) {",
              convention.set("property"), property.unwrappedType())
          .addLine("      if (!(%s)) {", property.validation("property"))
          .addLine("        throw new IllegalArgumentException(\"%s\");",
              property.errorMessage("property"))
          .addLine("      }")
          .addLine("      return super.%s(property);", convention.set("property"))
          .addLine("    }");
    }
    dataType
        .addLine("  }")
        .addLine("}");
  }

  @Test
  public void mapReplacesValueToBeReturnedFromGetter() {
    behaviorTester
        .with(new Processor(features))
        .with(dataType)
        .with(testBuilder()
            .addLine("DataType value = new DataType.Builder()")
            .addLine("    .mapProperty(a -> (%s) (a + %s))",
                property.unwrappedType(), property.example(1))
            .addLine("    .build();")
            .addLine("assertEquals((%s) (%s + %s), value.%s);",
                property.unwrappedType(),
                property.example(0),
                property.example(1),
                convention.get("property"))
            .build())
        .runTest();
  }

  @Test
  public void mapThrowsNpeIfMapperIsNull() {
    thrown.expect(NullPointerException.class);
    behaviorTester
        .with(new Processor(features))
        .with(dataType)
        .with(testBuilder().addLine("new DataType.Builder().mapProperty(null);").build())
        .runTest();
  }

  @Test
  public void mapThrowsNpeIfMapperReturnsNull() {
    thrown.expect(NullPointerException.class);
    behaviorTester
        .with(new Processor(features))
        .with(dataType)
        .with(testBuilder()
            .addLine("new DataType.Builder().mapProperty(a -> (%s) null);", property.type())
            .build())
        .runTest();
  }

  @Test
  public void mapDelegatesToSetterForValidation() {
    if (checked) {
      thrown.expect(IllegalArgumentException.class);
      thrown.expectMessage(property.errorMessage("property"));
    }
    behaviorTester
        .with(new Processor(features))
        .with(dataType)
        .with(testBuilder()
            .addLine("new DataType.Builder().mapProperty(a -> %s);", property.invalidExample())
            .build())
        .runTest();
  }

  @Test
  public void mapCanAcceptPrimitiveFunctionalInterface() {
    SourceBuilder customMapperType = SourceBuilder.forTesting();
    for (String line : dataType.toString().split("\n")) {
      customMapperType.addLine("%s", line);
      if (line.contains("extends DataType_Builder")) {
        customMapperType
            .addLine("    @Override public Builder mapProperty(%s mapper) {",
                property.unboxedUnaryOperator())
            .addLine("      return super.mapProperty(mapper);")
            .addLine("    }");
      }
    }
    behaviorTester
        .with(new Processor(features))
        .with(customMapperType)
        .with(testBuilder()
            .addLine("DataType value = new DataType.Builder()")
            .addLine("    .mapProperty(a -> (%s) (a + %s))",
                property.unwrappedType(), property.example(1))
            .addLine("    .build();")
            .addLine("assertEquals((%s) (%s + %s), value.%s);",
                property.unwrappedType(),
                property.example(0),
                property.example(1),
                convention.get("property"))
            .build())
        .runTest();
  }

  @Test
  public void mapCanAcceptGenericFunctionalInterface() {
    SourceBuilder customMapperType = SourceBuilder.forTesting();
    for (String line : dataType.toString().split("\n")) {
      customMapperType.addLine("%s", line);
      if (line.contains("extends DataType_Builder")) {
        customMapperType
            .addLine("    @Override public Builder mapProperty(%s<%s> mapper) {",
                UnaryOperator.class, property.type())
            .addLine("      return super.mapProperty(mapper);")
            .addLine("    }");
      }
    }
    behaviorTester
        .with(new Processor(features))
        .with(customMapperType)
        .with(testBuilder()
            .addLine("DataType value = new DataType.Builder()")
            .addLine("    .mapProperty(a -> (%s) (a + %s))",
                property.unwrappedType(), property.example(1))
            .addLine("    .build();")
            .addLine("assertEquals((%s) (%s + %s), value.%s);",
                property.unwrappedType(),
                property.example(0),
                property.example(1),
                convention.get("property"))
            .build())
        .runTest();
  }

  @Test
  public void mapCanAcceptOtherFunctionalInterface() {
    assumeGuavaAvailable();
    SourceBuilder customMapperType = SourceBuilder.forTesting();
    for (String line : dataType.toString().split("\n")) {
      customMapperType.addLine("%s", line);
      if (line.contains("extends DataType_Builder")) {
        customMapperType
            .addLine("    @Override public Builder mapProperty(%1$s<%2$s, %2$s> mapper) {",
                com.google.common.base.Function.class, property.type())
            .addLine("      return super.mapProperty(mapper);")
            .addLine("    }");
      }
    }
    behaviorTester
        .with(new Processor(features))
        .with(customMapperType)
        .with(testBuilder()
            .addLine("DataType value = new DataType.Builder()")
            .addLine("    .mapProperty(a -> (%s) (a + %s))",
                property.unwrappedType(), property.example(1))
            .addLine("    .build();")
            .addLine("assertEquals((%s) (%s + %s), value.%s);",
                property.unwrappedType(),
                property.example(0),
                property.example(1),
                convention.get("property"))
            .build())
        .runTest();
  }

  private void assumeGuavaAvailable() {
    assumeTrue("Guava available", features.get(GUAVA).isAvailable());
  }

  private static TestBuilder testBuilder() {
    return new TestBuilder()
        .addImport("com.example.DataType");
  }
}


text:
'use strict';

// Shoppings controller
angular.module('shoppings').controller('ShoppingsController', ['$scope', '$stateParams', '$location', '$window', 'Authentication', 'Shoppings',
	function($scope, $stateParams, $location, $window, Authentication, Shoppings) {
		$scope.authentication = Authentication;

		$scope.infor = 'Your taxi has arrived';
		$scope.doPopup = function(infor){
			$window.alert(infor);
		};
		// Create new Shopping
		$scope.create = function() {
			// Create new Shopping object
			var shopping = new Shoppings ({
				name: this.name,
				description: this.description,
				image: this.image,
				price: this.price
			});

			// Redirect after save
			shopping.$save(function(response) {
				$location.path('shoppings/' + response._id);

				// Clear form fields
				$scope.name = '';
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Remove existing Shopping
		$scope.remove = function(shopping) {
			if ( shopping ) {
				shopping.$remove();

				for (var i in $scope.shoppings) {
					if ($scope.shoppings [i] === shopping) {
						$scope.shoppings.splice(i, 1);
					}
				}
			} else {
				$scope.shopping.$remove(function() {
					$location.path('shoppings');
				});
			}
		};

		// Update existing Shopping
		$scope.update = function() {
			var shopping = $scope.shopping;

			shopping.$update(function() {
				$location.path('shoppings/' + shopping._id);
			}, function(errorResponse) {
				$scope.error = errorResponse.data.message;
			});
		};

		// Find a list of Shoppings
		$scope.find = function() {
			$scope.shoppings = Shoppings.query();
		};

		// Find existing Shopping
		$scope.findOne = function() {
			$scope.shopping = Shoppings.get({
				shoppingId: $stateParams.shoppingId
			});
		};
	}
]);


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal">

    <TextView
        android:id="@+id/time_tv"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:fontFamily="sans-serif-medium"
        android:textSize="15sp" />

    <ImageView
        android:id="@+id/door_state_iv"
        android:layout_width="30dp"
        android:layout_height="30dp"
        android:layout_marginLeft="7dp"
        android:layout_marginRight="7dp" />
</LinearLayout>


text:
package com.springsource.oauthservice.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.ComponentScan.Filter;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages="com.springsource.oauthservice", excludeFilters={ @Filter(Configuration.class)} )
public class ComponentConfig {

}


text:
#ifndef O3D_CORE_CROSS_TRANSFORMATION_CONTEXT_H_
#define O3D_CORE_CROSS_TRANSFORMATION_CONTEXT_H_

#include "core/cross/service_implementation.h"
#include "core/cross/math_types.h"

namespace o3d {

// Holds the current transformation state, including the world, view and
// projection matrices. TODO: it would be nice if this wasn't global state.
class TransformationContext {
 public:
  static const InterfaceId kInterfaceId;

  explicit TransformationContext(ServiceLocator* service_locator)
      : service_(service_locator, this) {}

  // Retrieves the current world matrix.
  const Matrix4& world() const {
    return world_;
  }

  // Retrieves the current view matrix.
  const Matrix4& view() const {
    return view_;
  }

  // Retrieves the current projection matrix.
  const Matrix4& projection() const {
    return projection_;
  }

  // Retrieves the current view_projection matrix.
  const Matrix4& view_projection() const {
    return view_projection_;
  }

  // Retrieves the current world_view_projection matrix.
  const Matrix4& world_view_projection() const {
    return world_view_projection_;
  }

  // Sets the current world matrix.
  void set_world(const Matrix4& world) {
    world_ = world;
  }

  // Sets the current view matrix.
  void set_view(const Matrix4& view) {
    view_ = view;
  }

  // Sets the current projection matrix.
  void set_projection(const Matrix4& projection) {
    projection_ = projection;
  }

  // Sets the current view projection matrix.
  void set_view_projection(const Matrix4& view_projection) {
    view_projection_ = view_projection;
  }

  // Sets the current world view projection matrix.
  void set_world_view_projection(const Matrix4& world_view_projection) {
    world_view_projection_ = world_view_projection;
  }

 private:
  ServiceImplementation<TransformationContext> service_;

  // The following five matrices represent the transformation hierarchy during
  // drawing of the scene.  These are set in the draw code prior to rendering,
  // so that StandardParamMatrix4s evaluate correctly.

  // The current world matrix.
  Matrix4 world_;
  // The current view matrix.
  Matrix4 view_;
  // The current projection matrix.
  Matrix4 projection_;
  // The current view_projection matrix.
  Matrix4 view_projection_;
  // The current world_view_projection matrix.
  Matrix4 world_view_projection_;
};
}  // namespace o3d

#endif  // O3D_CORE_CROSS_TRANSFORMATION_CONTEXT_H_


text:
package org.apache.nifi.web.api.dto;

import com.wordnik.swagger.annotations.ApiModelProperty;

import javax.xml.bind.annotation.XmlType;
import java.util.List;
import java.util.Objects;
import java.util.Set;

/**
 * Class used for providing documentation of a specified type.
 */
@XmlType(name = "documentedType")
public class DocumentedTypeDTO {

    private String type;
    private BundleDTO bundle;
    private List<ControllerServiceApiDTO> controllerServiceApis;
    private String description;
    private String usageRestriction;
    private String deprecationReason;
    private Set<String> tags;

    /**
     * @return An optional description of the corresponding type
     */
    @ApiModelProperty(
            value = "The description of the type."
    )
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return An optional description of why the usage of this component is restricted
     */
    @ApiModelProperty(
            value = "The description of why the usage of this component is restricted."
    )
    public String getUsageRestriction() {
        return usageRestriction;
    }

    public void setUsageRestriction(String usageRestriction) {
        this.usageRestriction = usageRestriction;
    }

    /**
     * @return An optional description of why the usage of this component is deprecated
     */
    @ApiModelProperty(
            value = "The description of why the usage of this component is restricted."
    )
    public String getDeprecationReason() {
        return deprecationReason;
    }

    public void setDeprecationReason(String deprecationReason) {
        this.deprecationReason = deprecationReason;
    }

    /**
     * @return The type is the fully-qualified name of a Java class
     */
    @ApiModelProperty(
            value = "The fully qualified name of the type."
    )
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    /**
     * The details of the artifact that bundled this type.
     *
     * @return The bundle details
     */
    @ApiModelProperty(
            value = "The details of the artifact that bundled this type."
    )
    public BundleDTO getBundle() {
        return bundle;
    }

    public void setBundle(BundleDTO bundle) {
        this.bundle = bundle;
    }

    /**
     * If this type represents a ControllerService, this lists the APIs it implements.
     *
     * @return The listing of implemented APIs
     */
    @ApiModelProperty(
            value = "If this type represents a ControllerService, this lists the APIs it implements."
    )
    public List<ControllerServiceApiDTO> getControllerServiceApis() {
        return controllerServiceApis;
    }

    public void setControllerServiceApis(List<ControllerServiceApiDTO> controllerServiceApis) {
        this.controllerServiceApis = controllerServiceApis;
    }

    /**
     * @return The tags associated with this type
     */
    @ApiModelProperty(
            value = "The tags associated with this type."
    )
    public Set<String> getTags() {
        return tags;
    }

    public void setTags(final Set<String> tags) {
        this.tags = tags;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }

        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        final DocumentedTypeDTO that = (DocumentedTypeDTO) o;
        return Objects.equals(type, that.type) && Objects.equals(bundle, that.bundle);
    }

    @Override
    public int hashCode() {
        return Objects.hash(type, bundle);
    }
}


text:
require "superconfig"
require "dotenv"

env = ENV["RACK_ENV"] || ENV["RAILS_ENV"] || "development"
Dotenv.load ".env.local.#{env}", ".env.local", ".env.#{env}", ".env"


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;

namespace TpSupinfo
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("==============================================================================");
            Console.WriteLine("==============================================================================");
            Console.WriteLine("===   ||         ||               00       ||       ||    ============     ===");
            Console.WriteLine("===   ||  //     ||             00  00     ||       ||         ||          ===");
            Console.WriteLine("===   || //      ||           00      00   ||       ||         ||          ===");
            Console.WriteLine("===   ||//       ||           00      00   ||       ||         ||          ===");
            Console.WriteLine("===   || \\      ||           00      00   ||       ||         ||          ===");
            Console.WriteLine("===   ||  \\     ||_______      00  00     ||       ||         ||          ===");
            Console.WriteLine("===   ||   \\    |________        00       ==========          ||          ===");
            Console.WriteLine("==============================================================================");
            Console.WriteLine("==============================================================================");
            Console.WriteLine("\n\n\n");
            Console.WriteLine("Veuillez appuyer sur une touche pour continuer");
            Console.ReadLine();
            Console.Clear();

            Console.WriteLine("Veuillez saisir votre nom de compte twitter pour que Klout puisse récuperer votre score :");
            string saisie = Console.ReadLine();
            Console.WriteLine("L'application tente de récupérer les informations de " +saisie);

            KloutConnection Connection = new KloutConnection();
            Connection.BeginGetUserInfo(saisie);

            Console.ReadLine();

        }
    }
}


text:
/* The variable-value class is applied to the input object of CalcValue,
CalcValueAndUnit, and CalcVarString */
input.variable-value {
  border-style: solid;
  border-radius: 2px;

  /* Add a small amount of padding before the first number in the input
  text box (otherwise the number collides with the side of the input border). */
  padding-left: 5px;

  width: 150px;
  height: 30px;
}

select.calc-select {
  height: 25px;
}

.ok {
  border-color: rgb(38, 148, 30);
}

.warning {
  border-color: rgb(211, 118, 35);
}

.error {
  border-color: rgb(255, 70, 82);
}

/* Sets the background color of input and textarea elements */
.ok.dirIn {
  background-color: rgb(190, 255, 189);
}

.warning.dirIn {
  background-color: rgb(255, 221, 144);
}

.error.dirIn {
  background-color: rgb(255, 195, 198);
}

input.dirIn {
  border-width: 3px;
}

input.dirOut {
  border-width: 1px;
}

.variable-value[disabled="disabled"] {
  /*color: black;*/
  font-weight: bold;
}

/*.input.ok {*/
  /*border-color: rgb(38, 148, 30);*/
/*}*/

/*.input.warning {*/
  /*border-color: rgb(211, 118, 35);*/
/*}*/

/*.input.error {*/
  /*border-color: rgb(255, 70, 82);*/
/*}*/


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zergatul.Network.Asn1;

namespace Zergatul.Cryptography.Certificate.Extensions
{
    /// <summary>
    /// https://tools.ietf.org/html/rfc6962#section-3.3
    /// </summary>
    public class SignedCertificateTimestampList : X509Extension
    {
        public byte[] SerializedSCT { get; private set; }

        protected override void Parse(byte[] data)
        {
            var element = Asn1Element.ReadFrom(data);

            var os = element as OctetString;
            CertificateParseException.ThrowIfNull(os);

            SerializedSCT = os.Data;
        }
    }
}


text:
import json
#sbaas
from .stage01_rnasequencing_analysis_query import stage01_rnasequencing_analysis_query
from SBaaS_base.sbaas_template_io import sbaas_template_io

# Resources
from io_utilities.base_importData import base_importData
from io_utilities.base_exportData import base_exportData

class stage01_rnasequencing_analysis_io(stage01_rnasequencing_analysis_query,sbaas_template_io):

    def import_dataStage01RNASequencingAnalysis_add(self, filename):
        '''table adds'''
        data = base_importData();
        data.read_csv(filename);
        data.format_data();
        self.add_dataStage01RNASequencingAnalysis(data.data);
        data.clear_data();

    def import_dataStage01RNASequencingAnalysis_update(self, filename):
        '''table adds'''
        data = base_importData();
        data.read_csv(filename);
        data.format_data();
        self.update_dataStage01RNASequencingAnalysis(data.data);
        data.clear_data();