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
Type | Name | Description |
---|---|---|
ServiceStack.Web.IServiceRoutes | routes | The 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
Type | Name |
---|---|
ServiceStack.Web.IServiceRoutes | routes |
System.String | restPath |
ServiceStack.ApplyTo | verbs |
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
Type | Name |
---|---|
ServiceStack.Web.IServiceRoutes | routes |
System.Type | requestType |
System.String | restPath |
ServiceStack.ApplyTo | verbs |
IsSubclassOfRawGeneric(Type, Type)
View Source
Declaration
public static bool IsSubclassOfRawGeneric(this Type toCheck, Type generic)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Type | toCheck |
System.Type | generic |
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
Type | Name |
---|---|
ServiceStack.Web.IServiceRoutes | serviceRoutes |
System.String | restPath |
ServiceStack.ApplyTo | verbs |
System.Linq.Expressions.Expression<System.Func<<T>,System.Object>>[] | propertyExpressions |
Type Parameters
T