ServiceMetadata
Assembly: ServiceStack.dll
View Source
public class ServiceMetadata
Properties
OperationsMap
View Source
public Dictionary<Type, Operation> OperationsMap { get; protected set; }
OperationsResponseMap
View Source
public Dictionary<Type, Operation> OperationsResponseMap { get; protected set; }
OperationNamesMap
View Source
public Dictionary<string, Operation> OperationNamesMap { get; protected set; }
RequestTypes
View Source
public HashSet<Type> RequestTypes { get; protected set; }
ServiceTypes
View Source
public HashSet<Type> ServiceTypes { get; protected set; }
ResponseTypes
View Source
public HashSet<Type> ResponseTypes { get; protected set; }
ConfigureOperations
View Source
public List<Action<Operation>> ConfigureOperations { get; protected set; }
ConfigureMetadataTypes
View Source
public List<Action<MetadataType>> ConfigureMetadataTypes { get; protected set; }
Operations
View Source
public IEnumerable<Operation> Operations { get; }
ForceInclude
View Source
public HashSet<Type> ForceInclude { get; set; }
Methods
Add(Type, Type, Type)
View Source
public void Add(Type serviceType, Type requestType, Type responseType)
Parameters
Type | Name |
---|---|
System.Type | serviceType |
System.Type | requestType |
System.Type | responseType |
AfterInit()
View Source
public void AfterInit()
GetOperationAssemblies()
View Source
public List<Assembly> GetOperationAssemblies()
Returns
System.Collections.Generic.List<System.Reflection.Assembly>
GetOperationDtos()
View Source
public List<OperationDto> GetOperationDtos()
Returns
System.Collections.Generic.List<ServiceStack.Host.OperationDto>
GetOperationsByTag(String)
View Source
public List<Operation> GetOperationsByTag(string tag)
Returns
System.Collections.Generic.List<ServiceStack.Host.Operation>
Parameters
Type | Name |
---|---|
System.String | tag |
GetOperationsByTags(String[])
View Source
public List<Operation> GetOperationsByTags(string[] tags)
Returns
System.Collections.Generic.List<ServiceStack.Host.Operation>
Parameters
Type | Name |
---|---|
System.String[] | tags |
GetOperation(Type)
View Source
public Operation GetOperation(Type requestType)
Returns
Parameters
Type | Name |
---|---|
System.Type | requestType |
GetImplementedActions(Type, Type)
View Source
public List<ActionMethod> GetImplementedActions(Type serviceType, Type requestType)
Returns
System.Collections.Generic.List<ServiceStack.Host.ActionMethod>
Parameters
Type | Name |
---|---|
System.Type | serviceType |
System.Type | requestType |
GetRequestType(String)
View Source
public Type GetRequestType(string requestDtoName)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | requestDtoName |
GetOperationType(String)
View Source
public Type GetOperationType(string operationTypeName)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | operationTypeName |
GetServiceTypeByRequest(Type)
View Source
public Type GetServiceTypeByRequest(Type requestType)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.Type | requestType |
GetServiceTypeByResponse(Type)
View Source
public Type GetServiceTypeByResponse(Type responseType)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.Type | responseType |
GetResponseTypeByRequest(Type)
View Source
public Type GetResponseTypeByRequest(Type requestType)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.Type | requestType |
GetAllOperationTypes()
View Source
public List<Type> GetAllOperationTypes()
Returns
System.Collections.Generic.List<System.Type>
GetAllOperationNames()
View Source
public List<string> GetAllOperationNames()
Returns
System.Collections.Generic.List<System.String>
GetOperationNamesForMetadata(IRequest)
View Source
public List<string> GetOperationNamesForMetadata(IRequest httpReq)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
GetOperationNamesForMetadata(IRequest, Format)
View Source
public List<string> GetOperationNamesForMetadata(IRequest httpReq, Format format)
Returns
System.Collections.Generic.List<System.String>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Format | format |
IsAuthorized(Operation, IRequest, IAuthSession)
View Source
public bool IsAuthorized(Operation operation, IRequest req, IAuthSession session)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Host.Operation | operation |
ServiceStack.Web.IRequest | req |
ServiceStack.Auth.IAuthSession | session |
IsAuthorizedAsync(Operation, IRequest, IAuthSession)
View Source
public async Task<bool> IsAuthorizedAsync(Operation operation, IRequest req, IAuthSession session)
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
ServiceStack.Host.Operation | operation |
ServiceStack.Web.IRequest | req |
ServiceStack.Auth.IAuthSession | session |
IsVisible(IRequest, Operation)
View Source
public bool IsVisible(IRequest httpReq, Operation operation)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Host.Operation | operation |
IsVisible(IRequest, Type)
View Source
public bool IsVisible(IRequest httpReq, Type requestType)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
System.Type | requestType |
IsVisible(IRequest, Format, String)
View Source
public bool IsVisible(IRequest httpReq, Format format, string operationName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Format | format |
System.String | operationName |
CanAccess(IRequest, Format, String)
View Source
public bool CanAccess(IRequest httpReq, Format format, string operationName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Format | format |
System.String | operationName |
CanAccess(RequestAttributes, Format, String)
View Source
public bool CanAccess(RequestAttributes reqAttrs, Format format, string operationName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.RequestAttributes | reqAttrs |
ServiceStack.Format | format |
System.String | operationName |
CanAccess(Format, String)
View Source
public bool CanAccess(Format format, string operationName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Format | format |
System.String | operationName |
HasImplementation(Operation, Format)
View Source
public bool HasImplementation(Operation operation, Format format)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
ServiceStack.Host.Operation | operation |
ServiceStack.Format | format |
GetAllDtos()
View Source
public HashSet<Type> GetAllDtos()
Returns
System.Collections.Generic.HashSet<System.Type>
FindDtoType(String)
View Source
public Type FindDtoType(string typeName)
Returns
System.Type
Parameters
Type | Name |
---|---|
System.String | typeName |
FindRoute(String, String)
View Source
public RestPath FindRoute(string pathInfo, string method = "GET")
Returns
Parameters
Type | Name |
---|---|
System.String | pathInfo |
System.String | method |
CreateRequestFromUrl(String, String)
View Source
public object CreateRequestFromUrl(string relativeOrAbsoluteUrl, string method = "GET")
Returns
System.Object
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
System.String | method |
AddReferencedTypes(HashSet<Type>, Type)
View Source
public static void AddReferencedTypes(HashSet<Type> to, Type type)
Parameters
Type | Name |
---|---|
System.Collections.Generic.HashSet<System.Type> | to |
System.Type | type |
IsDtoType(Type)
View Source
public static bool IsDtoType(Type type)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Type | type |
GetMetadataTypesForOperation(IRequest, Operation)
View Source
public List<MetadataType> GetMetadataTypesForOperation(IRequest httpReq, Operation op)
Returns
System.Collections.Generic.List<ServiceStack.MetadataType>
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | httpReq |
ServiceStack.Host.Operation | op |
GetAllSoapOperationTypes()
View Source
public List<Type> GetAllSoapOperationTypes()
Returns
System.Collections.Generic.List<System.Type>
GetAllRoles()
View Source
public List<string> GetAllRoles()
Returns
System.Collections.Generic.List<System.String>
GetAllPermissions()
View Source
public List<string> GetAllPermissions()
Returns
System.Collections.Generic.List<System.String>
CreateRequestDto(Type, Object)
View Source
public object CreateRequestDto(Type requestType, object dto)
Returns
System.Object
Parameters
Type | Name |
---|---|
System.Type | requestType |
System.Object | dto |