Aspectacular.RelativeTimeSpan.RelativeTimeSpan C# (CSharp) Method

RelativeTimeSpan() public method

public RelativeTimeSpan ( Timeline direction, TimeUnits unit, ulong unitCount = 1 ) : System
direction Timeline
unit TimeUnits
unitCount ulong
return System
        public RelativeTimeSpan(Timeline direction, TimeUnits unit, ulong unitCount = 1)
        {
            if(unitCount == 0)
                throw new ArgumentOutOfRangeException("unitCount value must be 1 or greater.");

            if(((int)direction & (int)TimelineFlags.AllowsOnlySingleUnit) != 0 && unitCount > 1)
                throw new ArgumentException("Time direction \"{0}\" can only be used with unitCount=1.".SmartFormat(direction));

            this.UnitCount = unitCount;
            this.Unit = unit;
            this.Direction = direction;
        }