//public override IFileReader ImportSource //{ // get // { // if (String.IsNullOrEmpty(base.ImportFilePath)) // throw new iSabayaException(Messages.FileFormatFilePathIsNotDefined); // if (null == base.ImportSource) // { // base.ImportSource = new ExcelFileReader(base.ImportFilePath); // } // return base.ImportSource; // } // protected set { base.ImportSource = value; } //} //public override IFileWriter ExportDestination //{ // get // { // if (null == base.ExportDestination) // { // if (String.IsNullOrEmpty(base.ExportFilePath)) // throw new iSabayaException("The file path is not defined."); // base.ExportDestination = new ExcelFileWriter(base.ExportFilePath); // } // return base.ExportDestination; // } // protected set { base.ExportDestination = value; } //} #region ObjectFileMapping implementation public override void Export(string filePath, T t) { ExcelFileWriter writer = new ExcelFileWriter(filePath); if (null != this.OnExportStartHandler) { this.OnExportStartHandler(filePath, t); } this.RecordMapping.Target = t; this.RecordMapping.Export(writer); if (null != this.OnExportFinishHandler) { this.OnExportFinishHandler(filePath, t); } writer.Close(); }