Ensures that the config is not null and throws
System.ArgumentNullException
if it is.
- Namespace
- Statiq
.Common - Containing Type
- ConfigExtensions
Syntax
public static TConfig EnsureNonNull<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. |