Improve this Doc View Source

Class MiscExtensions

Misc extensions

Inheritance
System.Object
MiscExtensions
Namespace:Dapplo.HttpExtensions
Assembly:Dapplo.HttpExtensions.dll
Syntax
public class MiscExtensions

Methods

| Improve this Doc View Source

ForEach<T>(IEnumerable<T>, Action<T>)

As the BCL doesn't include a ForEach on the IEnumerable, this extension was added

Declaration
public static void ForEach<T>(IEnumerable<T> source, Action<T> action)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T> source

The IEnumerable

System.Action<T> action

Action to call for each item

| Improve this Doc View Source

ToQueryString<T>(IEnumerable<KeyValuePair<String, T>>)

Create a query string from a list of keyValuePairs

Declaration
public static string ToQueryString<T>(IEnumerable<KeyValuePair<string, T>> keyValuePairs)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, T>> keyValuePairs

list of keyValuePair with string,T

Returns
Type Description
System.String

name1=value1&name2=value2 etc...