Class CacheableObjectResultExtensions
Extension methods for operations related to the ICacheableObjectResult interface.
Inheritance
Namespace: Cuemon.AspNetCore.Mvc.Filters.Cacheable
Assembly: Cuemon.AspNetCore.Mvc.dll
Syntax
public static class CacheableObjectResultExtensions
Methods
| Improve this DocToCacheableObjectResult<T>(T, Byte[], Action<ContentBasedOptions>)
Encapsulates the specified instance within a ContentBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, byte[] checksum, Action<ContentBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.Byte[] | checksum | The checksum that defines the data integrity of |
| System.Action<ContentBasedOptions> | setup | The ContentBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, DateTime, Action<TimeBasedOptions>)
Encapsulates the specified instance within a TimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, DateTime created, Action<TimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.DateTime | created | The value from when data the |
| System.Action<TimeBasedOptions> | setup | The TimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, DateTime, Byte[], Action<ContentTimeBasedOptions>)
Encapsulates the specified instance within a ContentTimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, DateTime created, byte[] checksum, Action<ContentTimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.DateTime | created | The value from when data the |
| System.Byte[] | checksum | The checksum that defines the data integrity of |
| System.Action<ContentTimeBasedOptions> | setup | The ContentTimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, DateTime, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
Encapsulates the specified instance within a ContentTimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, DateTime created, Func<T, byte[]> checksumProvider, Action<ContentTimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.DateTime | created | The value from when data the |
| System.Func<T, System.Byte[]> | checksumProvider | The function delegate that resolves a checksum that defines the data integrity of |
| System.Action<ContentTimeBasedOptions> | setup | The ContentTimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, Func<T, Byte[]>, Action<ContentBasedOptions>)
Encapsulates the specified instance within a ContentBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, Func<T, byte[]> checksumProvider, Action<ContentBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.Func<T, System.Byte[]> | checksumProvider | The function delegate that resolves a checksum that defines the data integrity of |
| System.Action<ContentBasedOptions> | setup | The ContentBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, Func<T, DateTime>, Action<TimeBasedOptions>)
Encapsulates the specified instance within a TimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, Func<T, DateTime> createdProvider, Action<TimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.Func<T, System.DateTime> | createdProvider | The function delegate that resolves a value from when data the |
| System.Action<TimeBasedOptions> | setup | The TimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, Func<T, DateTime>, Byte[], Action<ContentTimeBasedOptions>)
Encapsulates the specified instance within a ContentTimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, Func<T, DateTime> createdProvider, byte[] checksum, Action<ContentTimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.Func<T, System.DateTime> | createdProvider | The function delegate that resolves a value from when data the |
| System.Byte[] | checksum | The checksum that defines the data integrity of |
| System.Action<ContentTimeBasedOptions> | setup | The ContentTimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |
ToCacheableObjectResult<T>(T, Func<T, DateTime>, Func<T, Byte[]>, Action<ContentTimeBasedOptions>)
Encapsulates the specified instance within a ContentTimeBasedObjectResult<T>.
Declaration
public static ICacheableObjectResult ToCacheableObjectResult<T>(this T instance, Func<T, DateTime> createdProvider, Func<T, byte[]> checksumProvider, Action<ContentTimeBasedOptions> setup = null)
Parameters
| Type | Name | Description |
|---|---|---|
| T | instance | The instance to make cacheable. |
| System.Func<T, System.DateTime> | createdProvider | The function delegate that resolves a value from when data the |
| System.Func<T, System.Byte[]> | checksumProvider | The function delegate that resolves a checksum that defines the data integrity of |
| System.Action<ContentTimeBasedOptions> | setup | The ContentTimeBasedOptions which need to be configured. |
Returns
| Type | Description |
|---|---|
| ICacheableObjectResult | An ICacheableObjectResult implementation. |
Type Parameters
| Name | Description |
|---|---|
| T | The type of the object to make cacheable. |