Ejemplo n.º 1
0
        public OABDownloadLogLine(List <string> header, LogSourceLine line) : base(line)
        {
            this.data = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase);
            IList <string> columns = line.GetColumns();

            if (columns.Count < header.Count)
            {
                base.RaiseException(string.Format("Headers collection provided does not match the schema. Header count: {0}, Columns count: {1}", header.Count, columns.Count), new object[0]);
            }
            if (line.Timestamp != null)
            {
                this.timestamp = line.Timestamp.Value;
            }
            else
            {
                base.RaiseException("First column of line should be a well-formatted DateTime, column-value: {0}", new object[]
                {
                    columns[0]
                });
            }
            for (int i = 0; i < header.Count; i++)
            {
                this.data[header[i]] = columns[i];
            }
        }