/// <summary> /// Writes the specified record to this <c>CsvWriter</c>. /// </summary> /// <remarks> /// This method writes a single data record to this <c>CsvWriter</c>. The <see cref="RecordNumber"/> property is incremented upon successfully writing /// the record. /// </remarks> /// <param name="headerRecord"> /// The record to be written. /// </param> public void WriteHeaderRecord(HeaderRecord headerRecord) { headerRecord.AssertNotNull("headerRecord"); ExceptionHelper.ResolveAndThrowIf(m_passedFirstRecord, "WriteHeaderRecord.passed-first-record"); WriteHeaderRecord(headerRecord.Values); }
/// <summary> /// Constructs an instance of <c>DataRecord</c> with the header and values specified, optionally making the values in this data record /// read-only. /// </summary> /// <param name="headerRecord"> /// The header record for this CSV record, or <see langword="null"/> if no header record applies. /// </param> /// <param name="values"> /// The values for this CSV record. /// </param> /// <param name="readOnly"> /// If <see langword="true"/>, the values in this data record are read-only. /// </param> public DataRecord(HeaderRecord headerRecord, IEnumerable <string> values, bool readOnly) : base(values, readOnly) { m_headerRecord = headerRecord; }
/// <summary> /// Constructs an instance of <c>DataRecord</c> with the header specified. /// </summary> /// <param name="headerRecord"> /// The header record for this CSV record, or <see langword="null"/> if no header record applies. /// </param> public DataRecord(HeaderRecord headerRecord) { m_headerRecord = headerRecord; }
/// <summary> /// Constructs an instance of <c>DataRecord</c> with the header and values specified. /// </summary> /// <param name="headerRecord"> /// The header record for this CSV record, or <see langword="null"/> if no header record applies. /// </param> /// <param name="values"> /// The values for this CSV record. /// </param> public DataRecord(HeaderRecord headerRecord, IEnumerable <string> values) : this(headerRecord, values, false) { }