Exemplo n.º 1
0
        /// <summary>
        /// Initiates an operation to establish a new im call with the contact center service.
        /// </summary>
        /// <param name="webConversation">Web conversation.</param>
        /// <param name="message">Message.</param>
        /// <param name="callback">Callback method.</param>
        /// <param name="state">State.</param>
        /// <returns>Async result reference.</returns>
        public IAsyncResult BeginSendImMessage(WebConversation webConversation, string message, AsyncCallback callback, object state)
        {
            //Create new request.
            SendInstantMessageRequest request = new SendInstantMessageRequest();

            request.RequestId    = ContactCenterService.GenerateNewRequestId();
            request.Conversation = webConversation;
            request.Message      = message;
            return(((IContactCenterWcfService)this.WcfClient).BeginSendInstantMessage(request, callback, state));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initiates an operation to establish a new im call with the contact center service.
        /// </summary>
        /// <param name="webConversation">Web conversation.</param>
        /// <param name="destination">Destination.</param>
        /// <param name="callback">Callback method.</param>
        /// <param name="state">State.</param>
        /// <returns>Async result reference.</returns>
        public IAsyncResult BeginEstablishImCall(WebConversation webConversation, string destination, AsyncCallback callback, object state)
        {
            //Create new request.
            EstablishInstantMessagingCallRequest request = new EstablishInstantMessagingCallRequest();

            request.RequestId    = ContactCenterService.GenerateNewRequestId();
            request.Conversation = webConversation;
            request.Destination  = destination;
            return(((IContactCenterWcfService)this.WcfClient).BeginEstablishInstantMessagingCall(request, callback, state));
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initiates an operation to establish a new av call with the contact center service.
        /// </summary>
        /// <param name="webConversation">Web conversation.</param>
        /// <param name="destination">Destination.</param>
        /// <param name="callback">Callback method.</param>
        /// <param name="state">State.</param>
        /// <returns>Async result reference.</returns>
        public IAsyncResult BeginEstablishAvCall(WebConversation webConversation, string destination, string callbackPhoneNumber, AsyncCallback callback, object state)
        {
            //Create new request.
            EstablishAudioVideoCallRequest request = new EstablishAudioVideoCallRequest();

            request.RequestId           = ContactCenterService.GenerateNewRequestId();
            request.Conversation        = webConversation;
            request.Destination         = destination;
            request.CallbackPhoneNumber = callbackPhoneNumber;
            return(((IContactCenterWcfService)this.WcfClient).BeginEstablishAudioVideoCall(request, callback, state));
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initiates an operation to establish a new conversation with the contact center service.
        /// </summary>
        /// <param name="localParticipant">Local participant name. Can be null or empty.</param>
        /// <param name="subject">Subject of the conversation. Can be null or empty.</param>
        /// <param name="conversationContext">Conversation context. Can be null or empty.</param>
        /// <param name="callback">Callback method.</param>
        /// <param name="state">State.</param>
        /// <returns>Async result reference.</returns>
        public IAsyncResult BeginEstablishConversation(string localParticipant, string subject, Dictionary <string, string> conversationContext, AsyncCallback callback, object state)
        {
            //Create new request.
            CreateConversationRequest request = new CreateConversationRequest();

            request.RequestId           = ContactCenterService.GenerateNewRequestId();
            request.DisplayName         = localParticipant;
            request.ConversationSubject = subject;
            request.ConversationContext = conversationContext;
            return(((IContactCenterWcfService)this.WcfClient).BeginCreateConversation(request, callback, state));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Session terminated.
        /// </summary>
        /// <param name="webConversation">Web conversation.</param>
        public void SessionTerminated(WebConversation webConversation)
        {
            if (webConversation == null)
            {
                throw new ArgumentNullException("webConversation", "Web conversation cannot be null");
            }
            SessionTerminationRequest request = new SessionTerminationRequest();

            request.RequestId     = ContactCenterService.GenerateNewRequestId();
            request.Conversations = new System.Collections.ObjectModel.ObservableCollection <WebConversation>();
            request.Conversations.Add(webConversation);
            ((IContactCenterWcfService)this.WcfClient).BeginSessionTerminated(request, this.SessionTerminatedCompleted, null);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initiates a conversation termination operation.
        /// </summary>
        /// <param name="webConversation">Web conversation.</param>
        /// <param name="asyncCallback">Async callback.</param>
        /// <param name="state">State.</param>
        /// <returns>Async result reference</returns>
        public IAsyncResult BeginTerminateConversation(WebConversation webConversation, AsyncCallback callback, object state)
        {
            //Create new request.
            if (webConversation == null)
            {
                throw new ArgumentNullException("webConversation", "Web conversation cannot be null");
            }
            TerminateConversationRequest request = new TerminateConversationRequest();

            request.RequestId    = ContactCenterService.GenerateNewRequestId();
            request.Conversation = webConversation;
            return(((IContactCenterWcfService)this.WcfClient).BeginTerminateConversation(request, callback, state));
        }