/// <summary>Create a new instance of the class.</summary> /// <param name="provider">The <see cref="DataLink.DataStorage"/> used to performs the transformation.</param> public FileDataLink(DataStorage provider) { mProvider = provider; if (mProvider != null) mHelperEngine = new FileHelperEngine(mProvider.RecordType); else throw new ArgumentException("provider can�t be null", "provider"); }
/// <summary>Create a new instance of the class.</summary> /// <param name="provider">The <see cref="DataLink.DataStorage"/> used to performs the transformation.</param> public ExcelDataLink(DataStorage provider) { mProvider = provider; if (mProvider != null) mExcelStorage = new ExcelStorage(provider.RecordType); else throw new ArgumentException("provider can�t be null", "provider"); }
/// <summary>Create a new instance of the class.</summary> /// <param name="provider1">The First <see cref="DataStorage"/> used to insert/extract records .</param> /// <param name="provider2">The Second <see cref="DataStorage"/> used to insert/extract records .</param> public GenericDataLink(DataStorage provider1, DataStorage provider2) { if (provider1 == null) throw new ArgumentException("provider1 can´t be null", "provider1"); else mDataStorage1 = provider1; if (provider2 == null) throw new ArgumentException("provider2 can´t be null", "provider2"); else mDataStorage2 = provider2; ValidateRecordTypes(); }
/// <summary>The short way to Insert Records from a file to a DataStorage</summary> /// <param name="storage">The DataStorage where store the records.</param> /// <param name="filename">The file with the SourceRecords</param> /// <returns>The Inserted records</returns> public static object[] EasyInsertFromFile(DataStorage storage, string filename) { FileDataLink link = new FileDataLink(storage); return link.InsertFromFile(filename); }
/// <summary>The short way to Extract the records from a DataStorage to a file</summary> /// <param name="storage">The DataStorage from where get the records</param> /// <param name="filename">The file where to write the records to.</param> /// <returns>The Extracted records.</returns> public static object[] EasyExtractToFile(DataStorage storage, string filename) { FileDataLink link = new FileDataLink(storage); return link.ExtractToFile(filename); }
/// <summary>The short way to Insert Records from a file to a DataStorage</summary> /// <param name="storage">The DataStorage where store the records.</param> /// <param name="filename">The file with the SourceRecords</param> /// <returns>The Inserted records</returns> public static object[] EasyInsertFromFile(DataStorage storage, string filename) { FileDataLink link = new FileDataLink(storage); return(link.InsertFromFile(filename)); }
/// <summary>The short way to Extract the records from a DataStorage to a file</summary> /// <param name="storage">The DataStorage from where get the records</param> /// <param name="filename">The file where to write the records to.</param> /// <returns>The Extracted records.</returns> public static object[] EasyExtractToFile(DataStorage storage, string filename) { FileDataLink link = new FileDataLink(storage); return(link.ExtractToFile(filename)); }