[Quantproject-developers] QuantProject/b3_Data/DataTables Quotes.cs, 1.28, 1.29
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-07-30 13:55:42
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataTables In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15565/b3_Data/DataTables Modified Files: Quotes.cs Log Message: The removeNonContainedDates private method has been fixed (to say the truth, never used yet, so it may still require some tuning...) Index: Quotes.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataTables/Quotes.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** Quotes.cs 22 Jul 2006 20:56:09 -0000 1.28 --- Quotes.cs 30 Jul 2006 13:55:39 -0000 1.29 *************** *** 59,69 **** this.removeNonContainedDates( marketDays ); } ! private void removeNonContainedDates( SortedList marketDays ) { foreach( DataRow dataRow in this.Rows ) ! if ( marketDays.ContainsKey( (DateTime)dataRow[ Quotes.Date ] ) ) ! this.Rows.Remove( dataRow ); } public Quotes( string ticker ) { --- 59,87 ---- this.removeNonContainedDates( marketDays ); } ! #region removeNonContainedDates ! private ArrayList removeNonContainedDates_getDataRowsToBeRemoved( ! SortedList marketDays ) { + ArrayList dataRowsToBeRemoved = new ArrayList(); foreach( DataRow dataRow in this.Rows ) ! if ( !marketDays.ContainsKey( (DateTime)dataRow[ Quotes.Date ] ) ) ! dataRowsToBeRemoved.Add( dataRow ); ! return dataRowsToBeRemoved; ! } ! private void removeDataRows( ICollection dataRowsToBeRemoved ) ! { ! foreach ( DataRow dataRowToBeRemoved in dataRowsToBeRemoved ) ! this.Rows.Remove( dataRowToBeRemoved ); ! } ! private void removeNonContainedDates( SortedList marketDays ) ! { ! ArrayList dataRowsToBeRemoved = ! this.removeNonContainedDates_getDataRowsToBeRemoved( ! marketDays ); ! this.removeDataRows( dataRowsToBeRemoved ); } + #endregion + public Quotes( string ticker ) { |