5 writes to _currentDuration
PresentationCore (5)
System\Windows\Media\Animation\Clock.cs (5)
104
_currentDuration
= _resolvedDuration;
2434
_currentDuration
= duration; // If CurrentDuration is different, we update it later in this method
2445
_currentDuration
= CurrentDuration;
2448
_currentDuration
= Duration.Forever; // We treat Automatic as unresolved current duration
3404
current.
_currentDuration
= current._resolvedDuration; // Revert currentDuration back to default size
35 references to _currentDuration
PresentationCore (35)
System\Windows\Media\Animation\Clock.cs (35)
1940
Debug.Assert(
_currentDuration
!= Duration.Automatic, "_currentDuration should never be Automatic.");
1954
if (
_currentDuration
.HasTimeSpan) // For finite duration, use modulo arithmetic to compute current iteration
1956
if (
_currentDuration
.TimeSpan == TimeSpan.Zero) // We must be post-filling if we have gotten here
2086
localProgress = TimeSpan.FromTicks(offsetFromBegin.Ticks %
_currentDuration
.TimeSpan.Ticks);
2106
localProgress =
_currentDuration
.TimeSpan;
2125
localProgress =
_currentDuration
.TimeSpan - localProgress;
2142
timeUntilNextBoundary = DivideTimeSpan(
_currentDuration
.TimeSpan, Math.Abs(parentSpeed));
2146
TimeSpan decelBegin = MultiplyTimeSpan(
_currentDuration
.TimeSpan, 1.0 - _timeline.DecelerationRatio);
2151
TimeSpan accelEnd = MultiplyTimeSpan(
_currentDuration
.TimeSpan, _timeline.AccelerationRatio);
2166
Debug.Assert(
_currentDuration
== Duration.Forever, "_currentDuration has an invalid enum value.");
2189
Debug.Assert(
_currentDuration
.HasTimeSpan, "ComputeCurrentIterationWithGrow should only be called when _currentDuration has a value.");
2194
if (offsetFromBegin <
_currentDuration
.TimeSpan) // We fall within the same iteration as during last tick
2202
long offsetOnLaterIterations = (offsetFromBegin -
_currentDuration
.TimeSpan).Ticks;
2211
_currentIterationBeginTime +=
_currentDuration
.TimeSpan + MultiplyTimeSpan(_resolvedDuration.TimeSpan, iterationIncrement - 1);
2223
_currentIterationBeginTime -=
_currentDuration
.TimeSpan;
2336
Debug.Assert(
_currentDuration
!= Duration.Automatic, "_currentDuration should never be Automatic.");
2338
if (
_currentDuration
.HasTimeSpan) // Finite duration, need to apply accel/decel
2340
Debug.Assert(
_currentDuration
.TimeSpan > TimeSpan.Zero, "ComputeCurrentTime was entered with _currentDuration <= 0");
2350
double durationInTicks = (double)
_currentDuration
.TimeSpan.Ticks;
2411
Debug.Assert(
_currentDuration
== Duration.Forever, "_currentDuration has an invalid enum value.");
2446
if (
_currentDuration
== Duration.Automatic)
2473
Debug.Assert(
_currentDuration
!= Duration.Automatic, "_currentDuration should never be Automatic.");
2478
if (
_currentDuration
.HasTimeSpan &&
_currentDuration
.TimeSpan == TimeSpan.Zero)
2489
else if (
_currentDuration
== Duration.Forever)
2495
Debug.Assert(
_currentDuration
.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2496
Debug.Assert(
_currentDuration
== _resolvedDuration, "For clocks which cannot grow, _currentDuration must equal _resolvedDuration.");
2504
effectiveDuration = MultiplyTimeSpan(
_currentDuration
.TimeSpan, scalingFactor);
2509
Debug.Assert(
_currentDuration
.HasTimeSpan, "_currentDuration is invalid, neither Forever nor a TimeSpan.");
2525
presentAndFutureDuration = ((double)
_currentDuration
.TimeSpan.Ticks) * presentAndFutureIterations;
2529
presentAndFutureDuration = ((double)
_currentDuration
.TimeSpan.Ticks) // Current iteration; below is the future iteration length
2807
_currentDuration
, _appliedSpeedRatio,
2842
relativeBeginTime,
_currentDuration
, _appliedSpeedRatio,
2852
relativeBeginTime,
_currentDuration
, _appliedSpeedRatio))
2861
postFillDuration,
_currentDuration
, _appliedSpeedRatio,