[Quantproject-developers] QuantProject/b3_Data/DataProviders/Bars/Caching SimpleBarCache.cs, 1.3,
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2009-02-28 18:44:08
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Bars/Caching In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv27993/b3_Data/DataProviders/Bars/Caching Modified Files: SimpleBarCache.cs Log Message: The WasExchanged() method has been fixed Index: SimpleBarCache.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Bars/Caching/SimpleBarCache.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SimpleBarCache.cs 8 Feb 2009 19:12:17 -0000 1.3 --- SimpleBarCache.cs 28 Feb 2009 18:44:02 -0000 1.4 *************** *** 48,52 **** public double GetMarketValue( string ticker, DateTime dateTime ) { ! double returnValue = double.MinValue; try { --- 48,52 ---- public double GetMarketValue( string ticker, DateTime dateTime ) { ! double returnValue = double.NaN; try { *************** *** 64,77 **** public bool WasExchanged( string ticker , DateTime dateTime ) { ! double marketValue = double.NaN; try { ! marketValue = this.GetMarketValue( ticker , dateTime ); } catch ( MissingBarException missingBarException ) { ! string doNothing = missingBarException.Message; doNothing += ""; } ! return (marketValue != Double.NaN); } } --- 64,80 ---- public bool WasExchanged( string ticker , DateTime dateTime ) { ! bool wasExchanged = true; ! // double marketValue = double.NaN; try { ! this.GetMarketValue( ticker , dateTime ); } catch ( MissingBarException missingBarException ) { ! // the bar is not in the database ! wasExchanged = false; ! string toAvoidCompileWarning = missingBarException.Message; } ! return wasExchanged; } } |