Automated dotnet-format update

This commit is contained in:
github-actions-dotnet-formatter[bot] committed 2020-12-04 15:12:55 +00:00
1 parent ad4c2f68aa
commit 2af18c2d38
403 files changed
+1569 -1567

No files matched your search

@@ -22,4 +22,4 @@ namespace HandyControl.Media.Animation
protected override double[] InterpolateValueCore(double[] baseValue, double keyFrameProgress) => keyFrameProgress < 1.0 ? baseValue : Numbers;
}
}
}
@@ -20,7 +20,7 @@ namespace HandyControl.Media.Animation
public GeometryAnimation()
{
}
public GeometryAnimation(string fromValue, string toValue) : this()
@@ -61,7 +61,7 @@ namespace HandyControl.Media.Animation
FillBehavior = fillBehavior;
}
public new GeometryAnimation Clone() => (GeometryAnimation)base.Clone();
public new GeometryAnimation Clone() => (GeometryAnimation) base.Clone();
protected override Freezable CreateInstanceCore() => new GeometryAnimation();
@@ -96,10 +96,10 @@ namespace HandyControl.Media.Animation
}
var accumulated = new double[_numbersAccumulator.Length];
if (IsCumulative)
{
var currentRepeat = (double)(animationClock.CurrentIteration - 1);
var currentRepeat = (double) (animationClock.CurrentIteration - 1);
if (currentRepeat > 0.0)
{
@@ -136,7 +136,7 @@ namespace HandyControl.Media.Animation
public Geometry From
{
get => (Geometry)GetValue(FromProperty);
get => (Geometry) GetValue(FromProperty);
set => SetValue(FromProperty, value);
}
@@ -145,7 +145,7 @@ namespace HandyControl.Media.Animation
private static void OnToChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var obj = (GeometryAnimation)d;
var obj = (GeometryAnimation) d;
if (e.NewValue is Geometry geometry)
{
var geometryStr = geometry.ToString(CultureInfo.InvariantCulture);
@@ -157,7 +157,7 @@ namespace HandyControl.Media.Animation
public Geometry To
{
get => (Geometry)GetValue(ToProperty);
get => (Geometry) GetValue(ToProperty);
set => SetValue(ToProperty, value);
}
@@ -166,14 +166,14 @@ namespace HandyControl.Media.Animation
public IEasingFunction EasingFunction
{
get => (IEasingFunction)GetValue(EasingFunctionProperty);
get => (IEasingFunction) GetValue(EasingFunctionProperty);
set => SetValue(EasingFunctionProperty, value);
}
public bool IsCumulative
{
get => (bool)GetValue(IsCumulativeProperty);
get => (bool) GetValue(IsCumulativeProperty);
set => SetValue(IsCumulativeProperty, value);
}
}
}
}
@@ -13,7 +13,7 @@ namespace HandyControl.Media.Animation
Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
}
public new GeometryAnimationBase Clone() => (GeometryAnimationBase)base.Clone();
public new GeometryAnimationBase Clone() => (GeometryAnimationBase) base.Clone();
public sealed override object GetCurrentValue(object defaultOriginValue, object defaultDestinationValue, AnimationClock animationClock)
{
@@ -25,7 +25,7 @@ namespace HandyControl.Media.Animation
{
throw new ArgumentNullException(nameof(defaultDestinationValue));
}
return GetCurrentValue((Geometry)defaultOriginValue, (Geometry)defaultDestinationValue, animationClock);
return GetCurrentValue((Geometry) defaultOriginValue, (Geometry) defaultDestinationValue, animationClock);
}
public override Type TargetPropertyType
@@ -57,4 +57,4 @@ namespace HandyControl.Media.Animation
protected abstract Geometry GetCurrentValueCore(Geometry defaultOriginValue, Geometry defaultDestinationValue, AnimationClock animationClock);
}
}
}
@@ -32,9 +32,9 @@ namespace HandyControl.Media.Animation
}
private GeometryKeyFrameCollection _keyFrames;
private ResolvedKeyFrameEntry[] _sortedResolvedKeyFrames;
private bool _areKeyTimesValid;
public GeometryAnimationUsingKeyFrames()
@@ -42,9 +42,9 @@ namespace HandyControl.Media.Animation
_areKeyTimesValid = true;
}
public new GeometryAnimationUsingKeyFrames Clone() => (GeometryAnimationUsingKeyFrames)base.Clone();
public new GeometryAnimationUsingKeyFrames Clone() => (GeometryAnimationUsingKeyFrames) base.Clone();
public new GeometryAnimationUsingKeyFrames CloneCurrentValue() => (GeometryAnimationUsingKeyFrames)base.CloneCurrentValue();
public new GeometryAnimationUsingKeyFrames CloneCurrentValue() => (GeometryAnimationUsingKeyFrames) base.CloneCurrentValue();
protected override bool FreezeCore(bool isChecking)
{
@@ -71,7 +71,7 @@ namespace HandyControl.Media.Animation
protected override void CloneCore(Freezable sourceFreezable)
{
var sourceAnimation = (GeometryAnimationUsingKeyFrames)sourceFreezable;
var sourceAnimation = (GeometryAnimationUsingKeyFrames) sourceFreezable;
base.CloneCore(sourceFreezable);
CopyCommon(sourceAnimation, false);
@@ -79,7 +79,7 @@ namespace HandyControl.Media.Animation
protected override void CloneCurrentValueCore(Freezable sourceFreezable)
{
var sourceAnimation = (GeometryAnimationUsingKeyFrames)sourceFreezable;
var sourceAnimation = (GeometryAnimationUsingKeyFrames) sourceFreezable;
base.CloneCurrentValueCore(sourceFreezable);
CopyCommon(sourceAnimation, true);
@@ -87,7 +87,7 @@ namespace HandyControl.Media.Animation
protected override void GetAsFrozenCore(Freezable source)
{
var sourceAnimation = (GeometryAnimationUsingKeyFrames)source;
var sourceAnimation = (GeometryAnimationUsingKeyFrames) source;
base.GetAsFrozenCore(source);
CopyCommon(sourceAnimation, false);
@@ -95,7 +95,7 @@ namespace HandyControl.Media.Animation
protected override void GetCurrentValueAsFrozenCore(Freezable source)
{
var sourceAnimation = (GeometryAnimationUsingKeyFrames)source;
var sourceAnimation = (GeometryAnimationUsingKeyFrames) source;
base.GetCurrentValueAsFrozenCore(source);
CopyCommon(sourceAnimation, true);
@@ -107,14 +107,14 @@ namespace HandyControl.Media.Animation
if (_areKeyTimesValid && sourceAnimation._sortedResolvedKeyFrames != null)
{
_sortedResolvedKeyFrames = (ResolvedKeyFrameEntry[])sourceAnimation._sortedResolvedKeyFrames.Clone();
_sortedResolvedKeyFrames = (ResolvedKeyFrameEntry[]) sourceAnimation._sortedResolvedKeyFrames.Clone();
}
if (sourceAnimation._keyFrames != null)
{
if (isCurrentValueClone)
{
_keyFrames = (GeometryKeyFrameCollection)sourceAnimation._keyFrames.CloneCurrentValue();
_keyFrames = (GeometryKeyFrameCollection) sourceAnimation._keyFrames.CloneCurrentValue();
}
else
{
@@ -234,7 +234,7 @@ namespace HandyControl.Media.Animation
currentIterationValue = GetResolvedKeyFrame(currentResolvedKeyFrameIndex).InterpolateValue(fromValue, currentSegmentProgress);
}
return AnimationHelper.ComposeGeometry(Strings, currentIterationValue);
}
@@ -243,7 +243,7 @@ namespace HandyControl.Media.Animation
IList IKeyFrameAnimation.KeyFrames
{
get => KeyFrames;
set => KeyFrames = (GeometryKeyFrameCollection)value;
set => KeyFrames = (GeometryKeyFrameCollection) value;
}
public GeometryKeyFrameCollection KeyFrames
@@ -11,7 +11,7 @@ public abstract class GeometryKeyFrame : Freezable, IKeyFrame
protected GeometryKeyFrame()
{
}
protected GeometryKeyFrame(Geometry value)
@@ -35,7 +35,7 @@ public abstract class GeometryKeyFrame : Freezable, IKeyFrame
object IKeyFrame.Value
{
get => Value;
set => Value = (Geometry)value;
set => Value = (Geometry) value;
}
public static readonly DependencyProperty ValueProperty = DependencyProperty.Register(
@@ -66,4 +66,4 @@ public abstract class GeometryKeyFrame : Freezable, IKeyFrame
}
protected abstract double[] InterpolateValueCore(double[] baseValue, double keyFrameProgress);
}
}
@@ -9,7 +9,7 @@ namespace HandyControl.Media.Animation
public class GeometryKeyFrameCollection : Freezable, IList
{
private List<GeometryKeyFrame> _keyFrames;
private static GeometryKeyFrameCollection s_emptyCollection;
public GeometryKeyFrameCollection()
@@ -34,16 +34,16 @@ namespace HandyControl.Media.Animation
}
return s_emptyCollection;
}
}
}
public new GeometryKeyFrameCollection Clone() => (GeometryKeyFrameCollection)base.Clone();
public new GeometryKeyFrameCollection Clone() => (GeometryKeyFrameCollection) base.Clone();
protected override Freezable CreateInstanceCore() => new GeometryKeyFrameCollection();
protected override void CloneCore(Freezable sourceFreezable)
{
var sourceCollection = (GeometryKeyFrameCollection)sourceFreezable;
var sourceCollection = (GeometryKeyFrameCollection) sourceFreezable;
base.CloneCore(sourceFreezable);
var count = sourceCollection._keyFrames.Count;
@@ -52,7 +52,7 @@ namespace HandyControl.Media.Animation
for (var i = 0; i < count; i++)
{
var keyFrame = (GeometryKeyFrame)sourceCollection._keyFrames[i].Clone();
var keyFrame = (GeometryKeyFrame) sourceCollection._keyFrames[i].Clone();
_keyFrames.Add(keyFrame);
OnFreezablePropertyChanged(null, keyFrame);
}
@@ -60,7 +60,7 @@ namespace HandyControl.Media.Animation
protected override void CloneCurrentValueCore(Freezable sourceFreezable)
{
var sourceCollection = (GeometryKeyFrameCollection)sourceFreezable;
var sourceCollection = (GeometryKeyFrameCollection) sourceFreezable;
base.CloneCurrentValueCore(sourceFreezable);
var count = sourceCollection._keyFrames.Count;
@@ -69,7 +69,7 @@ namespace HandyControl.Media.Animation
for (var i = 0; i < count; i++)
{
var keyFrame = (GeometryKeyFrame)sourceCollection._keyFrames[i].CloneCurrentValue();
var keyFrame = (GeometryKeyFrame) sourceCollection._keyFrames[i].CloneCurrentValue();
_keyFrames.Add(keyFrame);
OnFreezablePropertyChanged(null, keyFrame);
}
@@ -77,7 +77,7 @@ namespace HandyControl.Media.Animation
protected override void GetAsFrozenCore(Freezable sourceFreezable)
{
var sourceCollection = (GeometryKeyFrameCollection)sourceFreezable;
var sourceCollection = (GeometryKeyFrameCollection) sourceFreezable;
base.GetAsFrozenCore(sourceFreezable);
var count = sourceCollection._keyFrames.Count;
@@ -86,7 +86,7 @@ namespace HandyControl.Media.Animation
for (var i = 0; i < count; i++)
{
var keyFrame = (GeometryKeyFrame)sourceCollection._keyFrames[i].GetAsFrozen();
var keyFrame = (GeometryKeyFrame) sourceCollection._keyFrames[i].GetAsFrozen();
_keyFrames.Add(keyFrame);
OnFreezablePropertyChanged(null, keyFrame);
}
@@ -94,7 +94,7 @@ namespace HandyControl.Media.Animation
protected override void GetCurrentValueAsFrozenCore(Freezable sourceFreezable)
{
var sourceCollection = (GeometryKeyFrameCollection)sourceFreezable;
var sourceCollection = (GeometryKeyFrameCollection) sourceFreezable;
base.GetCurrentValueAsFrozenCore(sourceFreezable);
var count = sourceCollection._keyFrames.Count;
@@ -103,7 +103,7 @@ namespace HandyControl.Media.Animation
for (var i = 0; i < count; i++)
{
var keyFrame = (GeometryKeyFrame)sourceCollection._keyFrames[i].GetCurrentValueAsFrozen();
var keyFrame = (GeometryKeyFrame) sourceCollection._keyFrames[i].GetCurrentValueAsFrozen();
_keyFrames.Add(keyFrame);
OnFreezablePropertyChanged(null, keyFrame);
}
@@ -132,7 +132,7 @@ namespace HandyControl.Media.Animation
{
ReadPreamble();
((ICollection)_keyFrames).CopyTo(array, index);
((ICollection) _keyFrames).CopyTo(array, index);
}
public void CopyTo(GeometryKeyFrame[] array, int index)
@@ -151,14 +151,14 @@ namespace HandyControl.Media.Animation
return _keyFrames.Count;
}
}
public object SyncRoot
{
get
{
ReadPreamble();
return ((ICollection)_keyFrames).SyncRoot;
return ((ICollection) _keyFrames).SyncRoot;
}
}
@@ -172,7 +172,7 @@ namespace HandyControl.Media.Animation
}
}
int IList.Add(object keyFrame) => Add((GeometryKeyFrame)keyFrame);
int IList.Add(object keyFrame) => Add((GeometryKeyFrame) keyFrame);
public int Add(GeometryKeyFrame keyFrame)
{
@@ -196,7 +196,7 @@ namespace HandyControl.Media.Animation
WritePreamble();
if (_keyFrames.Count <= 0) return;
foreach (var frame in _keyFrames)
{
OnFreezablePropertyChanged(frame, null);
@@ -207,7 +207,7 @@ namespace HandyControl.Media.Animation
WritePostscript();
}
bool IList.Contains(object keyFrame) => Contains((GeometryKeyFrame)keyFrame);
bool IList.Contains(object keyFrame) => Contains((GeometryKeyFrame) keyFrame);
public bool Contains(GeometryKeyFrame keyFrame)
{
@@ -216,7 +216,7 @@ namespace HandyControl.Media.Animation
return _keyFrames.Contains(keyFrame);
}
int IList.IndexOf(object keyFrame) => IndexOf((GeometryKeyFrame)keyFrame);
int IList.IndexOf(object keyFrame) => IndexOf((GeometryKeyFrame) keyFrame);
public int IndexOf(GeometryKeyFrame keyFrame)
{
@@ -225,7 +225,7 @@ namespace HandyControl.Media.Animation
return _keyFrames.IndexOf(keyFrame);
}
void IList.Insert(int index, object keyFrame) => Insert(index, (GeometryKeyFrame)keyFrame);
void IList.Insert(int index, object keyFrame) => Insert(index, (GeometryKeyFrame) keyFrame);
public void Insert(int index, GeometryKeyFrame keyFrame)
{
@@ -242,7 +242,7 @@ namespace HandyControl.Media.Animation
WritePostscript();
}
void IList.Remove(object keyFrame) => Remove((GeometryKeyFrame)keyFrame);
void IList.Remove(object keyFrame) => Remove((GeometryKeyFrame) keyFrame);
public void Remove(GeometryKeyFrame keyFrame)
{
@@ -270,7 +270,7 @@ namespace HandyControl.Media.Animation
object IList.this[int index]
{
get => this[index];
set => this[index] = (GeometryKeyFrame)value;
set => this[index] = (GeometryKeyFrame) value;
}
public GeometryKeyFrame this[int index]
@@ -5,12 +5,12 @@ namespace HandyControl.Media.Animation
internal struct ResolvedKeyFrameEntry : IComparable
{
internal int _originalKeyFrameIndex;
internal TimeSpan _resolvedKeyTime;
public int CompareTo(object other)
{
var otherEntry = (ResolvedKeyFrameEntry)other;
var otherEntry = (ResolvedKeyFrameEntry) other;
if (otherEntry._resolvedKeyTime > _resolvedKeyTime)
{