private static string BuildExtraDataString(UserContext userContext, Datapoint contextHeader, Datapoint[] context, List <ClientWatsonDatapointHandler.ClientWatsonReportLogEvent> eventsToLog)
        {
            string        text          = ClientWatsonDatapointHandler.FormatClientLogDataForWatson(contextHeader, context);
            StringBuilder stringBuilder = new StringBuilder(text.Length + "------------------------ClientLogs------------------------".Length + "---------------Watson events on this session--------------".Length);
            string        text2         = (userContext != null) ? userContext.LogEventCommonData.Features : null;
            string        text3         = (userContext != null) ? userContext.LogEventCommonData.Flights : null;

            stringBuilder.AppendLine("-------------------Features & Flights---------------------");
            stringBuilder.Append("Features: ");
            stringBuilder.AppendLine(string.IsNullOrEmpty(text2) ? "None" : text2);
            stringBuilder.Append("Flights: ");
            stringBuilder.AppendLine(string.IsNullOrEmpty(text3) ? "None" : text3);
            stringBuilder.AppendLine();
            stringBuilder.AppendLine("---------------Watson events on this session--------------");
            if (userContext != null)
            {
                foreach (string value in userContext.GetClientWatsonHistory())
                {
                    stringBuilder.AppendLine(value);
                    stringBuilder.AppendLine();
                }
            }
            string[] array = new string[eventsToLog.Count];
            int      num   = 0;

            foreach (ClientWatsonDatapointHandler.ClientWatsonReportLogEvent clientWatsonReportLogEvent in eventsToLog)
            {
                OwaClientLogger.AppendToLog(clientWatsonReportLogEvent);
                string text4 = string.Format("{0}{1}{2}", clientWatsonReportLogEvent, Environment.NewLine, clientWatsonReportLogEvent.GetWatsonUrl());
                array[num++] = text4;
                stringBuilder.AppendLine(text4);
                stringBuilder.AppendLine();
            }
            if (userContext != null)
            {
                Array.Sort <string>(array);
                userContext.SaveToClientWatsonHistory(array);
            }
            stringBuilder.AppendLine();
            stringBuilder.AppendLine("------------------------ClientLogs------------------------");
            stringBuilder.AppendLine(text);
            return(stringBuilder.ToString());
        }