Provides a DateTime axis that removes non-trading days.
Inheritance: DateTimeAxis
示例#1
0
 /// <summary>
 /// Helper method for Clone.
 /// </summary>
 /// <param name="a">The cloned target object.</param>
 /// <param name="b">The cloned source object.</param>
 protected static void DoClone(TradingDateTimeAxis b, TradingDateTimeAxis a)
 {
     DateTimeAxis.DoClone(b, a);
     a.startTradingTime_ = b.startTradingTime_;
     a.endTradingTime_   = b.endTradingTime_;
     a.tradingTimeSpan_  = b.tradingTimeSpan_;
     a.WorldMin          = b.WorldMin;
     a.WorldMax          = b.WorldMax;
 }
示例#2
0
        /// <summary>
        /// Deep copy of DateTimeAxis.
        /// </summary>
        /// <returns>A copy of the DateTimeAxis Class.</returns>
        public override object Clone()
        {
            TradingDateTimeAxis a = new TradingDateTimeAxis();

            // ensure that this isn't being called on a derived type. If it is, then oh no!
            if (GetType() != a.GetType())
            {
                throw new NPlotException("Clone not defined in derived type. Help!");
            }
            DoClone(this, a);
            return(a);
        }
示例#3
0
 /// <summary>
 /// Helper method for Clone.
 /// </summary>
 /// <param name="a">The cloned target object.</param>
 /// <param name="b">The cloned source object.</param>
 protected static void DoClone(TradingDateTimeAxis b, TradingDateTimeAxis a)
 {
     DateTimeAxis.DoClone(b, a);
     a.startTradingTime_ = b.startTradingTime_;
     a.endTradingTime_ = b.endTradingTime_;
     a.tradingTimeSpan_ = b.tradingTimeSpan_;
     a.WorldMin = b.WorldMin;
     a.WorldMax = b.WorldMax;
 }
示例#4
0
 /// <summary>
 /// Deep copy of DateTimeAxis.
 /// </summary>
 /// <returns>A copy of the DateTimeAxis Class.</returns>
 public override object Clone()
 {
     TradingDateTimeAxis a = new TradingDateTimeAxis();
     // ensure that this isn't being called on a derived type. If it is, then oh no!
     if (this.GetType() != a.GetType())
     {
         throw new NPlotException( "Clone not defined in derived type. Help!" );
     }
     DoClone( this, a );
     return a;
 }