ApiResult<TResponse>
Assembly: ServiceStack.Client.dll
View Source
Declaration
public class ApiResult<TResponse> : IHasErrorStatus
Properties
Response
View Source
Declaration
public TResponse Response { get; }
Error
View Source
Declaration
public ResponseStatus Error { get; }
Failed
View Source
Declaration
public bool Failed { get; }
Succeeded
View Source
Declaration
public bool Succeeded { get; }
Completed
View Source
Declaration
public bool Completed { get; }
IsLoading
View Source
Declaration
public bool IsLoading { get; set; }
StackTrace
View Source
Declaration
public string StackTrace { get; set; }
ErrorMessage
View Source
Declaration
public string ErrorMessage { get; }
Errors
View Source
Declaration
public ResponseError[] Errors { get; }
ErrorSummary
View Source
Declaration
public string ErrorSummary { get; }
Methods
FieldErrorMessage(String)
View Source
Declaration
public string FieldErrorMessage(string fieldName)
Returns
System.String
Parameters
Type | Name |
---|---|
System.String | fieldName |
FieldError(String)
View Source
Declaration
public ResponseError FieldError(string fieldName)
Returns
Parameters
Type | Name |
---|---|
System.String | fieldName |
HasFieldError(String)
View Source
Declaration
public bool HasFieldError(string fieldName)
Returns
System.Boolean
Parameters
Type | Name |
---|---|
System.String | fieldName |
ClearErrors()
View Source
Declaration
public void ClearErrors()
AddFieldError(String, String, String)
View Source
Declaration
public void AddFieldError(string fieldName, string message, string errorCode = "ValidationException")
Parameters
Type | Name |
---|---|
System.String | fieldName |
System.String | message |
System.String | errorCode |
SetError(String, String)
View Source
Declaration
public void SetError(string errorMessage, string errorCode = "Exception")
Parameters
Type | Name |
---|---|
System.String | errorMessage |
System.String | errorCode |