Ensures that the config is not null and doesn't require a document and throws
System.ArgumentNullException
or System.ArgumentException
if it is.
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. |