public IAsyncResult send_Say(AsyncCallback callback, object state, Ruyi.SDK.Speech.VoiceCommand command) { oprot_.WriteMessageBegin(new TMessage("Say", TMessageType.Call, seqid_)); Say_args args = new Say_args(); args.Command = command; args.Write(oprot_); oprot_.WriteMessageEnd(); return(oprot_.Transport.BeginFlush(callback, state)); }
public Ruyi.SDK.Speech.SpeechResult Say(Ruyi.SDK.Speech.VoiceCommand command) { #if !SILVERLIGHT send_Say(command); return(recv_Say()); #else var asyncResult = Begin_Say(null, null, command); return(End_Say(asyncResult)); #endif }
public async Task <Ruyi.SDK.Speech.SpeechResult> SayAsync(Ruyi.SDK.Speech.VoiceCommand command) { Ruyi.SDK.Speech.SpeechResult retval; retval = await Task.Run(() => { return(Say(command)); }); return(retval); }
public void send_Say(Ruyi.SDK.Speech.VoiceCommand command) { oprot_.WriteMessageBegin(new TMessage("Say", TMessageType.Call, seqid_)); Say_args args = new Say_args(); args.Command = command; args.Write(oprot_); oprot_.WriteMessageEnd(); oprot_.Transport.Flush(); }
public void send_Say(Ruyi.SDK.Speech.VoiceCommand command) #endif { oprot_.WriteMessageBegin(new TMessage("Say", TMessageType.Call, seqid_)); Say_args args = new Say_args(); args.Command = command; args.Write(oprot_); oprot_.WriteMessageEnd(); #if SILVERLIGHT return(oprot_.Transport.BeginFlush(callback, state)); #else oprot_.Transport.Flush(); #endif }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Command = new Ruyi.SDK.Speech.VoiceCommand(); await Command.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } finally { iprot.DecrementRecursionDepth(); } }
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Command = new Ruyi.SDK.Speech.VoiceCommand(); Command.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); } finally { iprot.DecrementRecursionDepth(); } }
public async Task <Ruyi.SDK.Speech.SpeechResult> SayAsync(Ruyi.SDK.Speech.VoiceCommand command, CancellationToken cancellationToken) { await OutputProtocol.WriteMessageBeginAsync(new TMessage("Say", TMessageType.Call, SeqId), cancellationToken); var args = new SayArgs(); args.Command = command; await args.WriteAsync(OutputProtocol, cancellationToken); await OutputProtocol.WriteMessageEndAsync(cancellationToken); await OutputProtocol.Transport.FlushAsync(cancellationToken); var msg = await InputProtocol.ReadMessageBeginAsync(cancellationToken); if (msg.Type == TMessageType.Exception) { var x = await TApplicationException.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); throw x; } var result = new SayResult(); await result.ReadAsync(InputProtocol, cancellationToken); await InputProtocol.ReadMessageEndAsync(cancellationToken); if (result.__isset.success) { return(result.Success); } throw new TApplicationException(TApplicationException.ExceptionType.MissingResult, "Say failed: unknown result"); }
public IAsyncResult Begin_Say(AsyncCallback callback, object state, Ruyi.SDK.Speech.VoiceCommand command) { return(send_Say(callback, state, command)); }
public IAsyncResult send_Say(AsyncCallback callback, object state, Ruyi.SDK.Speech.VoiceCommand command)
public Ruyi.SDK.Speech.SpeechResult Say(Ruyi.SDK.Speech.VoiceCommand command) { var asyncResult = Begin_Say(null, null, command); return(End_Say(asyncResult)); }