November Happy Hour will be moved to Thursday December 5th.

Class QueryParameterResolver

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Resolves a query parameter value from a System.Web.HttpContextBase.Request.

Inheritance
System.Object
QueryParameterResolver
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Web.Internal
Assembly: EPiServer.dll
Version: 10.10.4
Syntax
[ServiceConfiguration]
[ServiceConfiguration(typeof(IQueryParameterResolver), IncludeServiceAccessor = false)]
public class QueryParameterResolver : IQueryParameterResolver
Remarks

Purpose of class it to make it easier to write tests for dependents.

Constructors

QueryParameterResolver()

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the QueryParameterResolver class.

Declaration
public QueryParameterResolver()

QueryParameterResolver(ServiceAccessor<HttpRequestBase>)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the QueryParameterResolver class.

Declaration
public QueryParameterResolver(ServiceAccessor<HttpRequestBase> httpRequest)
Parameters
Type Name Description
ServiceAccessor<System.Web.HttpRequestBase> httpRequest

The HTTP request used to get query parameters from.

QueryParameterResolver(NameValueCollection)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Initializes a new instance of the QueryParameterResolver class.

Declaration
public QueryParameterResolver(NameValueCollection parameters)
Parameters
Type Name Description
System.Collections.Specialized.NameValueCollection parameters

The parameters to resolve values from.

Methods

GetParameterValue(String)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Gets the value for the query parameter named queryKey from the current request.

Declaration
public virtual string GetParameterValue(string queryKey)
Parameters
Type Name Description
System.String queryKey

The name of the query parameter.

Returns
Type Description
System.String

The value of the query parameter or null if parameter is not present.

TryGet(String, out IEnumerable<Int32>)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Attempts to extract the value from a given query parameter to a list of integers.

Declaration
public bool TryGet(string queryKey, out IEnumerable<int> result)
Parameters
Type Name Description
System.String queryKey

The query key.

System.Collections.Generic.IEnumerable<System.Int32> result

The parsed result.

Returns
Type Description
System.Boolean

true if the request instance exist and the request query contains the key and it can be parsed to a list of integers; otherwise false.

TryGet(String, out Int32)

Unsupported INTERNAL API! Not covered by semantic versioning; might change without notice. Attempts to extract the value from a given query parameter to an integer.

Declaration
public bool TryGet(string queryKey, out int result)
Parameters
Type Name Description
System.String queryKey

The query key.

System.Int32 result

The parsed result.

Returns
Type Description
System.Boolean

true if the request instance exist and the request query contains the key and it can be parsed to an integer; otherwise false.

Implements

Extension Methods