Class TimeBasedObjectResultOptions<T>
- Namespace
- Cuemon.AspNetCore.Mvc
- Assembly
- Cuemon.AspNetCore.Mvc.dll
Specifies options that is related to the ICacheableObjectResult interface.
public class TimeBasedObjectResultOptions<T> : ITimeBasedObjectResultOptions<T>, IValidatableParameterObject, IParameterObject
Type Parameters
T
- Inheritance
-
TimeBasedObjectResultOptions<T>
- Implements
Constructors
TimeBasedObjectResultOptions()
Initializes a new instance of the TimeBasedObjectResultOptions<T> class.
public TimeBasedObjectResultOptions()
Properties
ChangedTimestampProvider
Gets or sets the function delegate that resolves a timestamp from when the specified T
was last modified, expressed as the Coordinated Universal Time (UTC).
public Func<T, DateTime> ChangedTimestampProvider { get; set; }
Property Value
- Func<T, DateTime>
The function delegate that resolves a timestamp from when the specified
T
was last modified.
TimestampProvider
Gets or sets the function delegate that resolves a timestamp from when the specified T
was first created, expressed as the Coordinated Universal Time (UTC).
public Func<T, DateTime> TimestampProvider { get; set; }
Property Value
- Func<T, DateTime>
The function delegate that resolves a timestamp from when the specified
T
was first created.
Methods
ValidateOptions()
Determines whether the public read-write properties of this instance are in a valid state.
public void ValidateOptions()
Remarks
This method is expected to throw exceptions when one or more conditions fails to be in a valid state.
Exceptions
- InvalidOperationException
TimestampProvider cannot be null.