Inheritance
System.Object
Namespace:System.Dynamic.ExpandoObject
Assembly:umbraco.dll
public static class FormDataCollectionExtensions
Methods
Returns the value of a mandatory item in the FormCollection
Declaration
public static string GetRequiredString(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
System.Net.Http.Formatting.FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type |
Description |
System.String |
|
Returns the object based in the collection based on it's key. This does this with a conversion so if it doesn't convert a null object is returned.
Declaration
public static T GetValue<T>(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
System.Net.Http.Formatting.FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type Parameters
Checks if the collection contains the key
Declaration
public static bool HasKey(this FormDataCollection items, string key)
Parameters
Type |
Name |
Description |
System.Net.Http.Formatting.FormDataCollection |
items |
|
System.String |
key |
|
Returns
Type |
Description |
System.Boolean |
|
Converts the FormCollection to a dictionary
Declaration
public static IDictionary<string, object> ToDictionary(this FormDataCollection items)
Parameters
Type |
Name |
Description |
System.Net.Http.Formatting.FormDataCollection |
items |
|
Returns
Type |
Description |
System.Collections.Generic.IDictionary<System.String, System.Object> |
|
Declaration
public static string ToQueryString(this FormDataCollection items, params string[] keysToIgnore)
Parameters
Type |
Name |
Description |
System.Net.Http.Formatting.FormDataCollection |
items |
|
System.String[] |
keysToIgnore |
|
Returns
Type |
Description |
System.String |
|