private EnsureApiSentences ( IEnumerable |
||
sentences | IEnumerable |
|
Результат | IEnumerable |
private IEnumerable<ApiSentence> EnsureApiSentences(IEnumerable<ITikSentence> sentences)
{
if (sentences.Any(sentence => !(sentence is ApiSentence)))
throw new InvalidOperationException("ApiCommand expects ApiSentence as result from ApiConnection.");
return sentences.Cast<ApiSentence>();
}