[Quantproject-developers] QuantProject/b2_DataAccess/Tables ValidatedTickers.cs,1.1,1.2
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-04-26 15:41:55
|
Update of /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8041/b2_DataAccess/Tables Modified Files: ValidatedTickers.cs Log Message: - GetHashValue is a public method now - IsValid method has been moved to the Validator class Index: ValidatedTickers.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b2_DataAccess/Tables/ValidatedTickers.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ValidatedTickers.cs 21 Apr 2004 11:58:34 -0000 1.1 --- ValidatedTickers.cs 26 Apr 2004 15:41:41 -0000 1.2 *************** *** 30,53 **** /// <param name="endDate">Ending instrument quote's date, for hash value computation</param> /// <returns></returns> ! private static string getHashValue( string ticker , DateTime startDate , DateTime endDate ) { Quotes quotes = new Quotes( ticker ); return quotes.GetHashValue( startDate , endDate ); } - - /// <summary> - /// Checks if the instrument is valid (since the first date to the last date in the quotes table) - /// </summary> - /// <param name="ticker">Instrument's ticker</param> - /// <returns></returns> - public static bool IsValid( string ticker ) - { - DataTable validatedTicker = - SqlExecutor.GetDataTable( "select * from validatedTickers where vvTicker='" + ticker + "'" ); - return ( ( validatedTicker.Rows.Count > 0 ) && - ( (string)validatedTicker.Rows[ 0 ][ ValidatedTickers.HashValue ] == - getHashValue( ticker , (DateTime)validatedTicker.Rows[ 0 ][ ValidatedTickers.StartDate ] , - (DateTime)validatedTicker.Rows[ 0 ][ ValidatedTickers.EndDate ] ) ) ); - } } } --- 30,38 ---- /// <param name="endDate">Ending instrument quote's date, for hash value computation</param> /// <returns></returns> ! public static string GetHashValue( string ticker , DateTime startDate , DateTime endDate ) { Quotes quotes = new Quotes( ticker ); return quotes.GetHashValue( startDate , endDate ); } } } |