Class OperationResult
Represents the default operation result.
Namespace: Umbraco.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class OperationResult : OperationResult<OperationResultType>
Remarks
Type TResultType
must be an enumeration, and its
underlying type must be byte. Values indicating success should be in the 0-127
range, while values indicating failure should be in the 128-255 range. See
OperationResultType for a base implementation.
Constructors
View SourceOperationResult(OperationResultType, EventMessages)
Initializes a new instance of the OperationResult class with a status and event messages.
Declaration
public OperationResult(OperationResultType result, EventMessages eventMessages)
Parameters
Type | Name | Description |
---|---|---|
OperationResultType | result | The status of the operation. |
EventMessages | eventMessages | Event messages produced by the operation. |
Methods
View SourceCancel(EventMessages)
Declaration
public static OperationResult Cancel(EventMessages eventMessages)
Parameters
Type | Name | Description |
---|---|---|
EventMessages | eventMessages |
Returns
Type | Description |
---|---|
OperationResult |
Succeed(EventMessages)
Declaration
public static OperationResult Succeed(EventMessages eventMessages)
Parameters
Type | Name | Description |
---|---|---|
EventMessages | eventMessages |
Returns
Type | Description |
---|---|
OperationResult |