Browse Source

chore: fix some comments (#16461)

pull/16551/head
shangchenglumetro 2 years ago
committed by GitHub
parent
commit
3deddbe305
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 6
      src/Avalonia.Base/Data/BindingChainException.cs
  2. 4
      src/Avalonia.FreeDesktop/DBusXml/com.canonical.dbusmenu.xml
  3. 4
      src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs
  4. 2
      src/Windows/Avalonia.Win32/Interop/Win32Icon.cs
  5. 2
      src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs
  6. 2
      src/tools/Avalonia.Generators/GeneratorContextExtensions.cs
  7. 2
      tests/Avalonia.Base.UnitTests/Layout/LayoutManagerTests.cs
  8. 4
      tests/Avalonia.Controls.UnitTests/ListBoxTests_Single.cs
  9. 2
      tests/Avalonia.Controls.UnitTests/Primitives/SelectingItemsControlTests.cs

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

@ -60,15 +60,15 @@ namespace Avalonia.Data
{
if (Expression != null && ExpressionErrorPoint != null)
{
return $"An error occured binding to '{Expression}' at '{ExpressionErrorPoint}': '{_message}'";
return $"An error occurred binding to '{Expression}' at '{ExpressionErrorPoint}': '{_message}'";
}
else if (Expression != null)
{
return $"An error occured binding to '{Expression}': '{_message}'";
return $"An error occurred binding to '{Expression}': '{_message}'";
}
else
{
return $"An error occured in a binding: '{_message}'";
return $"An error occurred in a binding: '{_message}'";
}
}
}

4
src/Avalonia.FreeDesktop/DBusXml/com.canonical.dbusmenu.xml

@ -322,7 +322,7 @@ License version 3 and version 2.1 along with this program. If not, see
<dox:d>event-specific data</dox:d>
</arg>
<arg type="u" name="timestamp" direction="in" >
<dox:d>The time that the event occured if available or the time the message was sent if not</dox:d>
<dox:d>The time that the event occurred if available or the time the message was sent if not</dox:d>
</arg>
</method>
@ -427,7 +427,7 @@ License version 3 and version 2.1 along with this program. If not, see
<dox:d>ID of the menu that should be activated</dox:d>
</arg>
<arg type="u" name="timestamp" direction="out" >
<dox:d>The time that the event occured</dox:d>
<dox:d>The time that the event occurred</dox:d>
</arg>
</signal>

4
src/Windows/Avalonia.Direct2D1/Media/GeometryImpl.cs

@ -109,7 +109,7 @@ namespace Avalonia.Direct2D1.Media
/// <inheritdoc />
public bool TryGetPointAndTangentAtDistance(double distance, out Point point, out Point tangent)
{
// Direct2D doesnt have this sadly.
// Direct2D doesn't have this sadly.
Logger.TryGet(LogEventLevel.Warning, LogArea.Visual)?.Log(this, "TryGetPointAndTangentAtDistance is not available in Direct2D.");
point = new Point();
tangent = new Point();
@ -118,7 +118,7 @@ namespace Avalonia.Direct2D1.Media
public bool TryGetSegment(double startDistance, double stopDistance, bool startOnBeginFigure, out IGeometryImpl segmentGeometry)
{
// Direct2D doesnt have this too sadly.
// Direct2D doesn't have this too sadly.
Logger.TryGet(LogEventLevel.Warning, LogArea.Visual)?.Log(this, "TryGetSegment is not available in Direct2D.");
segmentGeometry = null;

2
src/Windows/Avalonia.Win32/Interop/Win32Icon.cs

@ -245,7 +245,7 @@ internal class Win32Icon : IDisposable
iconBitDepth = 8;
}
// Windows rules for specifing an icon:
// Windows rules for specifying an icon:
//
// 1. The icon with the closest size match.
// 2. For matching sizes, the image with the closest bit depth.

2
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs

@ -946,7 +946,7 @@ namespace Avalonia.Win32
{
continue;
}
// Skip poins older from previous WM_MOUSEMOVE point.
// Skip points older from previous WM_MOUSEMOVE point.
if (historyInfo.time < prevMovePoint.time ||
(historyInfo.time == prevMovePoint.time &&
historyInfo.x == prevMovePoint.x &&

2
src/tools/Avalonia.Generators/GeneratorContextExtensions.cs

@ -19,7 +19,7 @@ internal static class GeneratorContextExtensions
public static void ReportNameGeneratorUnhandledError(this GeneratorExecutionContext context, Exception error) =>
context.Report(UnhandledErrorDescriptorId,
"Unhandled exception occured while generating typed Name references. " +
"Unhandled exception occurred while generating typed Name references. " +
"Please file an issue: https://github.com/avaloniaui/Avalonia",
error.Message,
error.ToString());

2
tests/Avalonia.Base.UnitTests/Layout/LayoutManagerTests.cs

@ -391,7 +391,7 @@ namespace Avalonia.Base.UnitTests.Layout
root.LayoutManager.ExecuteLayoutPass();
//altough nonArrageableTargets has rubbish logic and can't be measured/arranged properly
//although nonArrageableTargets has rubbish logic and can't be measured/arranged properly
//layoutmanager should process properly other visuals
Assert.All(targets, c => Assert.True(c.Arranged));
}

4
tests/Avalonia.Controls.UnitTests/ListBoxTests_Single.cs

@ -228,7 +228,7 @@ namespace Avalonia.Controls.UnitTests
Assert.Equal(0, viewModel.SetterInvokedCount);
// In Issue #855, a Stackoverflow occured here.
// In Issue #855, a Stackoverflow occurred here.
target.SelectedItem = viewModel.Items[2];
Assert.Equal(viewModel.Items[1], target.SelectedItem);
@ -307,7 +307,7 @@ namespace Avalonia.Controls.UnitTests
// Then make the ScrollViewer create its child.
scrollViewer.Presenter.UpdateChild();
// Now the ItemsPresenter should be reigstered, so apply its template.
// Now the ItemsPresenter should be registered, so apply its template.
target.Presenter.ApplyTemplate();
}
}

2
tests/Avalonia.Controls.UnitTests/Primitives/SelectingItemsControlTests.cs

@ -2376,7 +2376,7 @@ namespace Avalonia.Controls.UnitTests.Primitives
target.SelectedValueBinding = new Binding(nameof(ItemModel.Id));
break;
default:
throw new InvalidOperationException($"Unkown field {field}");
throw new InvalidOperationException($"Unknown field {field}");
}
}

Loading…
Cancel
Save