ChecksumBuilderDecoratorExtensions Class
Definition
- Namespace
- Cuemon.AspNetCore.Http.Headers
- Assemblies
- Cuemon.AspNetCore.dll
Extension methods for the ChecksumBuilder class hidden behind the IDecorator<T> interface.
public static class ChecksumBuilderDecoratorExtensions
- Inheritance
-
ChecksumBuilderDecoratorExtensions
Examples
The following example demonstrates how to create an EntityTagHeaderValue from a ChecksumBuilder using the decorator pattern.
using System;
using Cuemon;
using Cuemon.Data.Integrity;
using Cuemon.Security;
namespace Cuemon.AspNetCore.Http.Headers;
public static class ChecksumBuilderDecoratorExtensionsExample
{
public static void Demonstrate()
{
var builder = new ChecksumBuilder(() => HashFactory.CreateFnv128());
var entityTag = Decorator.Enclose(builder).ToEntityTagHeaderValue(isWeak: true);
Console.WriteLine(entityTag.ToString());
}
}
Methods
| Name | Description |
|---|---|
| ToEntityTagHeaderValue(IDecorator<ChecksumBuilder>, bool) | Creates an EntityTagHeaderValue from the enclosed ChecksumBuilder of the |
See Also
IDecorator<T>
Decorator<T>