コード例 #1
0
 void ConversationContextDataReceived(object sender, ContextEventArgs e)
 {
     if (e.ContextDataType.Equals(WireHelpers.Response, StringComparison.OrdinalIgnoreCase))
     {
         ProcessResponse(WireHelpers.ParseResponse(e.ContextData));
     }
 }
コード例 #2
0
        public void Process()
        {
            bool      succeeded = false;
            Exception exception = null;

            try
            {
                Conversation.BeginSendContextData(ApplicationId, WireHelpers.Request, WireHelpers.Serialize(Request), RequestCompleted, null);
                succeeded = true;
            }
            catch (Exception ex)
            {
                exception = ex;
            }
            finally
            {
                if (!succeeded)
                {
                    if (exception == null)
                    {
                        exception = new Exception("Request failed with unhandled exception.");
                    }
                    Complete(exception, true);
                }
            }
        }