CakeHostExtensions.

UseContext<TContext>(CakeHost) Method

Summary

Registers the specified context type. Only the last registration will be used.
Namespace
Cake.Frosting
Containing Type
CakeHostExtensions

Syntax

public static CakeHost UseContext<TContext>(this CakeHost host) 
    where TContext : class, IFrostingContext

Type Parameters

Name Description
TContext The type of the context to register.

Parameters

Name Type Description
host CakeHost The CakeHost to configure.

Return Value

Type Description
CakeHost The same CakeHost instance so that multiple calls can be chained.