IConventionContext Interface

Summary

The base context marker interface to define this as a context
IConventionContext

Syntax

public interface IConventionContext

Attributes

Type Description
NullableContextAttribute
DefaultMemberAttribute

Properties

Name Value Summary
Logger ILogger
Properties IDictionary<object, object>
A central location for sharing state between components during the convention building process.
this[object] object
Allows a context to hold additional information for conventions to consume such as configuration objects

Extension Methods

Name Value Summary
Get<T>(string) T
Get a value by key from the context
Get<T>() T
Get a value by type from the context
GetOrAdd<T>(Func<T>) T
Get a value by key from the context
GetOrAdd<T>(string, Func<T>) T
Get a value by key from the context
IsUnitTestHost() bool
Check if this is a test host (to allow conventions to behave differently during unit tests)
Set<T>(string, T) void
Get a value by type from the context
Set<T>(T) void
Get a value by type from the context
SetBackingValue<IConventionContext, TV>(Expression<Func<IConventionContext, TV>>, TV) T
Sets the backing value.
With<IConventionContext, TKey, TField>(Dictionary<TKey, TField>, IDictionary<TKey, TField>) TBuilder
Adds the specified dictionary to the provided dictionary.