Class SingleOrDefaultTypeParser<TOpt, T>
Returns the default value for no result and refuses a second result.
public sealed class SingleOrDefaultTypeParser<TOpt, T> : BaseSingleTypeParser<TOpt, T>, ITypeParser<TOpt>, ITypeParser, IDisposable where TOpt : struct, IWrapping<TOpt, T>
Type Parameters
TOptT
- Inheritance
-
BaseTypeParser<TOpt>BaseSingleTypeParser<TOpt, T>SingleOrDefaultTypeParser<TOpt, T>
- Implements
-
ITypeParser<TOpt>
- Inherited Members
- Extension Methods
Constructors
SingleOrDefaultTypeParser(ITypeParser<T>)
Returns the default value for no result and refuses a second result.
public SingleOrDefaultTypeParser(ITypeParser<T> elementParser)
Parameters
elementParserITypeParser<T>
Methods
Default()
The value to return when the result has no row, an empty collection or optional, for instance.
public override TOpt Default()
Returns
- TOpt