Show / Hide Table of Contents

Class ParameterRetriever

Defines a type that can retrieve a request parameter given a request context

Inheritance
Object
ParameterRetriever
HeaderRetriever
QueryParameterRetriever
RouteValueRetriever
Namespace: Seltzr.ParameterRetrievers
Assembly: Seltzr.dll
Syntax
C#
public abstract class ParameterRetriever

Constructors

| Improve this Doc View Source

ParameterRetriever(String, String)

Initializes a new instance of the ParameterRetriever class.

C#
protected ParameterRetriever(string name, string defaultValue = null)
Parameters
nameString

The name of the parameter to retrieve

defaultValueString

The default value of the parameter if none is specified

Properties

| Improve this Doc View Source

DefaultValue

Gets the default value of the parameter if none is specified

C#
protected string DefaultValue { get; }
Property Value
String
| Improve this Doc View Source

ParameterName

Gets the name of the parameter to retrieve

C#
protected string ParameterName { get; }
Property Value
String

Methods

| Improve this Doc View Source

GetValue(HttpRequest)

Gets the value of a parameter for the given request

C#
public abstract string GetValue(HttpRequest request)
Parameters
requestHttpRequest

The HTTP request context

Returns

String

The retrieved parameter value

  • Improve this Doc
  • View Source
Back to top Generated by DocFX