Represents the response of an operation request in the Cascade library. This class encapsulates information about the operation's result, its connection status, elapsed time, and more.
More...
|
| | OpResponse (RequestOp requestOp, long timeMs, bool exists, long? arrivedAtMs, object? result, string? eTag=null) |
| | Constructs an instance of OpResponse with the given parameters.
|
| OpResponse | withChanges (RequestOp? requestOp=null, long? timeMs=null, bool? exists=null, long? arrivedAtMs=null, object? result=null, string? eTag=null) |
| | Creates a new OpResponse with updated fields if given, otherwise base fields remain the same.
|
| bool | ResultIsBlob () |
| | Determines if the operation result is a binary large object (blob).
|
| bool | ResultIsEmpty () |
| | Determines if the operation result is considered empty.
|
| string | ToSummaryString () |
| | Produces a summary string of the result including connection and existence status.
|
|
| static OpResponse | None (RequestOp requestOp, long timeMs, string? sourceName=null) |
| | Constructs an OpResponse indicating that there was no value found.
|
| static OpResponse | ConnectionFailure (RequestOp requestOp, long timeMs, string sourceName=null) |
| | Constructs an OpResponse indicating a connection failure.
|
|
|
readonly RequestOp | RequestOp |
|
readonly long | TimeMs |
|
readonly bool | Exists |
|
readonly? object | Result |
|
long? | ArrivedAtMs |
|
int | LayerIndex |
|
string? | SourceName |
|
readonly? string | ETag |
|
|
IReadOnlyList< object > | Results [get] |
| | Provides an IEnumerable interface for the results.
|
|
object? | FirstResult [get] |
| | Returns the first item in the results if they are enumerable, otherwise the result itself.
|
|
bool | IsEnumerableResults [get] |
| | Indicates if the results are a collection that is not a blob.
|
|
bool | IsModelResults [get] |
| | Indicates if the results are a model type.
|
|
bool | IsIdResults [get] |
| | Indicates if the results are ids.
|
|
IEnumerable | ResultIds [get] |
| | Provides an IEnumerable interface for the ids found in the results.
|
Represents the response of an operation request in the Cascade library. This class encapsulates information about the operation's result, its connection status, elapsed time, and more.
◆ OpResponse()
| Buzzware.Cascade.OpResponse.OpResponse |
( |
RequestOp | requestOp, |
|
|
long | timeMs, |
|
|
bool | exists, |
|
|
long? | arrivedAtMs, |
|
|
object? | result, |
|
|
string? | eTag = null ) |
|
inline |
Constructs an instance of OpResponse with the given parameters.
- Parameters
-
| requestOp | The original request operation. |
| timeMs | The time in milliseconds when the operation took place. |
| exists | Indicates if the item is present in the cache. |
| arrivedAtMs | The time in milliseconds when the response arrived. |
| result | The result of the operation, can be null. |
| eTag | |
◆ ConnectionFailure()
| OpResponse Buzzware.Cascade.OpResponse.ConnectionFailure |
( |
RequestOp | requestOp, |
|
|
long | timeMs, |
|
|
string | sourceName = null ) |
|
inlinestatic |
Constructs an OpResponse indicating a connection failure.
- Parameters
-
| requestOp | The original request operation. |
| timeMs | Time when the operation attempt took place. |
| sourceName | The name of the source that would have provided this response. |
- Returns
- A new OpResponse indicating a connection failure.
◆ None()
| OpResponse Buzzware.Cascade.OpResponse.None |
( |
RequestOp | requestOp, |
|
|
long | timeMs, |
|
|
string? | sourceName = null ) |
|
inlinestatic |
Constructs an OpResponse indicating that there was no value found.
- Parameters
-
| requestOp | The original request operation. |
| timeMs | Time when the operation took place. |
| sourceName | The name of the source that provided this response. |
- Returns
- A new OpResponse indicating no response was received.
◆ ResultIsBlob()
| bool Buzzware.Cascade.OpResponse.ResultIsBlob |
( |
| ) |
|
|
inline |
Determines if the operation result is a binary large object (blob).
- Returns
- True if the result is a blob.
◆ ResultIsEmpty()
| bool Buzzware.Cascade.OpResponse.ResultIsEmpty |
( |
| ) |
|
|
inline |
Determines if the operation result is considered empty.
- Returns
- True if the result is empty or null.
◆ ToSummaryString()
| string Buzzware.Cascade.OpResponse.ToSummaryString |
( |
| ) |
|
|
inline |
Produces a summary string of the result including connection and existence status.
- Returns
- A string summarizing the result, connection, and existence.
◆ withChanges()
| OpResponse Buzzware.Cascade.OpResponse.withChanges |
( |
RequestOp? | requestOp = null, |
|
|
long? | timeMs = null, |
|
|
bool? | exists = null, |
|
|
long? | arrivedAtMs = null, |
|
|
object? | result = null, |
|
|
string? | eTag = null ) |
|
inline |
Creates a new OpResponse with updated fields if given, otherwise base fields remain the same.
- Parameters
-
| requestOp | Updated request operation. |
| timeMs | Updated time in milliseconds. |
| exists | Updated existence status. |
| arrivedAtMs | Updated arrival time in milliseconds. |
| result | Updated operation result. |
| eTag | |
- Returns
- The new OpResponse instance with specified changes.
The documentation for this class was generated from the following file:
- Buzzware.Cascade/OpResponse.cs