ConfigExtensions.

TryInvoke<T>(ContextConfig, IExecutionContext) Method

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 ContextConfig config, IExecutionContext context)

Type Parameters

Name Description
T The desired result type.

Parameters

Name Type Description
config ContextConfig The delegate.
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.
GitHub