Summary
Attempts to invoke the delegate and returns a default value of T if the conversion fails.
- Assembly
- Wyam
.Common .dll - Namespace
- Wyam
.Common .Configuration - Containing Type
- ConfigExtensions
Syntax
public static T TryInvoke<T>(this DocumentConfig config, IDocument document, IExecutionContext context)
Type Parameters
Name | Description |
---|---|
T | The desired result type. |
Parameters
Name | Type | Description |
---|---|---|
config | DocumentConfig | The delegate. |
document | IDocument | The document. |
context | IExecutionContext | The execution context. |
Return Value
Type | Description |
---|---|
T | A typed result from invoking the delegate, or the default value of T if the conversion fails. |