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

Class RestControllerActionInvoker

A class for invoking action methods on controllers inheriting from RestControllerBase

Inheritance
System.Object
RestControllerActionInvoker
Namespace: EPiServer.Shell.Services.Rest
Assembly: EPiServer.Shell.dll
Version: 9.12.2
Syntax
public class RestControllerActionInvoker : AsyncControllerActionInvoker

Constructors

RestControllerActionInvoker()

Initializes a new instance of the RestControllerActionInvoker class.

Declaration
public RestControllerActionInvoker()

RestControllerActionInvoker(IEnumerable<IRestControllerValueProvider>)

Initializes a new instance of the RestControllerActionInvoker class.

Declaration
public RestControllerActionInvoker(IEnumerable<IRestControllerValueProvider> restValueProviders)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IRestControllerValueProvider> restValueProviders

The rest value providers queried for rest specific parameter values. Will be resolved from the service locator if not passed.

Methods

GetParameterValue(ControllerContext, ParameterDescriptor)

Tries to get a specific value from the registered IRestControllerValueProviders before calling the base implementation.

Declaration
protected override object GetParameterValue(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor)
Parameters
Type Name Description
System.Web.Mvc.ControllerContext controllerContext

The controller context.

System.Web.Mvc.ParameterDescriptor parameterDescriptor

The parameter descriptor.

Returns
Type Description
System.Object

The value for a specific parameter; or null if no matching parameter value was found.

TryGetParameterValueFromRestProviders(ControllerContext, ParameterDescriptor, out Object)

Queries the registered IRestControllerValueProviders for a specific value.

Declaration
protected bool TryGetParameterValueFromRestProviders(ControllerContext controllerContext, ParameterDescriptor parameterDescriptor, out object value)
Parameters
Type Name Description
System.Web.Mvc.ControllerContext controllerContext

The controller context.

System.Web.Mvc.ParameterDescriptor parameterDescriptor

The parameter descriptor.

System.Object value

The value returned; or null if no value was found.

Returns
Type Description
System.Boolean

true if a value was returned by any of the providers; otherwise false.

Extension Methods