Class FormUtility
This utility class is designed to make HTTP request form-data operations easier to work with.
Inheritance
Namespace: Cuemon.Web
Assembly: Cuemon.Web.dll
Syntax
public static class FormUtility
Methods
| Improve this DocCombine(NameValueCollection[])
Combines the specified form-data values
into one System.Collections.Specialized.NameValueCollection equivalent.
Declaration
public static NameValueCollection Combine(params NameValueCollection[] values)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NameValueCollection[] | values | A variable number of form-data |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A System.Collections.Specialized.NameValueCollection equivalent to the combined form-data |
Combine(String[])
Combines the specified form-data values
into one System.Collections.Specialized.NameValueCollection equivalent.
Declaration
public static NameValueCollection Combine(params string[] values)
Parameters
Type | Name | Description |
---|---|---|
System.String[] | values | A variable number of form-data |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A System.Collections.Specialized.NameValueCollection equivalent to the combined form-data |
Remove(NameValueCollection, String[])
Sanitizes the form
so that all keys (with matching values) is removed.
Declaration
public static NameValueCollection Remove(NameValueCollection form, params string[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NameValueCollection | form | The form-data values to sanitize. |
System.String[] | keys | The keys to use in the sanitation process. |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A sanitized System.Collections.Specialized.NameValueCollection form-data equivalent of |
Remove(String, String[])
Sanitizes the form
so that all keys (with matching values) is removed.
Declaration
public static NameValueCollection Remove(string form, params string[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.String | form | The form-data values to sanitize. |
System.String[] | keys | The keys to use in the sanitation process. |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A sanitized System.Collections.Specialized.NameValueCollection form-data equivalent of |
RemoveDublets(NameValueCollection, String[])
Sanitizes the form
so that all keys is assured only the latest value applied.
Declaration
public static NameValueCollection RemoveDublets(NameValueCollection form, params string[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NameValueCollection | form | The form-data values to sanitize. |
System.String[] | keys | The keys to use in the sanitation process. |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A sanitized System.Collections.Specialized.NameValueCollection form-data equivalent of |
RemoveDublets(String, String[])
Sanitizes the form
so that all keys is assured only the latest value applied.
Declaration
public static NameValueCollection RemoveDublets(string form, params string[] keys)
Parameters
Type | Name | Description |
---|---|---|
System.String | form | The form-data values to sanitize. |
System.String[] | keys | The keys to use in the sanitation process. |
Returns
Type | Description |
---|---|
System.Collections.Specialized.NameValueCollection | A sanitized System.Collections.Specialized.NameValueCollection form-data equivalent of |