コード例 #1
0
ファイル: FileDataLink.cs プロジェクト: hoffmanc/FileHelpers
 /// <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");
 }
コード例 #2
0
ファイル: ExcelDataLink.cs プロジェクト: hoffmanc/FileHelpers
 /// <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");
 }
コード例 #3
0
		/// <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();
		}
コード例 #4
0
ファイル: FileDataLink.cs プロジェクト: hoffmanc/FileHelpers
 /// <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);
 }
コード例 #5
0
ファイル: FileDataLink.cs プロジェクト: hoffmanc/FileHelpers
 /// <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);
 }
コード例 #6
0
ファイル: FileDataLink.cs プロジェクト: ywscr/FileHelpers
        /// <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));
        }
コード例 #7
0
ファイル: FileDataLink.cs プロジェクト: ywscr/FileHelpers
        /// <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));
        }