HttpLastModifiedHeaderFilter Class
Definition
- Namespace
- Cuemon.AspNetCore.Mvc.Filters.Cacheable
- Assemblies
- Cuemon.AspNetCore.Mvc.dll
A filter that applies a HTTP Last-Modified header.
public class HttpLastModifiedHeaderFilter : IConfigurable<HttpLastModifiedHeaderOptions>, ICacheableAsyncResultFilter, IAsyncResultFilter, IFilterMetadata
- Inheritance
-
objectHttpLastModifiedHeaderFilter
- Implements
Examples
The following example shows how can be added to a cacheable pipeline and inspected directly.
using System;
using Cuemon.AspNetCore.Mvc.Filters.Cacheable;
namespace MyApp.Examples;
public static class HttpLastModifiedHeaderFilterExample
{
public static void Demonstrate()
{
var filter = new HttpLastModifiedHeaderFilter();
var options = new HttpCacheableOptions();
options.Filters.Add(filter);
Console.WriteLine(filter.Options.HasLastModifiedProvider);
Console.WriteLine(options.Filters.Count);
}
}
Constructors
| Name | Description |
|---|---|
| HttpLastModifiedHeaderFilter(Action<HttpLastModifiedHeaderOptions>) | Initializes a new instance of the HttpLastModifiedHeaderFilter class. |
Properties
| Name | Description |
|---|---|
| Options | Gets the configured options of this instance. |
Methods
| Name | Description |
|---|---|
| OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) | Called asynchronously before the action result. |