Summary
Get a value by key from the context
- Assembly
- Rocket
.Surgery .Conventions .Abstractions .dll - Namespace
- Rocket
.Surgery .Conventions - Containing Type
- Convention
Context Extensions
Syntax
public static T GetOrAdd<T>(this IConventionContext context, Func<T> factory) where T : class
Attributes
| Type | Description |
|---|---|
| NotNullAttribute |
Type Parameters
| Name | Description |
|---|---|
| T |
Parameters
| Name | Type | Description |
|---|---|---|
| context | IConventionContext | The context |
| factory | Func |
The factory method in the event the type is not found |
Return Value
| Type | Description |
|---|---|
| T | T. |
