private ApiDoneSentence EnsureDoneResponse(ApiSentence responseSentence) { ApiDoneSentence doneSentence = responseSentence as ApiDoneSentence; if (doneSentence == null) { throw new TikConnectionException("!done sentence expected as result.", this, responseSentence); } return(doneSentence); }
public void ExecuteNonQuery() { EnsureConnectionSet(); EnsureNotRunning(); _isRuning = true; try { string[] commandRows = ConstructCommandText(TikCommandParameterFormat.NameValue); IEnumerable <ApiSentence> response = EnsureApiSentences(_connection.CallCommandSync(commandRows)); ThrowPossibleResponseError(response.ToArray()); ApiSentence responseSentence = EnsureSingleResponse(response); EnsureDoneResponse(responseSentence); } finally { _isRuning = false; } }
private ApiDoneSentence EnsureDoneResponse(ApiSentence responseSentence) { ApiDoneSentence doneSentence = responseSentence as ApiDoneSentence; if (doneSentence == null) throw new TikConnectionException("!done sentence expected as result.", this, responseSentence); return doneSentence; }