AssemblyCacheBustingOptions Class
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Configuration
- Assemblies
- Cuemon.Extensions.AspNetCore.dll
Specifies options that is related to AssemblyCacheBustingOptions operations.
public class AssemblyCacheBustingOptions : CacheBustingOptions, IParameterObject
- Inheritance
-
AssemblyCacheBustingOptions
- Implements
- Inherited Members
- Extension Methods
Examples
The following example demonstrates how to configure AssemblyCacheBustingOptions for a reproducible cache-busting version that is derived from a known assembly and hash algorithm.
using System;
using Cuemon;
using Cuemon.Extensions.AspNetCore.Configuration;
using Cuemon.Security.Cryptography;
using Microsoft.Extensions.Options;
namespace DocfxExamples;
public class AssemblyCacheBustingOptionsExample
{
public static void Demonstrate()
{
var options = Options.Create(new AssemblyCacheBustingOptions
{
Assembly = typeof(AssemblyCacheBustingOptionsExample).Assembly,
Algorithm = UnkeyedCryptoAlgorithm.Sha256,
PreferredCasing = CasingMethod.UpperCase,
ReadByteForByteChecksum = true
});
var cacheBusting = new AssemblyCacheBusting(options);
Console.WriteLine(cacheBusting.Version);
}
}
Constructors
| Name | Description |
|---|---|
| AssemblyCacheBustingOptions() | Initializes a new instance of the AssemblyCacheBustingOptions class. |
Properties
| Name | Description |
|---|---|
| Algorithm | Gets or sets the hash algorithm to use for the computation of Assembly. |
| Assembly | Gets or sets the assembly that should be used as reference for the cache-busting. |
| ReadByteForByteChecksum | Gets or sets a value indicating whether the Assembly will be read byte-for-byte when computing the checksum. |