MetadataConversionExtensions.

Dynamic(IMetadata, string, Object) Method

Summary

Gets the value associated with the specified key as a dynamic object. This is equivalent to calling as dynamic to cast the value.

Syntax

public static dynamic Dynamic(this IMetadata metadata, string key, Object defaultValue = null)

Parameters

Name Type Description
metadata IMetadata The metadata containing the value.
key string The key of the value to get.
defaultValue Object The default value to use if either the key is not found or the underlying value is null (since the dynamic runtime binder can't bind null values).

Return Value

Type Description
dynamic A dynamic value for the specific key or default value.
GitHub