diff --git a/samples/interop/Direct3DInteropSample/MainWindow.cs b/samples/interop/Direct3DInteropSample/MainWindow.cs
index ffa0de0a36..19c31a3af1 100644
--- a/samples/interop/Direct3DInteropSample/MainWindow.cs
+++ b/samples/interop/Direct3DInteropSample/MainWindow.cs
@@ -88,7 +88,6 @@ namespace Direct3DInteropSample
context.ClearDepthStencilView(depthView, DepthStencilClearFlags.Depth, 1.0f, 0);
context.ClearRenderTargetView(renderView, Color.White);
- var time = 50;
// Update WorldViewProj Matrix
var worldViewProj = Matrix.RotationX((float) _model.RotationX) * Matrix.RotationY((float) _model.RotationY) *
Matrix.RotationZ((float) _model.RotationZ)
diff --git a/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs b/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
index 0f90472bd0..71822a6f47 100644
--- a/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
+++ b/src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
@@ -126,8 +126,6 @@ namespace Avalonia.Android.Platform.Specific.Helpers
return e.Action != MotionEventActions.Up;
}
- private Paint _paint;
-
public void Dispose()
{
HandleEvents = false;
diff --git a/src/Avalonia.Animation/AnimatorKeyFrame.cs b/src/Avalonia.Animation/AnimatorKeyFrame.cs
index 875bf761c4..02457cb9aa 100644
--- a/src/Avalonia.Animation/AnimatorKeyFrame.cs
+++ b/src/Avalonia.Animation/AnimatorKeyFrame.cs
@@ -9,7 +9,7 @@ namespace Avalonia.Animation
{
///
/// Defines a KeyFrame that is used for
- /// objects.
+ /// objects.
///
public class AnimatorKeyFrame
{
diff --git a/src/Avalonia.Controls/Presenters/CarouselPresenter.cs b/src/Avalonia.Controls/Presenters/CarouselPresenter.cs
index 144174e371..0f9bfe4de0 100644
--- a/src/Avalonia.Controls/Presenters/CarouselPresenter.cs
+++ b/src/Avalonia.Controls/Presenters/CarouselPresenter.cs
@@ -115,7 +115,9 @@ namespace Avalonia.Controls.Presenters
var containers = generator.RemoveRange(e.OldStartingIndex, e.OldItems.Count);
Panel.Children.RemoveAll(containers.Select(x => x.ContainerControl));
+#pragma warning disable 4014
MoveToPage(-1, SelectedIndex);
+#pragma warning restore 4014
}
break;
@@ -126,7 +128,9 @@ namespace Avalonia.Controls.Presenters
generator.Clear();
Panel.Children.RemoveAll(containers.Select(x => x.ContainerControl));
+#pragma warning disable 4014
MoveToPage(-1, SelectedIndex >= 0 ? SelectedIndex : 0);
+#pragma warning restore 4014
}
break;
}
diff --git a/src/Avalonia.Remote.Protocol/TcpTransportBase.cs b/src/Avalonia.Remote.Protocol/TcpTransportBase.cs
index 3d2bd09485..562dbdf8f9 100644
--- a/src/Avalonia.Remote.Protocol/TcpTransportBase.cs
+++ b/src/Avalonia.Remote.Protocol/TcpTransportBase.cs
@@ -48,14 +48,12 @@ namespace Avalonia.Remote.Protocol
{
var cl = await server.AcceptTcpClientAsync();
AcceptNew();
- Task.Run(async () =>
+ await Task.Run(async () =>
{
var tcs = new TaskCompletionSource();
var t = CreateTransport(_resolver, cl.GetStream(), () => tcs.TrySetResult(0));
cb(t);
await tcs.Task;
-
-
});
}
catch
diff --git a/src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs b/src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs
index c2005c9acb..cb996867c4 100644
--- a/src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs
+++ b/src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs
@@ -7,7 +7,7 @@ using System.Linq;
namespace Avalonia.Media.Fonts
{
///
- /// Represents an identifier for a
+ /// Represents an identifier for a
///
public class FontFamilyKey
{
@@ -33,12 +33,12 @@ namespace Avalonia.Media.Fonts
}
///
- /// Location of stored font asset that belongs to a
+ /// Location of stored font asset that belongs to a
///
public Uri Location { get; }
///
- /// Optional filename for a font asset that belongs to a
+ /// Optional filename for a font asset that belongs to a
///
public string FileName { get; }
diff --git a/src/Gtk/Avalonia.Gtk3/Interop/GlibTimeout.cs b/src/Gtk/Avalonia.Gtk3/Interop/GlibTimeout.cs
index 0ab4ef980c..971edb1364 100644
--- a/src/Gtk/Avalonia.Gtk3/Interop/GlibTimeout.cs
+++ b/src/Gtk/Avalonia.Gtk3/Interop/GlibTimeout.cs
@@ -21,20 +21,17 @@ namespace Avalonia.Gtk3.Interop
}
return true;
}
-
- private static readonly GCHandle PinnedHandle;
+
private static readonly Native.D.timeout_callback PinnedHandler;
static GlibTimeout()
{
PinnedHandler = Handler;
-
}
public static void Add(int priority, uint interval, Func callback)
{
var handle = GCHandle.Alloc(callback);
- //Native.GTimeoutAdd(interval, PinnedHandler, GCHandle.ToIntPtr(handle));
Native.GTimeoutAddFull(priority, interval, PinnedHandler, GCHandle.ToIntPtr(handle), IntPtr.Zero);
}
diff --git a/src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs b/src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs
index 0db622ba13..627b508aa8 100644
--- a/src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs
+++ b/src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs
@@ -70,6 +70,10 @@ namespace Avalonia.LinuxFramebuffer
public Action Resized { get; set; }
public Action ScalingChanged { get; set; }
public Action Closed { get; set; }
- public event Action LostFocus;
+ public event Action LostFocus
+ {
+ add {}
+ remove {}
+ }
}
}
diff --git a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs
index 81525fef7d..458b09b66e 100644
--- a/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs
+++ b/src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs
@@ -14,13 +14,13 @@ namespace Portable.Xaml.ComponentModel
/// Gets the service from ITypeDescriptorContext
/// usually in TypeConverter in xaml reader context
/// examples:
- /// context.GetService()
- /// context.GetService()
- /// context.GetService()
- /// context.GetService()
- /// context.GetService()
- /// context.GetService()
- /// context.GetService()
+ /// context.GetService<IXamlTypeResolver>()
+ /// context.GetService<IXamlNamespaceResolver>()
+ /// context.GetService<IXamlNameProvider>()
+ /// context.GetService<INamespacePrefixLookup>()
+ /// context.GetService<IXamlSchemaContextProvider>()
+ /// context.GetService<IRootObjectProvider>()
+ /// context.GetService<IProvideValueTarget>()
///
/// Service Type
/// The TypeDescriptor context.
diff --git a/src/OSX/Avalonia.MonoMac/ClipboardImpl.cs b/src/OSX/Avalonia.MonoMac/ClipboardImpl.cs
index f7b98c0c1f..29eb3720ec 100644
--- a/src/OSX/Avalonia.MonoMac/ClipboardImpl.cs
+++ b/src/OSX/Avalonia.MonoMac/ClipboardImpl.cs
@@ -22,9 +22,10 @@ namespace Avalonia.MonoMac
return Task.CompletedTask;
}
- public async Task ClearAsync()
+ public Task ClearAsync()
{
NSPasteboard.GeneralPasteboard.ClearContents();
+ return Task.CompletedTask;
}
}
}
diff --git a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
index b03e022674..6713cb13be 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
@@ -19,6 +19,7 @@ namespace Avalonia.Direct2D1.Media
/// Initialize a new instance of the class
/// with a bitmap backed by GPU memory.
///
+ /// The image factory to use when saving out this bitmap.
/// The GPU bitmap.
///
/// This bitmap must be either from the same render target,
diff --git a/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs b/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
index e0e9e340bb..c00a826d0c 100644
--- a/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
+++ b/src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
@@ -11,6 +11,7 @@ namespace Avalonia.Direct2D1.Media
///
/// Initializes a new instance of the class.
///
+ /// The source geometry.
/// An existing Direct2D .
public TransformedGeometryImpl(TransformedGeometry geometry, GeometryImpl source)
: base(geometry)
diff --git a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
index 86dcec410b..4095447943 100644
--- a/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
+++ b/src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
@@ -998,7 +998,7 @@ namespace Avalonia.Win32.Interop
public static extern int DragQueryFile(IntPtr hDrop, int iFile, StringBuilder lpszFile, int cch);
[DllImport("ole32.dll", CharSet = CharSet.Auto, ExactSpelling = true, PreserveSig = false)]
- public static extern void DoDragDrop(IOleDataObject dataObject, IDropSource dropSource, int allowedEffects, int[] finalEffect);
+ internal static extern void DoDragDrop(IOleDataObject dataObject, IDropSource dropSource, int allowedEffects, int[] finalEffect);
@@ -1408,7 +1408,7 @@ namespace Avalonia.Win32.Interop
[ComImport]
[Guid("0000010E-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- public interface IOleDataObject
+ internal interface IOleDataObject
{
void GetData([In] ref FORMATETC format, out STGMEDIUM medium);
void GetDataHere([In] ref FORMATETC format, ref STGMEDIUM medium);
diff --git a/src/iOS/Avalonia.iOS/DisplayLinkRenderLoop.cs b/src/iOS/Avalonia.iOS/DisplayLinkRenderLoop.cs
index ef045f61bf..a6d1bf1670 100644
--- a/src/iOS/Avalonia.iOS/DisplayLinkRenderLoop.cs
+++ b/src/iOS/Avalonia.iOS/DisplayLinkRenderLoop.cs
@@ -26,7 +26,7 @@ namespace Avalonia.iOS
{
Tick?.Invoke(this, new EventArgs());
}
- catch (Exception e)
+ catch (Exception)
{
//TODO: log
}
diff --git a/src/iOS/Avalonia.iOS/TopLevelImpl.cs b/src/iOS/Avalonia.iOS/TopLevelImpl.cs
index 5d0074e6db..3a2d2a33c6 100644
--- a/src/iOS/Avalonia.iOS/TopLevelImpl.cs
+++ b/src/iOS/Avalonia.iOS/TopLevelImpl.cs
@@ -26,7 +26,6 @@ namespace Avalonia.iOS
{
private IInputRoot _inputRoot;
private readonly KeyboardEventsHelper _keyboardHelper;
- private Point _position;
public TopLevelImpl()
{
@@ -52,7 +51,7 @@ namespace Avalonia.iOS
public Action Resized { get; set; }
public Action ScalingChanged { get; set; }
- public IPlatformHandle Handle => null;
+ public new IPlatformHandle Handle => null;
public double Scaling => UIScreen.MainScreen.Scale;
diff --git a/tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Threading.cs b/tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Threading.cs
index 78823a370b..e067886742 100644
--- a/tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Threading.cs
+++ b/tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Threading.cs
@@ -160,7 +160,9 @@ namespace Avalonia.Base.UnitTests
public bool CurrentThreadIsLoopThread { get; set; }
+#pragma warning disable 67
public event Action Signaled;
+#pragma warning restore 67
public void RunLoop(CancellationToken cancellationToken)
{
diff --git a/tests/Avalonia.Interactivity.UnitTests/InteractiveTests.cs b/tests/Avalonia.Interactivity.UnitTests/InteractiveTests.cs
index 067cf85c3c..58ee63cea4 100644
--- a/tests/Avalonia.Interactivity.UnitTests/InteractiveTests.cs
+++ b/tests/Avalonia.Interactivity.UnitTests/InteractiveTests.cs
@@ -403,7 +403,7 @@ namespace Avalonia.Interactivity.UnitTests
private class TestInteractive : Interactive
{
public bool ClassHandlerInvoked { get; private set; }
- public string Name { get; set; }
+ public new string Name { get; set; }
public IEnumerable Children
{
diff --git a/tests/Avalonia.RenderTests/TestBase.cs b/tests/Avalonia.RenderTests/TestBase.cs
index 321dbc4fbe..19413b32eb 100644
--- a/tests/Avalonia.RenderTests/TestBase.cs
+++ b/tests/Avalonia.RenderTests/TestBase.cs
@@ -161,7 +161,9 @@ namespace Avalonia.Direct2D1.RenderTests
public Thread MainThread { get; set; }
+#pragma warning disable 67
public event Action Signaled;
+#pragma warning restore 67
public void RunLoop(CancellationToken cancellationToken)
{