View Source
Class OperationResult.Attempt
Inheritance
System.Object
Assembly: Umbraco.Core.dll
Syntax
public static class Attempt
Methods
View Source
Cancel(EventMessages)
Creates a failed operation attempt indicating that the operation has been cancelled.
Declaration
public static Attempt<OperationResult> Cancel(EventMessages eventMessages)
Parameters
Type |
Name |
Description |
EventMessages |
eventMessages |
The event messages produced by the operation.
|
Returns
View Source
Cancel<TValue>(EventMessages)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Cancel<TValue>(EventMessages eventMessages)
Parameters
Returns
Type Parameters
View Source
Cancel<TValue>(EventMessages, TValue)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Cancel<TValue>(EventMessages eventMessages, TValue value)
Parameters
Returns
Type Parameters
View Source
Cannot<TValue>(EventMessages)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Cannot<TValue>(EventMessages eventMessages)
Parameters
Returns
Type Parameters
View Source
Fail(EventMessages, Exception)
Creates a failed operation attempt indicating that an exception was thrown during the operation.
Declaration
public static Attempt<OperationResult> Fail(EventMessages eventMessages, Exception exception)
Parameters
Type |
Name |
Description |
EventMessages |
eventMessages |
The event messages produced by the operation.
|
Exception |
exception |
The exception that caused the operation to fail.
|
Returns
View Source
Fail<TStatusType>(TStatusType, EventMessages)
Declaration
public static Attempt<OperationResult<TStatusType>> Fail<TStatusType>(TStatusType statusType, EventMessages eventMessages)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
View Source
Fail<TStatusType>(TStatusType, EventMessages, Exception)
Declaration
public static Attempt<OperationResult<TStatusType>> Fail<TStatusType>(TStatusType statusType, EventMessages eventMessages, Exception exception)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
Exception |
exception |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
View Source
Fail<TValue>(EventMessages, Exception)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Fail<TValue>(EventMessages eventMessages, Exception exception)
Parameters
Type |
Name |
Description |
EventMessages |
eventMessages |
|
Exception |
exception |
|
Returns
Type Parameters
View Source
Fail<TStatusType, TValue>(TStatusType, EventMessages)
Declaration
public static Attempt<OperationResult<TStatusType, TValue>> Fail<TStatusType, TValue>(TStatusType statusType, EventMessages eventMessages)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
TValue |
|
View Source
Fail<TStatusType, TValue>(TStatusType, EventMessages, TValue)
Declaration
public static Attempt<OperationResult<TStatusType, TValue>> Fail<TStatusType, TValue>(TStatusType statusType, EventMessages eventMessages, TValue value)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
TValue |
value |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
TValue |
|
View Source
Fail<TStatusType, TValue>(TStatusType, EventMessages, TValue, Exception)
Declaration
public static Attempt<OperationResult<TStatusType, TValue>> Fail<TStatusType, TValue>(TStatusType statusType, EventMessages eventMessages, TValue value, Exception exception)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
TValue |
value |
|
Exception |
exception |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
TValue |
|
View Source
Fail<TStatusType, TValue>(TStatusType, EventMessages, Exception)
Declaration
public static Attempt<OperationResult<TStatusType, TValue>> Fail<TStatusType, TValue>(TStatusType statusType, EventMessages eventMessages, Exception exception)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
Exception |
exception |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
TValue |
|
View Source
NoOperation(EventMessages)
Creates a successful operation attempt indicating that nothing was done.
Declaration
public static Attempt<OperationResult> NoOperation(EventMessages eventMessages)
Parameters
Type |
Name |
Description |
EventMessages |
eventMessages |
The event messages produced by the operation.
|
Returns
View Source
Succeed(EventMessages)
Creates a successful operation attempt.
Declaration
public static Attempt<OperationResult> Succeed(EventMessages eventMessages)
Parameters
Type |
Name |
Description |
EventMessages |
eventMessages |
The event messages produced by the operation.
|
Returns
View Source
Succeed<TStatusType>(TStatusType, EventMessages)
Declaration
public static Attempt<OperationResult<TStatusType>> Succeed<TStatusType>(TStatusType statusType, EventMessages eventMessages)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
View Source
Succeed<TValue>(EventMessages)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Succeed<TValue>(EventMessages eventMessages)
Parameters
Returns
Type Parameters
View Source
Succeed<TValue>(EventMessages, TValue)
Declaration
public static Attempt<OperationResult<OperationResultType, TValue>> Succeed<TValue>(EventMessages eventMessages, TValue value)
Parameters
Returns
Type Parameters
View Source
Succeed<TStatusType, TValue>(TStatusType, EventMessages, TValue)
Declaration
public static Attempt<OperationResult<TStatusType, TValue>> Succeed<TStatusType, TValue>(TStatusType statusType, EventMessages eventMessages, TValue value)
where TStatusType : struct
Parameters
Type |
Name |
Description |
TStatusType |
statusType |
|
EventMessages |
eventMessages |
|
TValue |
value |
|
Returns
Type Parameters
Name |
Description |
TStatusType |
|
TValue |
|