[Quantproject-developers] QuantProject/b3_Data/DataProviders/Bars HistoricalBarProvider.cs, 1.1, 1.
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2008-11-20 20:41:00
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Bars In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv30639/b3_Data/DataProviders/Bars Modified Files: HistoricalBarProvider.cs Log Message: - the class has been marked as Serializable - but the private cache has been marked as non NonSerialized (to get smaller reports) Index: HistoricalBarProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProviders/Bars/HistoricalBarProvider.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HistoricalBarProvider.cs 8 Nov 2008 20:24:09 -0000 1.1 --- HistoricalBarProvider.cs 20 Nov 2008 20:40:49 -0000 1.2 *************** *** 19,23 **** along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; --- 19,23 ---- along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ! */ using System; *************** *** 30,35 **** --- 30,37 ---- /// Returns historical bars, playing with caching /// </summary> + [Serializable] public class HistoricalBarProvider { + [NonSerialized] IBarCache barCache; *************** *** 41,47 **** public double GetMarketValue( string ticker , DateTime dateTime ) { ! double marketValue = barCache.GetMarketValue( ticker , dateTime ); return marketValue; } } } --- 43,61 ---- public double GetMarketValue( string ticker , DateTime dateTime ) { ! double marketValue = this.barCache.GetMarketValue( ticker , dateTime ); return marketValue; } + + /// <summary> + /// true iif the ticker was exchange at the given dateTime + /// </summary> + /// <param name="ticker"></param> + /// <param name="dateTime"></param> + /// <returns></returns> + public bool WasExchanged( + string ticker , DateTime dateTime ) + { + return this.barCache.WasExchanged( ticker , dateTime ); + } } } |