Browse Source

Merge branch 'master' into pr/1832-implement-selecteditemchanged-event-for-treeview

Conflicts:
	src/Avalonia.Controls/TreeView.cs
pull/1832/head
Steven Kirk 8 years ago
parent
commit
c226f3759c
  1. 2
      packages.cake
  2. 3
      readme.md
  3. 9
      scripts/ReplaceNugetCache.ps1
  4. 6
      src/Android/Avalonia.Android/AndroidPlatform.cs
  5. 10
      src/Android/Avalonia.Android/AndroidThreadingInterface.cs
  6. 14
      src/Android/Avalonia.Android/AppBuilder.cs
  7. 9
      src/Android/Avalonia.Android/AvaloniaActivity.cs
  8. 9
      src/Android/Avalonia.Android/AvaloniaView.cs
  9. 2
      src/Android/Avalonia.Android/CursorFactory.cs
  10. 4
      src/Android/Avalonia.Android/Platform/ClipboardImpl.cs
  11. 5
      src/Android/Avalonia.Android/Platform/Input/AndroidKeyboardDevice.cs
  12. 2
      src/Android/Avalonia.Android/Platform/SkiaPlatform/AndroidFramebuffer.cs
  13. 10
      src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs
  14. 9
      src/Android/Avalonia.Android/Platform/SkiaPlatform/PopupImpl.cs
  15. 13
      src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs
  16. 8
      src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs
  17. 6
      src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
  18. 9
      src/Android/Avalonia.Android/Platform/Specific/IAndroidView.cs
  19. 15
      src/Android/Avalonia.Android/PlatformIconLoader.cs
  20. 2
      src/Android/Avalonia.Android/SystemDialogImpl.cs
  21. 9
      src/Avalonia.Animation/Animatable.cs
  22. 12
      src/Avalonia.Animation/Animation.cs
  23. 4
      src/Avalonia.Animation/AnimatorKeyFrame.cs
  24. 17
      src/Avalonia.Animation/Animator`1.cs
  25. 2
      src/Avalonia.Animation/Cue.cs
  26. 11
      src/Avalonia.Animation/DoubleAnimator.cs
  27. 1
      src/Avalonia.Animation/DoubleTransition.cs
  28. 1
      src/Avalonia.Animation/Easing/BounceEaseIn.cs
  29. 5
      src/Avalonia.Animation/Easing/Easing.cs
  30. 3
      src/Avalonia.Animation/Easing/EasingTypeConverter.cs
  31. 2
      src/Avalonia.Animation/Easing/ElasticEaseIn.cs
  32. 2
      src/Avalonia.Animation/Easing/ElasticEaseOut.cs
  33. 2
      src/Avalonia.Animation/Easing/SineEaseIn.cs
  34. 2
      src/Avalonia.Animation/Easing/SineEaseOut.cs
  35. 6
      src/Avalonia.Animation/FillMode.cs
  36. 1
      src/Avalonia.Animation/FloatTransition.cs
  37. 2
      src/Avalonia.Animation/IAnimation.cs
  38. 1
      src/Avalonia.Animation/IAnimator.cs
  39. 2
      src/Avalonia.Animation/ITransition.cs
  40. 1
      src/Avalonia.Animation/IntegerTransition.cs
  41. 3
      src/Avalonia.Animation/KeyFrame.cs
  42. 11
      src/Avalonia.Animation/KeyFramePair`1.cs
  43. 8
      src/Avalonia.Animation/PlayState.cs
  44. 6
      src/Avalonia.Animation/PlaybackDirection.cs
  45. 5
      src/Avalonia.Animation/RepeatCount.cs
  46. 3
      src/Avalonia.Animation/RepeatCountTypeConverter.cs
  47. 2
      src/Avalonia.Animation/Timing.cs
  48. 3
      src/Avalonia.Animation/Transition`1.cs
  49. 2
      src/Avalonia.Animation/Utils/DoubleUtils.cs
  50. 1
      src/Avalonia.Base/AvaloniaLocator.cs
  51. 2
      src/Avalonia.Base/AvaloniaObject.cs
  52. 4
      src/Avalonia.Base/AvaloniaProperty.cs
  53. 3
      src/Avalonia.Base/Collections/AvaloniaList.cs
  54. 2
      src/Avalonia.Base/Collections/AvaloniaListConverter.cs
  55. 1
      src/Avalonia.Base/Collections/AvaloniaListExtensions.cs
  56. 4
      src/Avalonia.Base/Collections/IAvaloniaList.cs
  57. 4
      src/Avalonia.Base/Collections/IAvaloniaReadOnlyList.cs
  58. 4
      src/Avalonia.Base/Collections/NotifyCollectionChangedExtensions.cs
  59. 10
      src/Avalonia.Base/Data/BindingChainException.cs
  60. 1
      src/Avalonia.Base/Data/BindingNotification.cs
  61. 2
      src/Avalonia.Base/Data/BindingOperations.cs
  62. 6
      src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs
  63. 3
      src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs
  64. 1
      src/Avalonia.Base/Data/Converters/IValueConverter.cs
  65. 3
      src/Avalonia.Base/Data/Converters/StringConverters.cs
  66. 2
      src/Avalonia.Base/Data/Core/AvaloniaPropertyAccessorNode.cs
  67. 3
      src/Avalonia.Base/Data/Core/EmptyExpressionNode.cs
  68. 1
      src/Avalonia.Base/Data/Core/ExpressionObserver.cs
  69. 1
      src/Avalonia.Base/Data/Core/ExpressionParseException.cs
  70. 6
      src/Avalonia.Base/Data/Core/ITransformNode.cs
  71. 2
      src/Avalonia.Base/Data/Core/IndexerExpressionNode.cs
  72. 4
      src/Avalonia.Base/Data/Core/IndexerNodeBase.cs
  73. 1
      src/Avalonia.Base/Data/Core/LogicalNotNode.cs
  74. 5
      src/Avalonia.Base/Data/Core/Parsers/ExpressionTreeParser.cs
  75. 2
      src/Avalonia.Base/Data/Core/Parsers/ExpressionVisitorNodeBuilder.cs
  76. 2
      src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs
  77. 3
      src/Avalonia.Base/Data/Core/Plugins/DataAnnotationsValidationPlugin.cs
  78. 9
      src/Avalonia.Base/Data/Core/Plugins/DataValidationBase.cs
  79. 2
      src/Avalonia.Base/Data/Core/Plugins/ExceptionValidationPlugin.cs
  80. 1
      src/Avalonia.Base/Data/Core/Plugins/IDataValidationPlugin.cs
  81. 2
      src/Avalonia.Base/Data/Core/Plugins/IndeiValidationPlugin.cs
  82. 2
      src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs
  83. 5
      src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs
  84. 2
      src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs
  85. 7
      src/Avalonia.Base/Data/Core/SettableNode.cs
  86. 2
      src/Avalonia.Base/Data/Core/StreamBindingExtensions.cs
  87. 2
      src/Avalonia.Base/Data/IBinding.cs
  88. 2
      src/Avalonia.Base/Logging/Logger.cs
  89. 4
      src/Avalonia.Base/Platform/IRuntimePlatform.cs
  90. 1
      src/Avalonia.Base/PriorityLevel.cs
  91. 6
      src/Avalonia.Base/PriorityValue.cs
  92. 1
      src/Avalonia.Base/PropertyMetadata.cs
  93. 7
      src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs
  94. 14
      src/Avalonia.Base/Threading/Dispatcher.cs
  95. 18
      src/Avalonia.Base/Threading/IDispatcher.cs
  96. 2
      src/Avalonia.Base/Utilities/CharacterReader.cs
  97. 3
      src/Avalonia.Base/Utilities/DeferredSetter.cs
  98. 2
      src/Avalonia.Base/Utilities/IdentifierParser.cs
  99. 4
      src/Avalonia.Base/Utilities/MathUtilities.cs
  100. 2
      src/Avalonia.Base/Utilities/SingleOrDictionary.cs

2
packages.cake

@ -303,7 +303,7 @@ public class Packages
{
new NuSpecContent { Source = "Avalonia.Android.dll", Target = "lib/MonoAndroid10" }
},
BasePath = context.Directory("./src/Android/Avalonia.Android/bin/" + parameters.DirSuffix + "/monoandroid44/"),
BasePath = context.Directory("./src/Android/Avalonia.Android/bin/" + parameters.DirSuffix + "/monoandroid44/MonoAndroid44/"),
OutputDirectory = parameters.NugetRoot
},
///////////////////////////////////////////////////////////////////////////////

3
readme.md

@ -35,6 +35,9 @@ Install-Package Avalonia.Desktop
Try out the latest build of Avalonia available for download here:
https://ci.appveyor.com/project/AvaloniaUI/Avalonia/branch/master/artifacts
or use nightly build feeds as described here:
https://github.com/AvaloniaUI/Avalonia/wiki/Using-nightly-build-feed
## Documentation
As mentioned above, Avalonia is still in beta and as such there's not much documentation yet. You can take a look at the [getting started page](http://avaloniaui.net/docs/quickstart/) for an overview of how to get started but probably the best thing to do for now is to already know a little bit about WPF/Silverlight/UWP/XAML and ask questions in our [Gitter room](https://gitter.im/AvaloniaUI/Avalonia).

9
scripts/ReplaceNugetCache.ps1

@ -1,5 +1,6 @@
copy ..\samples\ControlCatalog.Desktop\bin\Debug\net461\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\net461\
copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\netcoreapp2.0\
copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia.gtk3\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia.win32\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore.\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia.skia\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp2.0\Avalonia**.dll ~\.nuget\packages\avalonia\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp2.0\Avalonia.Gtk3.dll ~\.nuget\packages\avalonia.gtk3\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp2.0\Avalonia.Win32.dll ~\.nuget\packages\avalonia.win32\$args\lib\netstandard2.0\
copy ..\samples\ControlCatalog.NetCore\bin\Debug\netcoreapp2.0\Avalonia.Skia.dll ~\.nuget\packages\avalonia.skia\$args\lib\netstandard2.0\

6
src/Android/Avalonia.Android/AndroidPlatform.cs

@ -1,8 +1,4 @@
using System;
using System.IO;
using System.Linq;
using Android.Content;
using Android.Views;
using Avalonia.Android.Platform;
using Avalonia.Android.Platform.Input;
using Avalonia.Android.Platform.SkiaPlatform;
@ -79,4 +75,4 @@ namespace Avalonia.Android
return new PopupImpl();
}
}
}
}

10
src/Android/Avalonia.Android/AndroidThreadingInterface.cs

@ -1,16 +1,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reactive.Disposables;
using System.Text;
using System.Threading;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Avalonia.Platform;
using Avalonia.Threading;
@ -88,4 +79,3 @@ namespace Avalonia.Android
public event Action<DispatcherPriority?> Signaled;
}
}

14
src/Android/Avalonia.Android/AppBuilder.cs

@ -1,16 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Avalonia.Controls;
using Avalonia.Platform;
using Avalonia.Shared.PlatformSupport;
namespace Avalonia
@ -23,4 +11,4 @@ namespace Avalonia
}
}
}
}

9
src/Android/Avalonia.Android/AvaloniaActivity.cs

@ -1,14 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace Avalonia.Android
{
@ -48,4 +41,4 @@ namespace Avalonia.Android
return View.DispatchKeyEvent(e);
}
}
}
}

9
src/Android/Avalonia.Android/AvaloniaView.cs

@ -1,12 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Avalonia.Android.Platform.SkiaPlatform;
@ -66,4 +59,4 @@ namespace Avalonia.Android
public IDisposable ShowDialog() => null;
}
}
}
}

2
src/Android/Avalonia.Android/CursorFactory.cs

@ -9,4 +9,4 @@ namespace Avalonia.Android
public IPlatformHandle GetCursor(StandardCursorType cursorType)
=> new PlatformHandle(IntPtr.Zero, "ZeroCursor");
}
}
}

4
src/Android/Avalonia.Android/Platform/ClipboardImpl.cs

@ -1,9 +1,9 @@
using System.Threading.Tasks;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Avalonia.Input.Platform;
using Avalonia.Platform;
using System.Threading.Tasks;
namespace Avalonia.Android.Platform
{
@ -44,4 +44,4 @@ namespace Avalonia.Android.Platform
return Task.FromResult<object>(null);
}
}
}
}

5
src/Android/Avalonia.Android/Platform/Input/AndroidKeyboardDevice.cs

@ -1,12 +1,11 @@
using System;
using Avalonia.Input;
//using Android.InputMethodServices;
using System.Collections.Generic;
using Android.Views;
using Avalonia.Input;
namespace Avalonia.Android.Platform.Input
{
public class AndroidKeyboardDevice : KeyboardDevice, IKeyboardDevice {
public class AndroidKeyboardDevice : KeyboardDevice, IKeyboardDevice {
private static readonly Dictionary<Keycode, Key> KeyDic = new Dictionary<Keycode, Key>
{
// { Keycode.Cancel?, Key.Cancel },

2
src/Android/Avalonia.Android/Platform/SkiaPlatform/AndroidFramebuffer.cs

@ -102,4 +102,4 @@ namespace Avalonia.Android.Platform.SkiaPlatform
uint reserved6;
}
}
}
}

10
src/Android/Avalonia.Android/Platform/SkiaPlatform/InvalidationAwareSurfaceView.cs

@ -1,17 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Util;
using Android.Views;
using Android.Widget;
using Avalonia.Media;
using Avalonia.Platform;
namespace Avalonia.Android
@ -90,4 +82,4 @@ namespace Avalonia.Android
protected abstract void Draw();
public string HandleDescriptor => "SurfaceView";
}
}
}

9
src/Android/Avalonia.Android/Platform/SkiaPlatform/PopupImpl.cs

@ -1,15 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.Graphics;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Avalonia.Controls;
using Avalonia.Platform;
@ -116,4 +109,4 @@ namespace Avalonia.Android.Platform.SkiaPlatform
//Not supported
}
}
}
}

13
src/Android/Avalonia.Android/Platform/SkiaPlatform/TopLevelImpl.cs

@ -1,18 +1,15 @@
using Android.App;
using System;
using System.Collections.Generic;
using Android.Content;
using Android.Graphics;
using Android.Views;
using Avalonia.Android.Platform.Input;
using Avalonia.Android.Platform.Specific;
using Avalonia.Android.Platform.Specific.Helpers;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Platform;
using System;
using System.Collections.Generic;
using System.Reactive.Disposables;
using Avalonia.Android.Platform.Input;
using Avalonia.Controls;
using Avalonia.Controls.Platform.Surfaces;
using Avalonia.Rendering;
namespace Avalonia.Android.Platform.SkiaPlatform
@ -196,4 +193,4 @@ namespace Avalonia.Android.Platform.SkiaPlatform
ILockedFramebuffer IFramebufferPlatformSurface.Lock()=>new AndroidFramebuffer(_view.Holder.Surface);
}
}
}

8
src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidKeyboardEventsHelper.cs

@ -1,3 +1,5 @@
using System;
using System.ComponentModel;
using Android.Content;
using Android.Runtime;
using Android.Views;
@ -7,8 +9,6 @@ using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Platform;
using System;
using System.ComponentModel;
namespace Avalonia.Android.Platform.Specific.Helpers
{
@ -120,7 +120,7 @@ namespace Avalonia.Android.Platform.Specific.Helpers
_lastFocusedElement = element;
}
public void ActivateAutoShowKeybord()
public void ActivateAutoShowKeyboard()
{
var kbDevice = (KeyboardDevice.Instance as INotifyPropertyChanged);
@ -142,4 +142,4 @@ namespace Avalonia.Android.Platform.Specific.Helpers
HandleEvents = false;
}
}
}
}

6
src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs

@ -1,10 +1,8 @@
using Android.Graphics;
using System;
using Android.Views;
using Avalonia.Input;
using Avalonia.Input.Raw;
using Avalonia.Media;
using Avalonia.Platform;
using System;
namespace Avalonia.Android.Platform.Specific.Helpers
{
@ -131,4 +129,4 @@ namespace Avalonia.Android.Platform.Specific.Helpers
HandleEvents = false;
}
}
}
}

9
src/Android/Avalonia.Android/Platform/Specific/IAndroidView.cs

@ -1,16 +1,9 @@
using Android.Graphics;
using Android.Views;
using System;
using System.Collections.Generic;
namespace Avalonia.Android.Platform.Specific
{
public interface IAndroidView
{
View View { get; }
}
}
}

15
src/Android/Avalonia.Android/PlatformIconLoader.cs

@ -1,16 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Avalonia.Platform;
using System.IO;
using Avalonia.Platform;
namespace Avalonia.Android
{
@ -54,4 +43,4 @@ namespace Avalonia.Android
stream.CopyTo(outputStream);
}
}
}
}

2
src/Android/Avalonia.Android/SystemDialogImpl.cs

@ -18,4 +18,4 @@ namespace Avalonia.Android
throw new NotImplementedException();
}
}
}
}

9
src/Avalonia.Animation/Animatable.cs

@ -1,15 +1,12 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System.Linq;
using Avalonia.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reactive.Linq;
using Avalonia.Collections;
using Avalonia.Animation;
using System.Collections.Generic;
using System.Threading;
using System.Collections.Concurrent;
using Avalonia.Data;
namespace Avalonia.Animation
{

12
src/Avalonia.Animation/Animation.cs

@ -1,18 +1,14 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Easings;
using Avalonia.Animation;
using Avalonia.Collections;
using Avalonia.Metadata;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Reflection;
using System.Linq;
using System.Threading.Tasks;
using System.Reactive.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
using Avalonia.Animation.Easings;
using Avalonia.Collections;
namespace Avalonia.Animation
{

4
src/Avalonia.Animation/AnimatorKeyFrame.cs

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using Avalonia.Metadata;
using Avalonia.Collections;
using Avalonia.Data;
using Avalonia.Reactive;

17
src/Avalonia.Animation/Animator`1.cs

@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;
using System.Text;
using Avalonia.Collections;
using System.ComponentModel;
using Avalonia.Animation.Utils;
using System.Reactive.Linq;
using System.Linq;
using System.Reactive.Linq;
using Avalonia.Animation.Utils;
using Avalonia.Collections;
using Avalonia.Data;
using System.Reactive.Disposables;
namespace Avalonia.Animation
{
@ -21,7 +18,7 @@ namespace Avalonia.Animation
/// </summary>
private readonly SortedList<double, (AnimatorKeyFrame, bool isNeutral)> _convertedKeyframes = new SortedList<double, (AnimatorKeyFrame, bool)>();
private bool _isVerfifiedAndConverted;
private bool _isVerifiedAndConverted;
/// <summary>
/// Gets or sets the target property for the keyframe.
@ -31,13 +28,13 @@ namespace Avalonia.Animation
public Animator()
{
// Invalidate keyframes when changed.
this.CollectionChanged += delegate { _isVerfifiedAndConverted = false; };
this.CollectionChanged += delegate { _isVerifiedAndConverted = false; };
}
/// <inheritdoc/>
public virtual IDisposable Apply(Animation animation, Animatable control, IObservable<bool> obsMatch, Action onComplete)
{
if (!_isVerfifiedAndConverted)
if (!_isVerifiedAndConverted)
VerifyConvertKeyFrames();
return obsMatch
@ -124,7 +121,7 @@ namespace Avalonia.Animation
}
AddNeutralKeyFramesIfNeeded();
_isVerfifiedAndConverted = true;
_isVerifiedAndConverted = true;
}

2
src/Avalonia.Animation/Cue.cs

@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Text;
namespace Avalonia.Animation
{

11
src/Avalonia.Animation/DoubleAnimator.cs

@ -1,13 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Linq;
using System.Reactive.Linq;
using System.Diagnostics;
using Avalonia.Animation.Utils;
using Avalonia.Data;
namespace Avalonia.Animation
namespace Avalonia.Animation
{
/// <summary>
/// Animator that handles <see cref="double"/> properties.

1
src/Avalonia.Animation/DoubleTransition.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Metadata;
using System;
using System.Reactive.Linq;

1
src/Avalonia.Animation/Easing/BounceEaseIn.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Utils;
namespace Avalonia.Animation.Easings

5
src/Avalonia.Animation/Easing/Easing.cs

@ -1,10 +1,7 @@
using Avalonia.Collections;
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Linq;
using System.ComponentModel;
using System.Linq;
namespace Avalonia.Animation.Easings
{

3
src/Avalonia.Animation/Easing/EasingTypeConverter.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Easings;
using System;
using System.ComponentModel;
using System.Globalization;
@ -20,4 +19,4 @@ namespace Avalonia.Animation.Easings
return Easing.Parse((string)value);
}
}
}
}

2
src/Avalonia.Animation/Easing/ElasticEaseIn.cs

@ -1,8 +1,8 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Utils;
using System;
using Avalonia.Animation.Utils;
namespace Avalonia.Animation.Easings
{

2
src/Avalonia.Animation/Easing/ElasticEaseOut.cs

@ -1,8 +1,8 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Utils;
using System;
using Avalonia.Animation.Utils;
namespace Avalonia.Animation.Easings
{

2
src/Avalonia.Animation/Easing/SineEaseIn.cs

@ -1,8 +1,8 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Utils;
using System;
using Avalonia.Animation.Utils;
namespace Avalonia.Animation.Easings
{

2
src/Avalonia.Animation/Easing/SineEaseOut.cs

@ -1,8 +1,8 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Utils;
using System;
using Avalonia.Animation.Utils;
namespace Avalonia.Animation.Easings
{

6
src/Avalonia.Animation/FillMode.cs

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Animation
namespace Avalonia.Animation
{
public enum FillMode
{

1
src/Avalonia.Animation/FloatTransition.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Metadata;
using System;
using System.Reactive.Linq;

2
src/Avalonia.Animation/IAnimation.cs

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Animation

1
src/Avalonia.Animation/IAnimator.cs

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Animation
{

2
src/Avalonia.Animation/ITransition.cs

@ -1,9 +1,7 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Metadata;
using System;
using System.Reactive.Linq;
namespace Avalonia.Animation
{

1
src/Avalonia.Animation/IntegerTransition.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Metadata;
using System;
using System.Reactive.Linq;

3
src/Avalonia.Animation/KeyFrame.cs

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using Avalonia.Metadata;
using Avalonia.Collections;
namespace Avalonia.Animation

11
src/Avalonia.Animation/KeyFramePair`1.cs

@ -1,14 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using Avalonia.Collections;
using System.ComponentModel;
using Avalonia.Animation.Utils;
using System.Reactive.Linq;
using System.Linq;
using Avalonia.Data;
using System.Reactive.Disposables;
namespace Avalonia.Animation
{
/// <summary>

8
src/Avalonia.Animation/PlayState.cs

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Animation
namespace Avalonia.Animation
{
/// <summary>
/// Determines the playback state of an animation.
@ -24,4 +20,4 @@ namespace Avalonia.Animation
/// </summary>
Stop
}
}
}

6
src/Avalonia.Animation/PlaybackDirection.cs

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Animation
namespace Avalonia.Animation
{
/// <summary>
/// Determines the playback direction of an animation.

5
src/Avalonia.Animation/RepeatCount.cs

@ -1,12 +1,9 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Utilities;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
namespace Avalonia.Animation
{
@ -199,4 +196,4 @@ namespace Avalonia.Animation
}
}
}
}
}

3
src/Avalonia.Animation/RepeatCountTypeConverter.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Animation.Easings;
using System;
using System.ComponentModel;
using System.Globalization;
@ -20,4 +19,4 @@ namespace Avalonia.Animation
return RepeatCount.Parse((string)value);
}
}
}
}

2
src/Avalonia.Animation/Timing.cs

@ -2,10 +2,8 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Diagnostics;
using System.Linq;
using System.Reactive.Linq;
using Avalonia.Data;
using Avalonia.Threading;
namespace Avalonia.Animation

3
src/Avalonia.Animation/Transition`1.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using Avalonia.Metadata;
using System;
using System.Reactive.Linq;
using Avalonia.Animation.Easings;
@ -65,4 +64,4 @@ namespace Avalonia.Animation
return control.Bind(Property, transition, Data.BindingPriority.Animation);
}
}
}
}

2
src/Avalonia.Animation/Utils/DoubleUtils.cs

@ -2,8 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Animation.Utils
{

1
src/Avalonia.Base/AvaloniaLocator.cs

@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reactive.Disposables;
#pragma warning disable CS1591 // Enable me later

2
src/Avalonia.Base/AvaloniaObject.cs

@ -5,12 +5,10 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using Avalonia.Data;
using Avalonia.Diagnostics;
using Avalonia.Logging;
using Avalonia.Reactive;
using Avalonia.Threading;
using Avalonia.Utilities;

4
src/Avalonia.Base/AvaloniaProperty.cs

@ -231,7 +231,7 @@ namespace Avalonia
}
/// <summary>
/// Tests two <see cref="AvaloniaProperty"/>s for unequality.
/// Tests two <see cref="AvaloniaProperty"/>s for inequality.
/// </summary>
/// <param name="a">The first property.</param>
/// <param name="b">The second property.</param>
@ -558,4 +558,4 @@ namespace Avalonia
public override string ToString() => "(unset)";
}
}
}
}

3
src/Avalonia.Base/Collections/AvaloniaList.cs

@ -8,7 +8,6 @@ using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using Avalonia.Diagnostics;
using Avalonia.Platform;
namespace Avalonia.Collections
{
@ -551,4 +550,4 @@ namespace Avalonia.Collections
NotifyCountChanged();
}
}
}
}

2
src/Avalonia.Base/Collections/AvaloniaListConverter.cs

@ -40,4 +40,4 @@ namespace Avalonia.Collections
return result;
}
}
}
}

1
src/Avalonia.Base/Collections/AvaloniaListExtensions.cs

@ -6,7 +6,6 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Linq;
using System.Reactive.Disposables;
namespace Avalonia.Collections

4
src/Avalonia.Base/Collections/IAvaloniaList.cs

@ -6,7 +6,7 @@ using System.Collections.Generic;
namespace Avalonia.Collections
{
/// <summary>
/// A notiftying list.
/// A notifying list.
/// </summary>
/// <typeparam name="T">The type of the items in the list.</typeparam>
public interface IAvaloniaList<T> : IList<T>, IAvaloniaReadOnlyList<T>
@ -64,4 +64,4 @@ namespace Avalonia.Collections
/// <param name="count">The number of items to remove.</param>
void RemoveRange(int index, int count);
}
}
}

4
src/Avalonia.Base/Collections/IAvaloniaReadOnlyList.cs

@ -8,10 +8,10 @@ using System.ComponentModel;
namespace Avalonia.Collections
{
/// <summary>
/// A read-only notiftying list.
/// A read-only notifying list.
/// </summary>
/// <typeparam name="T">The type of the items in the list.</typeparam>
public interface IAvaloniaReadOnlyList<out T> : IReadOnlyList<T>, INotifyCollectionChanged, INotifyPropertyChanged
{
}
}
}

4
src/Avalonia.Base/Collections/NotifyCollectionChangedExtensions.cs

@ -25,7 +25,7 @@ namespace Avalonia.Collections
}
/// <summary>
/// Subcribes to the CollectionChanged event using a weak subscription.
/// Subscribes to the CollectionChanged event using a weak subscription.
/// </summary>
/// <param name="collection">The collection.</param>
/// <param name="handler">
@ -44,7 +44,7 @@ namespace Avalonia.Collections
}
/// <summary>
/// Subcribes to the CollectionChanged event using a weak subscription.
/// Subscribes to the CollectionChanged event using a weak subscription.
/// </summary>
/// <param name="collection">The collection.</param>
/// <param name="handler">

10
src/Avalonia.Base/Data/BindingChainException.cs

@ -6,7 +6,7 @@ using System;
namespace Avalonia.Data
{
/// <summary>
/// An exception returned through <see cref="BindingNotification"/> signalling that a
/// An exception returned through <see cref="BindingNotification"/> signaling that a
/// requested binding expression could not be evaluated because of a null in one of the links
/// of the binding chain.
/// </summary>
@ -15,14 +15,14 @@ namespace Avalonia.Data
private string _message;
/// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class.
/// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary>
public BindingChainException()
{
}
/// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class.
/// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary>
/// <param name="message">The error message.</param>
public BindingChainException(string message)
@ -31,7 +31,7 @@ namespace Avalonia.Data
}
/// <summary>
/// Initalizes a new instance of the <see cref="BindingChainException"/> class.
/// Initializes a new instance of the <see cref="BindingChainException"/> class.
/// </summary>
/// <param name="message">The error message.</param>
/// <param name="expression">The expression.</param>
@ -51,7 +51,7 @@ namespace Avalonia.Data
public string Expression { get; protected set; }
/// <summary>
/// Gets the point in the expression at which the error occured.
/// Gets the point in the expression at which the error occurred.
/// </summary>
public string ExpressionErrorPoint { get; protected set; }

1
src/Avalonia.Base/Data/BindingNotification.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Logging;
namespace Avalonia.Data
{

2
src/Avalonia.Base/Data/BindingOperations.cs

@ -20,7 +20,7 @@ namespace Avalonia.Data
/// An optional anchor from which to locate required context. When binding to objects that
/// are not in the logical tree, certain types of binding need an anchor into the tree in
/// order to locate named controls or resources. The <paramref name="anchor"/> parameter
/// can be used to provice this context.
/// can be used to provide this context.
/// </param>
/// <returns>An <see cref="IDisposable"/> which can be used to cancel the binding.</returns>
public static IDisposable Apply(

6
src/Avalonia.Base/Data/Converters/AlwaysEnabledDelegateCommand.cs

@ -1,10 +1,8 @@
using Avalonia.Utilities;
using System;
using System.Collections.Generic;
using System;
using System.Globalization;
using System.Reflection;
using System.Text;
using System.Windows.Input;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters
{

3
src/Avalonia.Base/Data/Converters/DefaultValueConverter.cs

@ -3,9 +3,8 @@
using System;
using System.Globalization;
using Avalonia.Data;
using Avalonia.Utilities;
using System.Windows.Input;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters
{

1
src/Avalonia.Base/Data/Converters/IValueConverter.cs

@ -3,7 +3,6 @@
using System;
using System.Globalization;
using Avalonia.Data;
namespace Avalonia.Data.Converters
{

3
src/Avalonia.Base/Data/Converters/StringConverters.cs

@ -1,9 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Globalization;
using Avalonia.Utilities;
namespace Avalonia.Data.Converters
{

2
src/Avalonia.Base/Data/Core/AvaloniaPropertyAccessorNode.cs

@ -1,7 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reactive.Linq;
using System.Text;
using Avalonia.Reactive;
namespace Avalonia.Data.Core

3
src/Avalonia.Base/Data/Core/EmptyExpressionNode.cs

@ -1,9 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Reactive.Linq;
namespace Avalonia.Data.Core
{
public class EmptyExpressionNode : ExpressionNode

1
src/Avalonia.Base/Data/Core/ExpressionObserver.cs

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.Linq.Expressions;
using System.Reactive;
using System.Reactive.Linq;
using Avalonia.Data;
using Avalonia.Data.Core.Parsers;
using Avalonia.Data.Core.Plugins;
using Avalonia.Reactive;

1
src/Avalonia.Base/Data/Core/ExpressionParseException.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Data.Core.Parsers;
namespace Avalonia.Data.Core
{

6
src/Avalonia.Base/Data/Core/ITransformNode.cs

@ -1,8 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace Avalonia.Data.Core
namespace Avalonia.Data.Core
{
interface ITransformNode
{

2
src/Avalonia.Base/Data/Core/IndexerExpressionNode.cs

@ -3,8 +3,6 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
using Avalonia.Data;
namespace Avalonia.Data.Core
{

4
src/Avalonia.Base/Data/Core/IndexerNodeBase.cs

@ -3,12 +3,8 @@ using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Reactive.Linq;
using System.Reflection;
using System.Text;
using Avalonia.Data;
using Avalonia.Utilities;
namespace Avalonia.Data.Core

1
src/Avalonia.Base/Data/Core/LogicalNotNode.cs

@ -3,7 +3,6 @@
using System;
using System.Globalization;
using Avalonia.Data;
namespace Avalonia.Data.Core
{

5
src/Avalonia.Base/Data/Core/Parsers/ExpressionTreeParser.cs

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
namespace Avalonia.Data.Core.Parsers
{

2
src/Avalonia.Base/Data/Core/Parsers/ExpressionVisitorNodeBuilder.cs

@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using System.Text;
namespace Avalonia.Data.Core.Parsers
{

2
src/Avalonia.Base/Data/Core/Plugins/AvaloniaPropertyAccessorPlugin.cs

@ -2,9 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Linq;
using System.Reactive.Linq;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins
{

3
src/Avalonia.Base/Data/Core/Plugins/DataAnnotationsValidationPlugin.cs

@ -6,7 +6,6 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins
{
@ -31,7 +30,7 @@ namespace Avalonia.Data.Core.Plugins
return new Accessor(reference, name, inner);
}
private class Accessor : DataValidatiorBase
private class Accessor : DataValidationBase
{
private ValidationContext _context;

9
src/Avalonia.Base/Data/Core/Plugins/DataValidatiorBase.cs → src/Avalonia.Base/Data/Core/Plugins/DataValidationBase.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins
{
@ -15,15 +14,15 @@ namespace Avalonia.Data.Core.Plugins
/// and convert any values received from the inner property accessor into
/// <see cref="BindingNotification"/>s.
/// </remarks>
public abstract class DataValidatiorBase : PropertyAccessorBase, IObserver<object>
public abstract class DataValidationBase : PropertyAccessorBase, IObserver<object>
{
private readonly IPropertyAccessor _inner;
/// <summary>
/// Initializes a new instance of the <see cref="DataValidatiorBase"/> class.
/// Initializes a new instance of the <see cref="DataValidationBase"/> class.
/// </summary>
/// <param name="inner">The inner property accessor.</param>
protected DataValidatiorBase(IPropertyAccessor inner)
protected DataValidationBase(IPropertyAccessor inner)
{
_inner = inner;
}
@ -77,4 +76,4 @@ namespace Avalonia.Data.Core.Plugins
PublishValue(notification);
}
}
}
}

2
src/Avalonia.Base/Data/Core/Plugins/ExceptionValidationPlugin.cs

@ -20,7 +20,7 @@ namespace Avalonia.Data.Core.Plugins
return new Validator(reference, name, inner);
}
private class Validator : DataValidatiorBase
private class Validator : DataValidationBase
{
public Validator(WeakReference reference, string name, IPropertyAccessor inner)
: base(inner)

1
src/Avalonia.Base/Data/Core/Plugins/IDataValidationPlugin.cs

@ -2,7 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins
{

2
src/Avalonia.Base/Data/Core/Plugins/IndeiValidationPlugin.cs

@ -23,7 +23,7 @@ namespace Avalonia.Data.Core.Plugins
return new Validator(reference, name, accessor);
}
private class Validator : DataValidatiorBase, IWeakSubscriber<DataErrorsChangedEventArgs>
private class Validator : DataValidationBase, IWeakSubscriber<DataErrorsChangedEventArgs>
{
WeakReference _reference;
string _name;

2
src/Avalonia.Base/Data/Core/Plugins/InpcPropertyAccessorPlugin.cs

@ -6,8 +6,6 @@ using System.ComponentModel;
using System.Linq;
using System.Reactive.Linq;
using System.Reflection;
using Avalonia.Data;
using Avalonia.Logging;
using Avalonia.Utilities;
namespace Avalonia.Data.Core.Plugins

5
src/Avalonia.Base/Data/Core/Plugins/MethodAccessorPlugin.cs

@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.Text;
using Avalonia.Data;
using System.Reflection;
using System.Linq;
using System.Reflection;
namespace Avalonia.Data.Core.Plugins
{

2
src/Avalonia.Base/Data/Core/Plugins/TaskStreamPlugin.cs

@ -2,12 +2,10 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Reactive.Concurrency;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Reflection;
using System.Threading.Tasks;
using Avalonia.Data;
namespace Avalonia.Data.Core.Plugins
{

7
src/Avalonia.Base/Data/Core/SettableNode.cs

@ -1,9 +1,4 @@
using Avalonia.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System;
namespace Avalonia.Data.Core
{

2
src/Avalonia.Base/Data/Core/StreamBindingExtensions.cs

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia

2
src/Avalonia.Base/Data/IBinding.cs

@ -17,7 +17,7 @@ namespace Avalonia.Data
/// An optional anchor from which to locate required context. When binding to objects that
/// are not in the logical tree, certain types of binding need an anchor into the tree in
/// order to locate named controls or resources. The <paramref name="anchor"/> parameter
/// can be used to provice this context.
/// can be used to provide this context.
/// </param>
/// <param name="enableDataValidation">Whether data validation should be enabled.</param>
/// <returns>

2
src/Avalonia.Base/Logging/Logger.cs

@ -11,7 +11,7 @@ namespace Avalonia.Logging
public static class Logger
{
/// <summary>
/// Gets or sets the application-defined sink that recieves the messages.
/// Gets or sets the application-defined sink that receives the messages.
/// </summary>
public static ILogSink Sink { get; set; }

4
src/Avalonia.Base/Platform/IRuntimePlatform.cs

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Platform
{

1
src/Avalonia.Base/PriorityLevel.cs

@ -5,7 +5,6 @@ using System;
using System.Collections.Generic;
using System.Reactive.Disposables;
using Avalonia.Data;
using Avalonia.Logging;
namespace Avalonia
{

6
src/Avalonia.Base/PriorityValue.cs

@ -12,12 +12,12 @@ using Avalonia.Utilities;
namespace Avalonia
{
/// <summary>
/// Maintains a list of prioritised bindings together with a current value.
/// Maintains a list of prioritized bindings together with a current value.
/// </summary>
/// <remarks>
/// Bindings, in the form of <see cref="IObservable{Object}"/>s are added to the object using
/// the <see cref="Add"/> method. With the observable is passed a priority, where lower values
/// represent higher priorites. The current <see cref="Value"/> is selected from the highest
/// represent higher priorities. The current <see cref="Value"/> is selected from the highest
/// priority binding that doesn't return <see cref="AvaloniaProperty.UnsetValue"/>. Where there
/// are multiple bindings registered with the same priority, the most recently added binding
/// has a higher priority. Each time the value changes, the
@ -236,7 +236,7 @@ namespace Avalonia
}
/// <summary>
/// Updates the current <see cref="Value"/> and notifies all subscibers.
/// Updates the current <see cref="Value"/> and notifies all subscribers.
/// </summary>
/// <param name="value">The value to set.</param>
/// <param name="priority">The priority level that the value came from.</param>

1
src/Avalonia.Base/PropertyMetadata.cs

@ -1,7 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using Avalonia.Data;
namespace Avalonia

7
src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs

@ -1,11 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Threading;
namespace Avalonia.Threading
@ -48,4 +43,4 @@ namespace Avalonia.Threading
Dispatcher.UIThread.InvokeAsync(() => d(state), DispatcherPriority.Send).Wait();
}
}
}
}

14
src/Avalonia.Base/Threading/Dispatcher.cs

@ -92,6 +92,20 @@ namespace Avalonia.Threading
return _jobRunner.InvokeAsync(function, priority);
}
/// <inheritdoc/>
public Task InvokeAsync(Func<Task> function, DispatcherPriority priority = DispatcherPriority.Normal)
{
Contract.Requires<ArgumentNullException>(function != null);
return _jobRunner.InvokeAsync(function, priority).Unwrap();
}
/// <inheritdoc/>
public Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> function, DispatcherPriority priority = DispatcherPriority.Normal)
{
Contract.Requires<ArgumentNullException>(function != null);
return _jobRunner.InvokeAsync(function, priority).Unwrap();
}
/// <inheritdoc/>
public void Post(Action action, DispatcherPriority priority = DispatcherPriority.Normal)
{

18
src/Avalonia.Base/Threading/IDispatcher.cs

@ -40,5 +40,23 @@ namespace Avalonia.Threading
/// <param name="function">The method.</param>
/// <param name="priority">The priority with which to invoke the method.</param>
Task<TResult> InvokeAsync<TResult>(Func<TResult> function, DispatcherPriority priority = DispatcherPriority.Normal);
/// <summary>
/// Queues the specified work to run on the dispatcher thread and returns a proxy for the
/// task returned by <paramref name="function"/>.
/// </summary>
/// <param name="function">The work to execute asynchronously.</param>
/// <param name="priority">The priority with which to invoke the method.</param>
/// <returns>A task that represents a proxy for the task returned by <paramref name="function"/>.</returns>
Task InvokeAsync(Func<Task> function, DispatcherPriority priority = DispatcherPriority.Normal);
/// <summary>
/// Queues the specified work to run on the dispatcher thread and returns a proxy for the
/// task returned by <paramref name="function"/>.
/// </summary>
/// <param name="function">The work to execute asynchronously.</param>
/// <param name="priority">The priority with which to invoke the method.</param>
/// <returns>A task that represents a proxy for the task returned by <paramref name="function"/>.</returns>
Task<TResult> InvokeAsync<TResult>(Func<Task<TResult>> function, DispatcherPriority priority = DispatcherPriority.Normal);
}
}

2
src/Avalonia.Base/Utilities/CharacterReader.cs

@ -2,8 +2,6 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Globalization;
using System.Text;
namespace Avalonia.Utilities
{

3
src/Avalonia.Base/Utilities/DeferredSetter.cs

@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Reactive.Disposables;
using System.Runtime.CompilerServices;
using System.Text;
namespace Avalonia.Utilities
{

2
src/Avalonia.Base/Utilities/IdentifierParser.cs

@ -2,9 +2,7 @@
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
namespace Avalonia.Utilities
{

4
src/Avalonia.Base/Utilities/MathUtilities.cs

@ -1,10 +1,6 @@
// Copyright (c) The Avalonia Project. All rights reserved.
// Licensed under the MIT license. See licence.md file in the project root for full license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Avalonia.Utilities
{

2
src/Avalonia.Base/Utilities/SingleOrDictionary.cs

@ -2,8 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Avalonia.Utilities
{

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save