Class Result
Represents the result of an operation that does not return a value.
Inherited Members
Namespace: SimpleResults
Assembly: SimpleResults.dll
Syntax
public sealed class Result : ResultBase
Remarks
This class defines different types of results for an operation.
For example:Result.Invalid, Result.NotFound, among others.
Constructors
| Name | Description |
|---|---|
| Result() | Initializes a new instance of the Result class. |
Methods
| Name | Description |
|---|---|
| Conflict() | Represents a situation where a service is in conflict due to the current state of a resource. |
| Conflict(IEnumerable<String>) | Represents a situation where a service is in conflict due to the current state of a resource. |
| Conflict(String) | Represents a situation where a service is in conflict due to the current state of a resource. |
| Conflict(String, IEnumerable<String>) | Represents a situation where a service is in conflict due to the current state of a resource. |
| CreatedResource() | Represents a situation in which the service successfully creates a resource. |
| CreatedResource(Guid) | Represents a situation in which the service successfully creates a resource. |
| CreatedResource(Guid, String) | Represents a situation in which the service successfully creates a resource. |
| CreatedResource(Int32) | Represents a situation in which the service successfully creates a resource. |
| CreatedResource(Int32, String) | Represents a situation in which the service successfully creates a resource. |
| CreatedResource(String) | Represents a situation in which the service successfully creates a resource. |
| CriticalError() | Represents a situation where a service detects unexpected behavior (critical error) and does not know how to handle it. |
| CriticalError(IEnumerable<String>) | Represents a situation where a service detects unexpected behavior (critical error) and does not know how to handle it. |
| CriticalError(String) | Represents a situation where a service detects unexpected behavior (critical error) and does not know how to handle it. |
| CriticalError(String, IEnumerable<String>) | Represents a situation where a service detects unexpected behavior (critical error) and does not know how to handle it. |
| DeletedResource() | Represents a situation in which the service successfully deletes a resource. |
| Failure() | Represents an error that occurred during the execution of a service. |
| Failure(IEnumerable<String>) | Represents an error that occurred during the execution of a service. |
| Failure(String) | Represents an error that occurred during the execution of a service. |
| Failure(String, IEnumerable<String>) | Represents an error that occurred during the execution of a service. |
| File(ByteArrayFileContent) | Represents a situation in which the service returns the contents of a file as an array of bytes. |
| File(StreamFileContent) | Represents a situation in which the service returns the contents of a file as a stream. |
| Forbidden() | Represents a situation where the user does not have permission to perform some action. |
| Forbidden(IEnumerable<String>) | Represents a situation where the user does not have permission to perform some action. |
| Forbidden(String) | Represents a situation where the user does not have permission to perform some action. |
| Forbidden(String, IEnumerable<String>) | Represents a situation where the user does not have permission to perform some action. |
| Invalid() | Represents a validation error that prevents the underlying service from completing. |
| Invalid(IEnumerable<String>) | Represents a validation error that prevents the underlying service from completing. |
| Invalid(String) | Represents a validation error that prevents the underlying service from completing. |
| Invalid(String, IEnumerable<String>) | Represents a validation error that prevents the underlying service from completing. |
| NotFound() | Represents the situation where a service was unable to find a requested resource. |
| NotFound(IEnumerable<String>) | Represents the situation where a service was unable to find a requested resource. |
| NotFound(String) | Represents the situation where a service was unable to find a requested resource. |
| NotFound(String, IEnumerable<String>) | Represents the situation where a service was unable to find a requested resource. |
| ObtainedResource<T>(T) | Represents a situation in which the service successfully obtains a resource. |
| ObtainedResources<T>(IEnumerable<T>) | Represents a situation in which the service successfully obtains multiple resources. |
| Success() | Represents a successful operation. |
| Success(String) | Represents a successful operation and accepts a messages that describes the result. |
| Success<T>(T) | Represents a successful operation and accepts a values as the result of the operation. |
| Success<T>(T, String) | Represents a successful operation and accepts a values as the result of the operation. |
| Success<T>(IEnumerable<T>, PagedInfo) | Represents a successful operation and accepts a set of data and paged information as arguments. |
| Success<T>(IEnumerable<T>, PagedInfo, String) | Represents a successful operation and accepts a set of data and paged information as arguments. |
| ToListedResult<T>(IEnumerable<T>) | Converts an instance of type Result to ListedResult<T>. |
| ToPagedResult<T>(IEnumerable<T>, PagedInfo) | Converts an instance of type Result to PagedResult<T>. |
| ToResult<T>(T) | |
| Unauthorized() | Represents a situation where a user does not have valid authentication credentials for the target resource. |
| Unauthorized(IEnumerable<String>) | Represents a situation where a user does not have valid authentication credentials for the target resource. |
| Unauthorized(String) | Represents a situation where a user does not have valid authentication credentials for the target resource. |
| Unauthorized(String, IEnumerable<String>) | Represents a situation where a user does not have valid authentication credentials for the target resource. |
| UpdatedResource() | Represents a situation in which the service successfully updates a resource. |