[Quantproject-developers] QuantProject/b3_Data DataProvider.cs,1.2,1.3
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-03-21 16:24:41
|
Update of /cvsroot/quantproject/QuantProject/b3_Data In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27273/b3_Data Modified Files: DataProvider.cs Log Message: Added GetHighHistory and GetLowHistory Index: DataProvider.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/DataProvider.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DataProvider.cs 3 Jan 2004 16:17:41 -0000 1.2 --- DataProvider.cs 21 Mar 2004 16:13:58 -0000 1.3 *************** *** 89,106 **** } ! public static History GetCloseHistory( string instrumentKey ) ! { ! if ( ( !cachedHistories.Contains( instrumentKey ) ) || ! ( !((Hashtable)cachedHistories[ instrumentKey ]).Contains( BarComponent.Close ) ) ) ! { ! Add( instrumentKey , BarComponent.Close ); ! ((Hashtable)cachedHistories[ instrumentKey ])[ BarComponent.Close ] = ! DataBase.GetHistory( instrumentKey , BarComponent.Close ); ! } ! return (History)((Hashtable)cachedHistories[ instrumentKey ])[ ! BarComponent.Close ]; ! } ! public static double GetMarketValue( string instrumentKey , ExtendedDateTime extendedDateTime ) { //DateTime dateTime = --- 89,128 ---- } ! private static History getHistory( string instrumentKey , BarComponent barComponent ) ! { ! if ( ( !cachedHistories.Contains( instrumentKey ) ) || ! ( !((Hashtable)cachedHistories[ instrumentKey ]).Contains( barComponent ) ) ) ! { ! Add( instrumentKey , barComponent ); ! ((Hashtable)cachedHistories[ instrumentKey ])[ barComponent ] = ! DataBase.GetHistory( instrumentKey , barComponent ); ! } ! return (History)((Hashtable)cachedHistories[ instrumentKey ])[ barComponent ]; ! } ! public static History GetCloseHistory( string instrumentKey ) ! { ! if ( ( !cachedHistories.Contains( instrumentKey ) ) || ! ( !((Hashtable)cachedHistories[ instrumentKey ]).Contains( BarComponent.Close ) ) ) ! { ! Add( instrumentKey , BarComponent.Close ); ! ((Hashtable)cachedHistories[ instrumentKey ])[ BarComponent.Close ] = ! DataBase.GetHistory( instrumentKey , BarComponent.Close ); ! } ! return (History)((Hashtable)cachedHistories[ instrumentKey ])[ ! BarComponent.Close ]; ! } ! ! public static History GetHighHistory( string instrumentKey ) ! { ! return getHistory( instrumentKey , BarComponent.High ); ! } ! ! public static History GetLowHistory( string instrumentKey ) ! { ! return getHistory( instrumentKey , BarComponent.Low ); ! } ! ! public static double GetMarketValue( string instrumentKey , ExtendedDateTime extendedDateTime ) { //DateTime dateTime = |