Table of Contents

ChecksumBuilderDecoratorExtensions Class

Definition

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.

// Program.cs
using System;
using Cuemon;
using Cuemon.Data.Integrity;
using Cuemon.Security;
using Cuemon.AspNetCore.Http.Headers;

        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 decorator.

See Also