public Task<Tuple<bool, AVIMAudioMessage>> SendAudioMessageAsync(AVIMAudioMessage avAudioMessage) { return InternalExtensions.OnSuccess<Tuple<bool, AVIMFileMessageBase>, Tuple<bool, AVIMAudioMessage>>(this.SendFileMessageAsync((AVIMFileMessageBase)avAudioMessage), (Func<Task<Tuple<bool, AVIMFileMessageBase>>, Tuple<bool, AVIMAudioMessage>>)(x => new Tuple<bool, AVIMAudioMessage>(x.Result.Item1, avAudioMessage))); }
private async void SendAudio() { StorageFolder local = Windows.Storage.ApplicationData.Current.LocalFolder; var AudioFile = await local.OpenStreamForReadAsync(recordAudioFileName); AVIMAudioMessage audioMessage = new AVIMAudioMessage(recordAudioFileName, AudioFile); await conversation.SendAudioMessageAsync(audioMessage); }