Class OperationResult<TResultType>
Represents the result of a service operation.
Inheritance
System.Object
Namespace: Umbraco.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class OperationResult<TResultType>
where TResultType : struct
Type Parameters
Name | Description |
---|---|
TResultType | The type of the result type. |
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(TResultType, EventMessages)
Initializes a new instance of the OperationResult<TResultType> class.
Declaration
public OperationResult(TResultType result, EventMessages eventMessages)
Parameters
Type | Name | Description |
---|---|---|
TResultType | result | |
EventMessages | eventMessages |
Properties
View SourceEventMessages
Gets the event messages produced by the operation.
Declaration
public EventMessages EventMessages { get; }
Property Value
Type | Description |
---|---|
EventMessages |
Result
Gets the result of the operation.
Declaration
public TResultType Result { get; }
Property Value
Type | Description |
---|---|
TResultType |
Success
Gets a value indicating whether the operation was successful.
Declaration
public bool Success { get; }
Property Value
Type | Description |
---|---|
System.Boolean |