Exemple #1
0
        public string   Generate(IEnumerable <Row> rows, List <ILogExportSource> usedOutputs, LogsExporterDrawer.ExportSettings settings)
        {
            this.buffer = Utility.GetBuffer();

            int i = 0;

            foreach (Row row in rows)
            {
                if (i > 0)
                {
                    this.buffer.Append(Environment.NewLine);
                }

                for (int j = 0; j < usedOutputs.Count; j++)
                {
                    string key = usedOutputs[j].GetKey();

                    this.buffer.Append("<" + key + ">");
                    this.buffer.Append(usedOutputs[j].GetValue(row, i));
                    this.buffer.Append("</" + key + ">");
                }

                if (settings.callbackLog != null)
                {
                    settings.callbackLog(this, row);
                }

                ++i;
            }

            return(Utility.ReturnBuffer(this.buffer));
        }
Exemple #2
0
        public string   Generate(IEnumerable <Row> rows, List <ILogExportSource> usedOutputs, LogsExporterDrawer.ExportSettings settings)
        {
            this.buffer = Utility.GetBuffer();

            string dataSeparator = this.dataSeparator.Replace("\\t", "\t").Replace("\\n", "\n").Replace("\\r", "\r");
            string logSeparator  = this.logSeparator.Replace("\\t", "\t").Replace("\\n", "\n").Replace("\\r", "\r");
            int    i             = 0;

            foreach (Row row in rows)
            {
                if (i > 0)
                {
                    this.buffer.Append(logSeparator);
                }

                for (int j = 0; j < usedOutputs.Count; j++)
                {
                    if (j > 0)
                    {
                        this.buffer.Append(dataSeparator);
                    }

                    this.buffer.Append(usedOutputs[j].GetValue(row, i));
                }

                if (settings.callbackLog != null)
                {
                    settings.callbackLog(this, row);
                }

                ++i;
            }

            return(Utility.ReturnBuffer(buffer));
        }