Table of Contents

Interface ICallback<R>

Namespace
Cyclotron.Utilities.CleanArchitecture
Assembly
Cyclotron.Utilities.dll

Represents a callback handler for use case operations.

public interface ICallback<R> where R : IUsecaseResponse

Type Parameters

R

The type of response that implements IUsecaseResponse.

Extension Methods

Methods

OnCanceled(R)

Called when the use case operation is canceled.

void OnCanceled(R response)

Parameters

response R

The response indicating cancellation state.

OnError(ErrorResponse)

Called when an error occurs during the use case operation.

void OnError(ErrorResponse error)

Parameters

error ErrorResponse

The error response containing error details and exception information.

OnFailed(R)

Called when the use case operation fails with a known failure condition.

void OnFailed(R response)

Parameters

response R

The failed response containing failure details.

OnProgress(R)

Called to report progress updates during a long-running use case operation.

void OnProgress(R response)

Parameters

response R

The progress response containing intermediate results or status.

OnSuccess(R)

Called when the use case operation completes successfully.

void OnSuccess(R response)

Parameters

response R

The successful response from the use case operation.