コード例 #1
0
        /// <summary>
        /// Create a task of speech statement activity.
        /// </summary>
        /// <returns></returns>
        protected Task <ActivityResult> Create_SpeechStatement()
        {
            Task <ActivityResult> task = null;

            try
            {
                SpeechStatementActivity speechStatementActivity = new SpeechStatementActivity(this.AudioVideoCall, this.MainPrompt);
                return(speechStatementActivity.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #2
0
        /// <summary>
        /// Create task of speech statement activity to speak please hold message.
        /// </summary>
        /// <returns></returns>
        public Task <ActivityResult> CreateSpeechActivity_SpeakPleaseHold()
        {
            Task <ActivityResult> task = null;

            try
            {
                SpeechStatementActivity speakPleaseHold = new SpeechStatementActivity(this.Call, this.PleaseHoldPrompt);
                return(speakPleaseHold.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #3
0
        /// <summary>
        /// Create task of speech statement activity to speak welcome message.
        /// </summary>
        /// <returns></returns>
        public Task <ActivityResult> CreateSpeechActivity_SpeakWelcome()
        {
            Task <ActivityResult> task = null;

            try
            {
                SpeechStatementActivity speakWelcome = new SpeechStatementActivity(this.Call, this.WelcomeMessage);
                return(speakWelcome.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #4
0
ファイル: GetBuddyDialog.cs プロジェクト: mujiansu/Lync
        /// <summary>
        /// Creates a task of speech statement activity to speak statement as no contacts are loaded.
        /// </summary>
        /// <returns></returns>
        protected Task <ActivityResult> Create_SpeechStmtNoContacts()
        {
            Task <ActivityResult> task = null;

            try
            {
                SpeechStatementActivity stmtSorryNoContacts = new SpeechStatementActivity(this.avCall, this.Configuration.NoContactsStatement.MainPrompt);
                return(stmtSorryNoContacts.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #5
0
ファイル: DialupDialog.cs プロジェクト: mujiansu/Lync
        /// <summary>
        /// Creates a task of speech statement activity to confirm the number.
        /// </summary>
        /// <returns></returns>
        protected Task <ActivityResult> Create_StmtConfirmNumber()
        {
            Task <ActivityResult> task = null;

            try
            {
                SpeechStatementActivity confirmNumberSpeech = new SpeechStatementActivity(this.AudioVideoCall, string.Empty);
                confirmNumberSpeech.MainPromptAppendText(this.Configuration.NumberConfirmationStatement.MainPrompt);
                string ssml = string.Format(CultureInfo.InvariantCulture, "<prosody rate=\"slow\">{0}</prosody>", this.Number);
                confirmNumberSpeech.MainPromptAppendSssml(ssml);
                return(confirmNumberSpeech.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #6
0
ファイル: CallbackDialog.cs プロジェクト: mujiansu/Lync
        /// <summary>
        /// Creates a task of speech statement activity to speak confirmation about callback.
        /// </summary>
        /// <returns></returns>
        protected Task <ActivityResult> Create_stmtCallbackcnfrm()
        {
            Task <ActivityResult> task = null;

            try
            {
                string confirmationPrompt = string.Format(
                    CultureInfo.InvariantCulture,
                    isSuccessinCallback ? this.Configuration.SetCallbackSucceededStatement.MainPrompt : this.Configuration.SetCallbackFailedStatement.MainPrompt,
                    this.ContactInfo.DisplayName);

                SpeechStatementActivity stmtCallbackcnfrm = new SpeechStatementActivity(this.AudioVideoCall, confirmationPrompt);
                return(stmtCallbackcnfrm.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }
コード例 #7
0
ファイル: CallbackDialog.cs プロジェクト: mujiansu/Lync
        /// <summary>
        ///   Creates a task of speech statement activity to speak connecting user statement
        /// </summary>
        /// <returns></returns>
        protected Task <ActivityResult> Create_StmtConnectingToUser()
        {
            Task <ActivityResult> task = null;

            try
            {
                string prompt =
                    string.Format(
                        CultureInfo.InvariantCulture,
                        this.Configuration.ConnectingToUserStatement.MainPrompt,
                        this.ContactInfo.DisplayName);

                SpeechStatementActivity stmtConnectingToUser = new SpeechStatementActivity(this.AudioVideoCall, prompt);
                return(stmtConnectingToUser.ExecuteAsync());
            }
            catch (ArgumentNullException exception)
            {
                base.Exception = exception;
            }
            return(task);
        }