public async void Concatenate()
        {
            if (isConnected && m_consumer != null)
            {
                if (String.IsNullOrWhiteSpace(m_inStr1) || String.IsNullOrWhiteSpace(m_inStr2))
                {
                    UpdateStatus("Input strings cannot be empty", NotifyType.ErrorMessage);
                }
                else
                {
                    // Call the Cat method with the input strings arguments.
                    SecureInterfaceCatResult catResult = await m_consumer.CatAsync(m_inStr1, m_inStr2);

                    if (catResult.Status == AllJoynStatus.Ok)
                    {
                        UpdateStatus(String.Format("Concatenation Ouput : {0}", catResult.outStr), NotifyType.StatusMessage);
                    }
                    else
                    {
                        UpdateStatus(String.Format("Error : {0}", catResult.Status.ToString()), NotifyType.ErrorMessage);
                    }
                }
            }
            else
            {
                UpdateStatus("Client not connected.", NotifyType.ErrorMessage);
            }
        }
Exemple #2
0
        private async void ConcatenateAsync()
        {
            if (m_consumer != null)
            {
                if (String.IsNullOrWhiteSpace(InputString1) || String.IsNullOrWhiteSpace(InputString2))
                {
                    UpdateStatusAsync("Input strings cannot be empty.", NotifyType.ErrorMessage);
                }
                else
                {
                    // Call the Cat method with the input strings arguments.
                    SecureInterfaceCatResult catResult = await m_consumer.CatAsync(InputString1, InputString2);

                    if (catResult.Status == AllJoynStatus.Ok)
                    {
                        UpdateStatusAsync(string.Format("Concatenation output : \"{0}\".", catResult.OutStr), NotifyType.StatusMessage);
                    }
                    else
                    {
                        UpdateStatusAsync(string.Format("AllJoyn Error : 0x{0:X}.", catResult.Status), NotifyType.ErrorMessage);
                    }
                }
            }
            else
            {
                UpdateStatusAsync("Client not connected.", NotifyType.ErrorMessage);
            }
        }