EnsureNonDocument<TConfig>(TConfig, string) Method
Ensures that the config is not null and doesn't require a document and throws System.ArgumentNullException or System.ArgumentException if it is.
Namespace
Statiq.Common
Containing Type
ConfigExtensions

Syntax

public static TConfig EnsureNonDocument<TConfig>(this TConfig config, string paramName = null) 
    where TConfig : IConfig

Type Parameters

Name Description
TConfig The config type.

Parameters

Name Type Description
config TConfig The config.
paramName string The name of the config parameter.

Return Value

Type Description
TConfig The config if non-null and non-document.