[Quantproject-developers] QuantProject/b4_Business/a2_Strategies/returnsManagement/time ReturnInte
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2007-10-30 19:06:53
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv11488/b4_Business/a2_Strategies/returnsManagement/time Modified Files: ReturnIntervals.cs Log Message: Initialization of the class has been reorganized (parameters are checked in a specific method) Index: ReturnIntervals.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a2_Strategies/returnsManagement/time/ReturnIntervals.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ReturnIntervals.cs 2 Oct 2007 14:40:06 -0000 1.3 --- ReturnIntervals.cs 30 Oct 2007 19:06:48 -0000 1.4 *************** *** 79,88 **** } ! private void returnIntervals_initialize(EndOfDayDateTime firstEndOfDayDateTime , EndOfDayDateTime lastEndOfDayDateTime , string benchmark, int intervalLength) { if(intervalLength < 1) throw new Exception("Interval length has to be greater than 0!"); this.intervalLength = intervalLength; this.firstEndOfDayDateTime = firstEndOfDayDateTime; --- 79,99 ---- } ! private void returnIntervals_initialize_checkParameters( ! EndOfDayDateTime firstEndOfDayDateTime , EndOfDayDateTime lastEndOfDayDateTime , string benchmark, int intervalLength) { + if(lastEndOfDayDateTime.CompareTo(firstEndOfDayDateTime) < 1) + throw new Exception("lastEndOfDayDateTime has to be greater than firstEndOfDayDateTime!"); if(intervalLength < 1) throw new Exception("Interval length has to be greater than 0!"); + } + + private void returnIntervals_initialize(EndOfDayDateTime firstEndOfDayDateTime , + EndOfDayDateTime lastEndOfDayDateTime , string benchmark, + int intervalLength) + { + this.returnIntervals_initialize_checkParameters( + firstEndOfDayDateTime, lastEndOfDayDateTime, benchmark, intervalLength); this.intervalLength = intervalLength; this.firstEndOfDayDateTime = firstEndOfDayDateTime; |