Skip to main content

ServiceController

Assembly: ServiceStack.dll
View Source
Declaration
public class ServiceController : IServiceController, IServiceExecutor

Properties

RequestTypeFactoryMap

View Source
Declaration
public Dictionary<Type, Func<IRequest, object>> RequestTypeFactoryMap { get; set; }

DefaultOperationsNamespace

View Source
Declaration
public string DefaultOperationsNamespace { get; set; }

ResolveServicesFn

View Source
Declaration
public Func<IEnumerable<Type>> ResolveServicesFn { get; set; }

Fields

RestPathMap

View Source
Declaration
public readonly Dictionary<string, List<RestPath>> RestPathMap

Methods

Init()

View Source
Declaration
public ServiceController Init()
Returns

ServiceStack.Host.ServiceController

RegisterServicesInAssembly(Assembly)

View Source
Declaration
public void RegisterServicesInAssembly(Assembly assembly)
Parameters
TypeName
System.Reflection.Assemblyassembly

RegisterService(Type)

View Source
Declaration
public void RegisterService(Type serviceType)
Parameters
TypeName
System.TypeserviceType

RegisterService(ITypeFactory, Type)

View Source
Declaration
public void RegisterService(ITypeFactory serviceFactoryFn, Type serviceType)
Parameters
TypeName
ServiceStack.Configuration.ITypeFactoryserviceFactoryFn
System.TypeserviceType

IsServiceType(Type)

View Source
Declaration
public static bool IsServiceType(Type serviceType)
Returns

System.Boolean

Parameters
TypeName
System.TypeserviceType

IsServiceAction(ActionMethod)

View Source
Declaration
public static bool IsServiceAction(ActionMethod mi)
Returns

System.Boolean

Parameters
TypeName
ServiceStack.Host.ActionMethodmi

IsServiceAction(String, Type)

View Source
Declaration
public static bool IsServiceAction(string actionName, Type requestType)
Returns

System.Boolean

Parameters
TypeName
System.StringactionName
System.TyperequestType

RegisterRestPaths(Type)

View Source
Declaration
public void RegisterRestPaths(Type requestType)
Parameters
TypeName
System.TyperequestType

RegisterRestPath(RestPath)

View Source
Declaration
public void RegisterRestPath(RestPath restPath)
Parameters
TypeName
ServiceStack.Host.RestPathrestPath

AfterInit()

View Source
Declaration
public void AfterInit()

GetRestPathForRequest(String, String)

View Source
Declaration
[Obsolete("Use GetRestPathForRequest(httpMethod, pathInfo, httpReq)")]
public IRestPath GetRestPathForRequest(string httpMethod, string pathInfo)
Returns

ServiceStack.Web.IRestPath

Parameters
TypeName
System.StringhttpMethod
System.StringpathInfo

GetRestPathForRequest(String, String, IHttpRequest)

Get Best Matching Route.

View Source
Declaration
public RestPath GetRestPathForRequest(string httpMethod, string pathInfo, IHttpRequest httpReq)
Returns

ServiceStack.Host.RestPath

Parameters
TypeNameDescription
System.StringhttpMethod

| | System.String | pathInfo |

| | ServiceStack.Web.IHttpRequest | httpReq | If not null, ensures any Route matches any [Route(Matches)]

|

ResetServiceExecCachesIfNeeded(Type, Type)

View Source
Declaration
public void ResetServiceExecCachesIfNeeded(Type serviceType, Type requestType)
Parameters
TypeName
System.TypeserviceType
System.TyperequestType

RegisterServiceExecutor(Type, Type, ITypeFactory)

View Source
Declaration
public void RegisterServiceExecutor(Type requestType, Type serviceType, ITypeFactory serviceFactoryFn)
Parameters
TypeName
System.TyperequestType
System.TypeserviceType
ServiceStack.Configuration.ITypeFactoryserviceFactoryFn

ApplyResponseFilters(Object, IRequest)

View Source
Declaration
[Obsolete("Use ApplyResponseFiltersAsync")]
public object ApplyResponseFilters(object response, IRequest req)
Returns

System.Object

Parameters
TypeName
System.Objectresponse
ServiceStack.Web.IRequestreq

ExecuteMessage(IMessage)

Execute MQ

View Source
Declaration
public object ExecuteMessage(IMessage mqMessage)
Returns

System.Object

Parameters
TypeName
ServiceStack.Messaging.IMessagemqMessage

ExecuteMessageAsync(IMessage, CancellationToken)

Execute MQ

View Source
Declaration
public Task<object> ExecuteMessageAsync(IMessage mqMessage, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Messaging.IMessagemqMessage
System.Threading.CancellationTokentoken

ExecuteMessage(IMessage, IRequest)

Execute MQ with requestContext

View Source
Declaration
public object ExecuteMessage(IMessage dto, IRequest req)
Returns

System.Object

Parameters
TypeName
ServiceStack.Messaging.IMessagedto
ServiceStack.Web.IRequestreq

ExecuteMessageAsync(IMessage, IRequest, CancellationToken)

Execute MQ with requestContext

View Source
Declaration
public async Task<object> ExecuteMessageAsync(IMessage dto, IRequest req, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
ServiceStack.Messaging.IMessagedto
ServiceStack.Web.IRequestreq
System.Threading.CancellationTokentoken

Execute(Object)

Execute using empty RequestContext

View Source
Declaration
public object Execute(object requestDto)
Returns

System.Object

Parameters
TypeName
System.ObjectrequestDto

Execute(Object, IRequest)

Execute a Service with a Request DTO. See ExecuteAsync for a non-blocking alternative.

View Source
Declaration
public virtual object Execute(object requestDto, IRequest req)
Returns

System.Object

Parameters
TypeName
System.ObjectrequestDto
ServiceStack.Web.IRequestreq

ExecuteAsync(Object, IRequest)

Execute a Service with a Request DTO.

View Source
Declaration
public virtual async Task<object> ExecuteAsync(object requestDto, IRequest req)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.ObjectrequestDto
ServiceStack.Web.IRequestreq

Execute(Object, IRequest, Boolean)

View Source
Declaration
public object Execute(object requestDto, IRequest req, bool applyFilters)
Returns

System.Object

Parameters
TypeName
System.ObjectrequestDto
ServiceStack.Web.IRequestreq
System.BooleanapplyFilters

Execute(IRequest, Boolean)

View Source
Declaration
public object Execute(IRequest req, bool applyFilters)
Returns

System.Object

Parameters
TypeName
ServiceStack.Web.IRequestreq
System.BooleanapplyFilters

ExecValidatorsAsync(Object, IRequest)

View Source
Declaration
public async Task ExecValidatorsAsync(object request, IRequest req)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Objectrequest
ServiceStack.Web.IRequestreq

ManagedGatewayExecuteAsync(Object, IRequest)

Execute In Process Gateway Request with Gateway + Validation Filters

View Source
Declaration
public async Task<object> ManagedGatewayExecuteAsync(object request, IRequest req)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.Objectrequest
ServiceStack.Web.IRequestreq

GatewayExecuteAsync(Object, IRequest, Boolean)

View Source
Declaration
public async Task<object> GatewayExecuteAsync(object requestDto, IRequest req, bool applyFilters)
Returns

System.Threading.Tasks.Task<System.Object>

Parameters
TypeName
System.ObjectrequestDto
ServiceStack.Web.IRequestreq
System.BooleanapplyFilters

HasService(Type)

View Source
Declaration
public bool HasService(Type requestType)
Returns

System.Boolean

Parameters
TypeName
System.TyperequestType

GetService(Type)

View Source
Declaration
public virtual ServiceExecFn GetService(Type requestType)
Returns

ServiceStack.Host.ServiceExecFn

Parameters
TypeName
System.TyperequestType

AssertServiceRestrictions(Type, RequestAttributes)

View Source
Declaration
public void AssertServiceRestrictions(Type requestType, RequestAttributes actualAttributes)
Parameters
TypeName
System.TyperequestType
ServiceStack.RequestAttributesactualAttributes

Implements