PeanutButter
Loading...
Searching...
No Matches
PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap Class Referenceabstract

Provides a string-to-stringvalue map. More...

Inheritance diagram for PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap:
PeanutButter.TestUtils.AspNetCore.Fakes.ICanBeIndexedBy< in T > PeanutButter.TestUtils.AspNetCore.Fakes.FakeFormCollection PeanutButter.TestUtils.AspNetCore.Fakes.FakeHeaderDictionary PeanutButter.TestUtils.AspNetCore.Fakes.FakeQueryCollection

Public Member Functions

delegate void ChangedDelegate (object sender, StringValueMapChangedEventArgs args)
 delegate raised when this collection changes
 StringValueMap (IDictionary< string, StringValues > store)
 Create a string-value map around the provided store.
 StringValueMap ()
 Create a blank string-value map.
 StringValueMap (IEqualityComparer< string > equalityComparer)
 Create a blank string-value map with the provided equality comparer for keys.
IEnumerator< KeyValuePair< string, StringValues > > GetEnumerator ()
 Get an enumerator for the items in the store.
bool ContainsKey (string key)
 Returns true if the key is contained in the store.
bool TryGetValue (string key, out StringValues value)
 Attempts to get the value associated with the provided key.
void Add (KeyValuePair< string, StringValues > item)
 Adds a key-value-pair to the store.
void Clear ()
 Clears the store.
bool Contains (KeyValuePair< string, StringValues > item)
 Tests if the key-value-pair is in the store.
void CopyTo (KeyValuePair< string, StringValues >[] array, int arrayIndex)
 Copies the contents to the provided array.
bool Remove (KeyValuePair< string, StringValues > item)
 Removes an item from the store.
void Add (string key, StringValues value)
 Adds an item to the store.
bool Remove (string key)
 Removes the item associated with the provided key.

Public Attributes

ChangedDelegate OnChanged
 Event raised when this collection changes.

Properties

IDictionary< string, StringValues > Store [get, set]
 The store for the values.
ICollection< StringValues > Values [get]
 Returns all known values.
bool IsReadOnly [get]
 Returns read-only status of the store.
int Count [get]
 Returns the count of the store.
ICollection< string > Keys [get]
 Returns all keys in the store.
StringValues this[string key] [get, set]
 Indexes into the store.
Properties inherited from PeanutButter.TestUtils.AspNetCore.Fakes.ICanBeIndexedBy< in T >
StringValues this[T key] [get, set]
 Indexes into the store.

Detailed Description

Provides a string-to-stringvalue map.

Constructor & Destructor Documentation

◆ StringValueMap() [1/2]

PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.StringValueMap ( IDictionary< string, StringValues > store)

Create a string-value map around the provided store.

Parameters
store

◆ StringValueMap() [2/2]

PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.StringValueMap ( IEqualityComparer< string > equalityComparer)

Create a blank string-value map with the provided equality comparer for keys.

Parameters
equalityComparer

Member Function Documentation

◆ Add() [1/2]

void PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.Add ( KeyValuePair< string, StringValues > item)

Adds a key-value-pair to the store.

Parameters
item

◆ Add() [2/2]

void PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.Add ( string key,
StringValues value )

Adds an item to the store.

Parameters
key
value

◆ Contains()

bool PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.Contains ( KeyValuePair< string, StringValues > item)

Tests if the key-value-pair is in the store.

Parameters
item
Returns

◆ ContainsKey()

bool PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.ContainsKey ( string key)

Returns true if the key is contained in the store.

Parameters
key
Returns

◆ CopyTo()

void PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.CopyTo ( KeyValuePair< string, StringValues >[] array,
int arrayIndex )

Copies the contents to the provided array.

Parameters
array
arrayIndex

◆ GetEnumerator()

IEnumerator< KeyValuePair< string, StringValues > > PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.GetEnumerator ( )

Get an enumerator for the items in the store.

Returns

◆ Remove() [1/2]

bool PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.Remove ( KeyValuePair< string, StringValues > item)

Removes an item from the store.

Parameters
item
Returns

◆ Remove() [2/2]

bool PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.Remove ( string key)

Removes the item associated with the provided key.

Parameters
key
Returns

◆ TryGetValue()

bool PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.TryGetValue ( string key,
out StringValues value )

Attempts to get the value associated with the provided key.

Parameters
key
value
Returns

Property Documentation

◆ this[string key]

StringValues PeanutButter.TestUtils.AspNetCore.Fakes.StringValueMap.this[string key]
getset

Indexes into the store.

Parameters
key

The documentation for this class was generated from the following file:
  • source/TestUtils/PeanutButter.TestUtils.AspNetCore/Fakes/StringValueMap.cs