Class OperationResult<TResultType, TEntity>
Represents the result of a service operation for a given entity.
Namespace: Umbraco.Core.Services
Assembly: Umbraco.Core.dll
Syntax
public class OperationResult<TResultType, TEntity> : OperationResult<TResultType> where TResultType : struct
Type Parameters
Name | Description |
---|---|
TResultType | The type of the result type. |
TEntity | The type of the entity. |
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, TEntity> class.
Declaration
public OperationResult(TResultType result, EventMessages eventMessages)
Parameters
Type | Name | Description |
---|---|---|
TResultType | result | The status of the operation. |
EventMessages | eventMessages | Event messages produced by the operation. |
OperationResult(TResultType, EventMessages, TEntity)
Initializes a new instance of the OperationResult<TResultType, TEntity> class.
Declaration
public OperationResult(TResultType result, EventMessages eventMessages, TEntity entity)
Parameters
Type | Name | Description |
---|---|---|
TResultType | result | |
EventMessages | eventMessages | |
TEntity | entity |
Properties
View SourceEntity
Gets the entity.
Declaration
public TEntity Entity { get; }
Property Value
Type | Description |
---|---|
TEntity |