Create a new ISpecification<(Of <(<'TCandidate>)>)> that is satisfied by all the TOther
that are TCandidate and satisfy the current specification.
Assembly: Epic.Prelude
Declaration Syntax
C# |
ISpecification<TOther> OfType<TOther>() where TOther : class
Generic Template Parameters
- TOther
- The type of objects that we want to check against the current specification. It must either abstract or extend TCandidate.
Return Value
A new ISpecification<(Of <(<'TCandidate>)>)> that is satisfied by all the TOther
that are TCandidate and satisfy the current specification.
Exceptions
Exception | Condition |
---|---|
InvalidCastException | TOther does not abstract or specialize TCandidate. |
InvalidOperationException | TOther is Object. |