Skip to main content

ServiceRoutesExtensions

Assembly: ServiceStack.dll
View Source
Declaration
public static class ServiceRoutesExtensions

Methods

AddFromAssembly(IServiceRoutes, Assembly[])

Scans the supplied Assemblies to infer REST paths and HTTP verbs.

View Source
Declaration
public static IServiceRoutes AddFromAssembly(this IServiceRoutes routes, params Assembly[] assembliesWithServices)
Returns

ServiceStack.Web.IServiceRoutes: The same ServiceStack.Web.IServiceRoutes instance; never null.

Parameters
TypeNameDescription
ServiceStack.Web.IServiceRoutesroutesThe ServiceStack.Web.IServiceRoutes instance.

| | System.Reflection.Assembly[] | assembliesWithServices | The assemblies with REST services.

|

Add<TRequest>(IServiceRoutes, String, ApplyTo)

View Source
Declaration
public static IServiceRoutes Add<TRequest>(this IServiceRoutes routes, string restPath, ApplyTo verbs)
Returns

ServiceStack.Web.IServiceRoutes

Parameters
TypeName
ServiceStack.Web.IServiceRoutesroutes
System.StringrestPath
ServiceStack.ApplyToverbs
Type Parameters
  • TRequest

Add(IServiceRoutes, Type, String, ApplyTo)

View Source
Declaration
public static IServiceRoutes Add(this IServiceRoutes routes, Type requestType, string restPath, ApplyTo verbs)
Returns

ServiceStack.Web.IServiceRoutes

Parameters
TypeName
ServiceStack.Web.IServiceRoutesroutes
System.TyperequestType
System.StringrestPath
ServiceStack.ApplyToverbs

IsSubclassOfRawGeneric(Type, Type)

View Source
Declaration
public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic)
Returns

System.Boolean

Parameters
TypeName
System.TypetoCheck
System.Typegeneric

Add<T>(IServiceRoutes, String, ApplyTo, Expression<Func<T, Object>>[])

View Source
Declaration
public static IServiceRoutes Add<T>(this IServiceRoutes serviceRoutes, string restPath, ApplyTo verbs, params Expression<Func<T, object>>[] propertyExpressions)
Returns

ServiceStack.Web.IServiceRoutes

Parameters
TypeName
ServiceStack.Web.IServiceRoutesserviceRoutes
System.StringrestPath
ServiceStack.ApplyToverbs
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>[]propertyExpressions
Type Parameters
  • T