Browse Source

Clean up unused code warnings and malformed doc comments.

pull/1663/head
Jeremy Koritzinsky 8 years ago
parent
commit
18f436a2c3
  1. 1
      samples/interop/Direct3DInteropSample/MainWindow.cs
  2. 2
      src/Android/Avalonia.Android/Platform/Specific/Helpers/AndroidTouchEventsHelper.cs
  3. 2
      src/Avalonia.Animation/AnimatorKeyFrame.cs
  4. 4
      src/Avalonia.Controls/Presenters/CarouselPresenter.cs
  5. 4
      src/Avalonia.Remote.Protocol/TcpTransportBase.cs
  6. 6
      src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs
  7. 5
      src/Gtk/Avalonia.Gtk3/Interop/GlibTimeout.cs
  8. 6
      src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs
  9. 14
      src/Markup/Avalonia.Markup.Xaml/PortableXaml/TypeDescriptorExtensions.cs
  10. 3
      src/OSX/Avalonia.MonoMac/ClipboardImpl.cs
  11. 1
      src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs
  12. 1
      src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs
  13. 4
      src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
  14. 2
      src/iOS/Avalonia.iOS/DisplayLinkRenderLoop.cs
  15. 3
      src/iOS/Avalonia.iOS/TopLevelImpl.cs
  16. 2
      tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_Threading.cs
  17. 2
      tests/Avalonia.Interactivity.UnitTests/InteractiveTests.cs
  18. 2
      tests/Avalonia.RenderTests/TestBase.cs

1
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)

2
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;

2
src/Avalonia.Animation/AnimatorKeyFrame.cs

@ -9,7 +9,7 @@ namespace Avalonia.Animation
{
/// <summary>
/// Defines a KeyFrame that is used for
/// <see cref="Animators"/> objects.
/// <see cref="Animator{T}"/> objects.
/// </summary>
public class AnimatorKeyFrame
{

4
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;
}

4
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<int>();
var t = CreateTransport(_resolver, cl.GetStream(), () => tcs.TrySetResult(0));
cb(t);
await tcs.Task;
});
}
catch

6
src/Avalonia.Visuals/Media/Fonts/FontFamilyKey.cs

@ -7,7 +7,7 @@ using System.Linq;
namespace Avalonia.Media.Fonts
{
/// <summary>
/// Represents an identifier for a <see cref="IFontFamily"/>
/// Represents an identifier for a <see cref="FontFamily"/>
/// </summary>
public class FontFamilyKey
{
@ -33,12 +33,12 @@ namespace Avalonia.Media.Fonts
}
/// <summary>
/// Location of stored font asset that belongs to a <see cref="IFontFamily"/>
/// Location of stored font asset that belongs to a <see cref="FontFamily"/>
/// </summary>
public Uri Location { get; }
/// <summary>
/// Optional filename for a font asset that belongs to a <see cref="IFontFamily"/>
/// Optional filename for a font asset that belongs to a <see cref="FontFamily"/>
/// </summary>
public string FileName { get; }

5
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<bool> callback)
{
var handle = GCHandle.Alloc(callback);
//Native.GTimeoutAdd(interval, PinnedHandler, GCHandle.ToIntPtr(handle));
Native.GTimeoutAddFull(priority, interval, PinnedHandler, GCHandle.ToIntPtr(handle), IntPtr.Zero);
}

6
src/Linux/Avalonia.LinuxFramebuffer/FramebufferToplevelImpl.cs

@ -70,6 +70,10 @@ namespace Avalonia.LinuxFramebuffer
public Action<Size> Resized { get; set; }
public Action<double> ScalingChanged { get; set; }
public Action Closed { get; set; }
public event Action LostFocus;
public event Action LostFocus
{
add {}
remove {}
}
}
}

14
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<IXamlTypeResolver>()
/// context.GetService<IXamlNamespaceResolver>()
/// context.GetService<IXamlNameProvider>()
/// context.GetService<INamespacePrefixLookup>()
/// context.GetService<IXamlSchemaContextProvider>()
/// context.GetService<IRootObjectProvider>()
/// context.GetService<IProvideValueTarget>()
/// context.GetService&lt;IXamlTypeResolver&gt;()
/// context.GetService&lt;IXamlNamespaceResolver&gt;()
/// context.GetService&lt;IXamlNameProvider&gt;()
/// context.GetService&lt;INamespacePrefixLookup&gt;()
/// context.GetService&lt;IXamlSchemaContextProvider&gt;()
/// context.GetService&lt;IRootObjectProvider&gt;()
/// context.GetService&lt;IProvideValueTarget&gt;()
/// </summary>
/// <typeparam name="T">Service Type</typeparam>
/// <param name="ctx">The TypeDescriptor context.</param>

3
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;
}
}
}

1
src/Windows/Avalonia.Direct2D1/Media/Imaging/D2DBitmapImpl.cs

@ -19,6 +19,7 @@ namespace Avalonia.Direct2D1.Media
/// Initialize a new instance of the <see cref="BitmapImpl"/> class
/// with a bitmap backed by GPU memory.
/// </summary>
/// <param name="imagingFactory">The image factory to use when saving out this bitmap.</param>
/// <param name="d2DBitmap">The GPU bitmap.</param>
/// <remarks>
/// This bitmap must be either from the same render target,

1
src/Windows/Avalonia.Direct2D1/Media/TransformedGeometryImpl.cs

@ -11,6 +11,7 @@ namespace Avalonia.Direct2D1.Media
/// <summary>
/// Initializes a new instance of the <see cref="StreamGeometryImpl"/> class.
/// </summary>
/// <param name="source">The source geometry.</param>
/// <param name="geometry">An existing Direct2D <see cref="TransformedGeometry"/>.</param>
public TransformedGeometryImpl(TransformedGeometry geometry, GeometryImpl source)
: base(geometry)

4
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);

2
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
}

3
src/iOS/Avalonia.iOS/TopLevelImpl.cs

@ -26,7 +26,6 @@ namespace Avalonia.iOS
{
private IInputRoot _inputRoot;
private readonly KeyboardEventsHelper<TopLevelImpl> _keyboardHelper;
private Point _position;
public TopLevelImpl()
{
@ -52,7 +51,7 @@ namespace Avalonia.iOS
public Action<Size> Resized { get; set; }
public Action<double> ScalingChanged { get; set; }
public IPlatformHandle Handle => null;
public new IPlatformHandle Handle => null;
public double Scaling => UIScreen.MainScreen.Scale;

2
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<DispatcherPriority?> Signaled;
#pragma warning restore 67
public void RunLoop(CancellationToken cancellationToken)
{

2
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<IVisual> Children
{

2
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<DispatcherPriority?> Signaled;
#pragma warning restore 67
public void RunLoop(CancellationToken cancellationToken)
{

Loading…
Cancel
Save