Class UpdateItemResult
Helper class to create correct instances.
Inherited Members
Namespace:CacheManager.Core.Internal
Assembly:CacheManager.Core.dll
Syntax
public static class UpdateItemResult
Methods
| Improve this Doc View SourceForFactoryReturnedNull<TCacheValue>()
Creates a new instance of the UpdateItemResult<TCacheValue> indicating that the cache value factory returned null instead of a valid value.
Declaration
public static UpdateItemResult<TCacheValue> ForFactoryReturnedNull<TCacheValue>()
Returns
Type | Description |
---|---|
UpdateItemResult<TCacheValue> | The item result. |
Type Parameters
Name | Description |
---|---|
TCacheValue | The type of the cache value. |
ForItemDidNotExist<TCacheValue>()
Creates a new instance of the UpdateItemResult<TCacheValue> class with properties typical for the case where the cache item did not exist for an update operation.
Declaration
public static UpdateItemResult<TCacheValue> ForItemDidNotExist<TCacheValue>()
Returns
Type | Description |
---|---|
UpdateItemResult<TCacheValue> | The item result. |
Type Parameters
Name | Description |
---|---|
TCacheValue | The type of the cache value. |
ForSuccess<TCacheValue>(CacheItem<TCacheValue>, Boolean, Int32)
Creates a new instance of the UpdateItemResult<TCacheValue> class with properties typical for a successful update operation.
Declaration
public static UpdateItemResult<TCacheValue> ForSuccess<TCacheValue>(CacheItem<TCacheValue> value, bool conflictOccurred = false, int triesNeeded = 1)
Parameters
Type | Name | Description |
---|---|---|
CacheItem<TCacheValue> | value | The value. |
Boolean | conflictOccurred | Set to |
Int32 | triesNeeded | The tries needed. |
Returns
Type | Description |
---|---|
UpdateItemResult<TCacheValue> | The item result. |
Type Parameters
Name | Description |
---|---|
TCacheValue | The type of the cache value. |
ForTooManyRetries<TCacheValue>(Int32)
Creates a new instance of the UpdateItemResult<TCacheValue> class with properties typical for an update operation which failed because it exceeded the limit of tries.
Declaration
public static UpdateItemResult<TCacheValue> ForTooManyRetries<TCacheValue>(int triesNeeded)
Parameters
Type | Name | Description |
---|---|---|
Int32 | triesNeeded | The tries needed. |
Returns
Type | Description |
---|---|
UpdateItemResult<TCacheValue> | The item result. |
Type Parameters
Name | Description |
---|---|
TCacheValue | The type of the cache value. |