TypeValidator
Assembly: ServiceStack.dll
View Source
Declaration
public abstract class TypeValidator : ITypeValidator
Properties
ErrorCode
View Source
Declaration
public string ErrorCode { get; set; }
Message
View Source
Declaration
public string Message { get; set; }
StatusCode
View Source
Declaration
public int? StatusCode { get; set; }
DefaultErrorCode
View Source
Declaration
public string DefaultErrorCode { get; set; }
DefaultMessage
View Source
Declaration
public string DefaultMessage { get; set; }
DefaultStatusCode
View Source
Declaration
public int? DefaultStatusCode { get; set; }
ContextArgs
View Source
Declaration
public Dictionary<string, object> ContextArgs { get; set; }
Methods
ResolveErrorMessage(IRequest, Object)
View Source
Declaration
protected string ResolveErrorMessage(IRequest request, object dto)
Returns
System.String
Parameters
Type | Name |
---|---|
ServiceStack.Web.IRequest | request |
System.Object | dto |
ResolveStatusCode()
View Source
Declaration
protected int ResolveStatusCode()
Returns
System.Int32
ResolveErrorCode()
View Source
Declaration
protected string ResolveErrorCode()
Returns
System.String
IsValid(Object, IRequest)
View Source
Declaration
public virtual bool IsValid(object dto, IRequest request)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.Object | dto |
ServiceStack.Web.IRequest | request |
IsValidAsync(Object, IRequest)
View Source
Declaration
public virtual Task<bool> IsValidAsync(object dto, IRequest request)
Returns
System.Threading.Tasks.Task<System.Boolean>
Parameters
Type | Name |
---|---|
System.Object | dto |
ServiceStack.Web.IRequest | request |
ThrowIfNotValidAsync(Object, IRequest)
View Source
Declaration
public virtual async Task ThrowIfNotValidAsync(object dto, IRequest request)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|---|
System.Object | dto |
ServiceStack.Web.IRequest | request |