[Quantproject-developers] QuantProject/b3_Data/DataProviders/Caching Cache.cs,1.3,1.4
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-05-31 14:40:32
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Caching In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv14076/b3_Data/DataProviders/Caching Modified Files: Cache.cs Log Message: bug fixed for the addPage private method: there was an error when an already cached page was cached again. Fixed now. Index: Cache.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Caching/Cache.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Cache.cs 11 Jan 2006 18:36:40 -0000 1.3 --- Cache.cs 31 May 2006 14:40:28 -0000 1.4 *************** *** 162,166 **** // } // } ! private void addPage( string ticker , int year , QuoteField quoteField ) { if ( this.Count + 1 > this.maxNumPages ) --- 162,166 ---- // } // } ! private void addPage_actually( string ticker , int year , QuoteField quoteField ) { if ( this.Count + 1 > this.maxNumPages ) *************** *** 171,174 **** --- 171,181 ---- this.currentNumPages ++ ; } + private void addPage( string ticker , int year , QuoteField quoteField ) + { + if ( !this.ContainsKey( this.getKey( ticker , year , quoteField ) ) ) + // ticker quotes have not been cached yet, + // for the given year + this.addPage_actually( ticker , year , quoteField ); + } private void addPage( string ticker , DateTime dateTime , QuoteField quoteField ) { *************** *** 179,186 **** { double returnValue; ! // this.getQuote_checkEarlyDateException( dateTime ); ! if ( !this.ContainsKey( this.getKey( ticker , dateTime.Year , quoteField ) ) ) ! // the instrument instrumentKey has not been cached yet, for the given bar component ! this.addPage( ticker , dateTime , quoteField ); try { --- 186,191 ---- { double returnValue; ! // this.getQuote_checkEarlyDateException( dateTime ); ! this.addPage( ticker , dateTime , quoteField ); try { |