Browse Source

fix more typos

pull/9889/head
Simon Cropp 3 years ago
parent
commit
dba476c11c
  1. 6
      samples/ControlCatalog/Models/StateData.cs
  2. 4
      src/Avalonia.FreeDesktop/DBusMenuExporter.cs
  3. 6
      src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs
  4. 8
      tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_SetValue.cs
  5. 2
      tests/Avalonia.Base.UnitTests/Data/Core/ExpressionObserverTests_DataValidation.cs
  6. 2
      tests/Avalonia.Base.UnitTests/Data/Core/ExpressionObserverTests_ExpressionTree.cs
  7. 2
      tests/Avalonia.Base.UnitTests/Input/GesturesTests.cs
  8. 4
      tests/Avalonia.Base.UnitTests/VisualTests.cs
  9. 12
      tests/Avalonia.Controls.UnitTests/WindowTests.cs
  10. 4
      tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs
  11. 6
      tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ControlTemplateTests.cs
  12. 4
      tests/Avalonia.Markup.Xaml.UnitTests/Xaml/StyleTests.cs
  13. 4
      tests/Avalonia.RenderTests/Controls/TextBlockTests.cs
  14. 2
      tests/Avalonia.RenderTests/Media/TextFormatting/TextLayoutTests.cs
  15. 2
      tests/Avalonia.RenderTests/OpacityMaskTests.cs

6
samples/ControlCatalog/Models/StateData.cs

@ -6,10 +6,10 @@ public class StateData
public string Abbreviation { get; private set; } public string Abbreviation { get; private set; }
public string Capital { get; private set; } public string Capital { get; private set; }
public StateData(string name, string abbreviatoin, string capital) public StateData(string name, string abbreviation, string capital)
{ {
Name = name; Name = name;
Abbreviation = abbreviatoin; Abbreviation = abbreviation;
Capital = capital; Capital = capital;
} }
@ -17,4 +17,4 @@ public class StateData
{ {
return Name; return Name;
} }
} }

4
src/Avalonia.FreeDesktop/DBusMenuExporter.cs

@ -25,9 +25,9 @@ namespace Avalonia.FreeDesktop
return new DBusMenuExporterImpl(DBusHelper.Connection, xid); return new DBusMenuExporterImpl(DBusHelper.Connection, xid);
} }
public static INativeMenuExporter TryCreateDetachedNativeMenu(ObjectPath path, Connection currentConection) public static INativeMenuExporter TryCreateDetachedNativeMenu(ObjectPath path, Connection currentConnection)
{ {
return new DBusMenuExporterImpl(currentConection, path); return new DBusMenuExporterImpl(currentConnection, path);
} }
public static ObjectPath GenerateDBusMenuObjPath => "/net/avaloniaui/dbusmenu/" public static ObjectPath GenerateDBusMenuObjPath => "/net/avaloniaui/dbusmenu/"

6
src/Markup/Avalonia.Markup.Xaml.Loader/CompilerExtensions/Transformers/AvaloniaXamlIlSelectorTransformer.cs

@ -124,7 +124,7 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
$"Cannot convert '{attachedProperty.Value}' to '{targetPropertyType.GetFqn()}", $"Cannot convert '{attachedProperty.Value}' to '{targetPropertyType.GetFqn()}",
node); node);
result = new XamlIlAttacchedPropertyEqualsSelector(result, targetPropertyField, typedValue); result = new XamlIlAttachedPropertyEqualsSelector(result, targetPropertyField, typedValue);
break; break;
} }
case SelectorGrammar.ChildSyntax child: case SelectorGrammar.ChildSyntax child:
@ -414,9 +414,9 @@ namespace Avalonia.Markup.Xaml.XamlIl.CompilerExtensions.Transformers
} }
class XamlIlAttacchedPropertyEqualsSelector : XamlIlSelectorNode class XamlIlAttachedPropertyEqualsSelector : XamlIlSelectorNode
{ {
public XamlIlAttacchedPropertyEqualsSelector(XamlIlSelectorNode previous, public XamlIlAttachedPropertyEqualsSelector(XamlIlSelectorNode previous,
IXamlField propertyFiled, IXamlField propertyFiled,
IXamlAstValueNode value) IXamlAstValueNode value)
: base(previous) : base(previous)

8
tests/Avalonia.Base.UnitTests/AvaloniaObjectTests_SetValue.cs

@ -227,7 +227,7 @@ namespace Avalonia.Base.UnitTests
{ {
Class2 target = new Class2(); Class2 target = new Class2();
target.SetValue((AvaloniaProperty)Class2.FlobProperty, new ImplictDouble(4)); target.SetValue((AvaloniaProperty)Class2.FlobProperty, new ImplicitDouble(4));
var value = target.GetValue(Class2.FlobProperty); var value = target.GetValue(Class2.FlobProperty);
Assert.IsType<double>(value); Assert.IsType<double>(value);
@ -393,16 +393,16 @@ namespace Avalonia.Base.UnitTests
AvaloniaProperty.RegisterAttached<AttachedOwner, Class2, string>("Attached"); AvaloniaProperty.RegisterAttached<AttachedOwner, Class2, string>("Attached");
} }
private class ImplictDouble private class ImplicitDouble
{ {
public ImplictDouble(double value) public ImplicitDouble(double value)
{ {
Value = value; Value = value;
} }
public double Value { get; } public double Value { get; }
public static implicit operator double (ImplictDouble v) public static implicit operator double (ImplicitDouble v)
{ {
return v.Value; return v.Value;
} }

2
tests/Avalonia.Base.UnitTests/Data/Core/ExpressionObserverTests_DataValidation.cs

@ -49,7 +49,7 @@ namespace Avalonia.Base.UnitTests.Data.Core
////} ////}
[Fact] [Fact]
public void Indei_Validation_Does_Not_Subscribe_When_DataValidatation_Not_Enabled() public void Indei_Validation_Does_Not_Subscribe_When_DataValidation_Not_Enabled()
{ {
var data = new IndeiTest { MustBePositive = 5 }; var data = new IndeiTest { MustBePositive = 5 };
var observer = ExpressionObserver.Create(data, o => o.MustBePositive, false); var observer = ExpressionObserver.Create(data, o => o.MustBePositive, false);

2
tests/Avalonia.Base.UnitTests/Data/Core/ExpressionObserverTests_ExpressionTree.cs

@ -42,7 +42,7 @@ namespace Avalonia.Base.UnitTests.Data.Core
} }
[Fact] [Fact]
public void Property_Acccess_Expression_Can_Set_Property() public void Property_Access_Expression_Can_Set_Property()
{ {
var data = new Class1(); var data = new Class1();
var target = ExpressionObserver.Create(data, o => o.Foo); var target = ExpressionObserver.Create(data, o => o.Foo);

2
tests/Avalonia.Base.UnitTests/Input/GesturesTests.cs

@ -506,7 +506,7 @@ namespace Avalonia.Base.UnitTests.Input
} }
[Fact] [Fact]
public void Scrolling_Should_Start_After_Start_Distance_Is_Exceded() public void Scrolling_Should_Start_After_Start_Distance_Is_Exceeded()
{ {
Border border = new Border() Border border = new Border()
{ {

4
tests/Avalonia.Base.UnitTests/VisualTests.cs

@ -126,7 +126,7 @@ namespace Avalonia.Base.UnitTests
} }
[Fact] [Fact]
public void Root_Should_Retun_Self_As_VisualRoot() public void Root_Should_Return_Self_As_VisualRoot()
{ {
var root = new TestRoot(); var root = new TestRoot();
@ -134,7 +134,7 @@ namespace Avalonia.Base.UnitTests
} }
[Fact] [Fact]
public void Descendants_Should_RetunVisualRoot() public void Descendants_Should_ReturnVisualRoot()
{ {
var root = new TestRoot(); var root = new TestRoot();
var child1 = new Decorator(); var child1 = new Decorator();

12
tests/Avalonia.Controls.UnitTests/WindowTests.cs

@ -140,7 +140,7 @@ namespace Avalonia.Controls.UnitTests
[Theory] [Theory]
[InlineData(true)] [InlineData(true)]
[InlineData(false)] [InlineData(false)]
public void Child_windows_should_be_closed_before_parent(bool programaticClose) public void Child_windows_should_be_closed_before_parent(bool programmaticClose)
{ {
using (UnitTestApplication.Start(TestServices.StyledWindow)) using (UnitTestApplication.Start(TestServices.StyledWindow))
{ {
@ -156,7 +156,7 @@ namespace Avalonia.Controls.UnitTests
window.Closing += (sender, e) => window.Closing += (sender, e) =>
{ {
Assert.Equal(WindowCloseReason.WindowClosing, e.CloseReason); Assert.Equal(WindowCloseReason.WindowClosing, e.CloseReason);
Assert.Equal(programaticClose, e.IsProgrammatic); Assert.Equal(programmaticClose, e.IsProgrammatic);
count++; count++;
windowClosing = count; windowClosing = count;
}; };
@ -164,7 +164,7 @@ namespace Avalonia.Controls.UnitTests
child.Closing += (sender, e) => child.Closing += (sender, e) =>
{ {
Assert.Equal(WindowCloseReason.OwnerWindowClosing, e.CloseReason); Assert.Equal(WindowCloseReason.OwnerWindowClosing, e.CloseReason);
Assert.Equal(programaticClose, e.IsProgrammatic); Assert.Equal(programmaticClose, e.IsProgrammatic);
count++; count++;
childClosing = count; childClosing = count;
}; };
@ -184,7 +184,7 @@ namespace Avalonia.Controls.UnitTests
window.Show(); window.Show();
child.Show(window); child.Show(window);
if (programaticClose) if (programmaticClose)
{ {
window.Close(); window.Close();
} }
@ -205,7 +205,7 @@ namespace Avalonia.Controls.UnitTests
[Theory] [Theory]
[InlineData(true)] [InlineData(true)]
[InlineData(false)] [InlineData(false)]
public void Child_windows_must_not_close_before_parent_has_chance_to_Cancel_OSCloseButton(bool programaticClose) public void Child_windows_must_not_close_before_parent_has_chance_to_Cancel_OSCloseButton(bool programmaticClose)
{ {
using (UnitTestApplication.Start(TestServices.StyledWindow)) using (UnitTestApplication.Start(TestServices.StyledWindow))
{ {
@ -246,7 +246,7 @@ namespace Avalonia.Controls.UnitTests
window.Show(); window.Show();
child.Show(window); child.Show(window);
if (programaticClose) if (programmaticClose)
{ {
window.Close(); window.Close();
} }

4
tests/Avalonia.Markup.Xaml.UnitTests/Xaml/BasicTests.cs

@ -59,7 +59,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
} }
[Fact] [Fact]
public void Attached_Property_Is_Set_On_Control_Outside_Avalonia_Namspace() public void Attached_Property_Is_Set_On_Control_Outside_Avalonia_Namespace()
{ {
// Test for issue #1548 // Test for issue #1548
var xaml = var xaml =
@ -729,7 +729,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
} }
[Fact] [Fact]
public void DeferedXamlLoader_Should_Preserve_NamespacesContext() public void DeferredXamlLoader_Should_Preserve_NamespacesContext()
{ {
var xaml = var xaml =
@"<ContentControl xmlns='https://github.com/avaloniaui' @"<ContentControl xmlns='https://github.com/avaloniaui'

6
tests/Avalonia.Markup.Xaml.UnitTests/Xaml/ControlTemplateTests.cs

@ -41,7 +41,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
window.ApplyTemplate(); window.ApplyTemplate();
button.ApplyTemplate(); button.ApplyTemplate();
var listBoxHierarchyLine = button.GetVisualChildren().ElementAt(0) as ListBoxHierachyLine; var listBoxHierarchyLine = button.GetVisualChildren().ElementAt(0) as ListBoxHierarchyLine;
Assert.Equal(1, listBoxHierarchyLine.LineDashStyle.Offset); Assert.Equal(1, listBoxHierarchyLine.LineDashStyle.Offset);
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes.Count); Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes.Count);
Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes[0]); Assert.Equal(2, listBoxHierarchyLine.LineDashStyle.Dashes[0]);
@ -309,10 +309,10 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
Assert.Equal("Bar", bar.Name); Assert.Equal("Bar", bar.Name);
} }
} }
public class ListBoxHierachyLine : Panel public class ListBoxHierarchyLine : Panel
{ {
public static readonly StyledProperty<DashStyle> LineDashStyleProperty = public static readonly StyledProperty<DashStyle> LineDashStyleProperty =
AvaloniaProperty.Register<ListBoxHierachyLine, DashStyle>(nameof(LineDashStyle)); AvaloniaProperty.Register<ListBoxHierarchyLine, DashStyle>(nameof(LineDashStyle));
public DashStyle LineDashStyle public DashStyle LineDashStyle
{ {

4
tests/Avalonia.Markup.Xaml.UnitTests/Xaml/StyleTests.cs

@ -272,7 +272,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
} }
[Fact] [Fact]
public void Style_Can_Use_NthChild_Selector_After_Reoder() public void Style_Can_Use_NthChild_Selector_After_Reorder()
{ {
using (UnitTestApplication.Start(TestServices.StyledWindow)) using (UnitTestApplication.Start(TestServices.StyledWindow))
{ {
@ -311,7 +311,7 @@ namespace Avalonia.Markup.Xaml.UnitTests.Xaml
} }
[Fact] [Fact]
public void Style_Can_Use_NthLastChild_Selector_After_Reoder() public void Style_Can_Use_NthLastChild_Selector_After_Reorder()
{ {
using (UnitTestApplication.Start(TestServices.StyledWindow)) using (UnitTestApplication.Start(TestServices.StyledWindow))
{ {

4
tests/Avalonia.RenderTests/Controls/TextBlockTests.cs

@ -45,7 +45,7 @@ namespace Avalonia.Direct2D1.RenderTests.Controls
[Win32Fact("Has text")] [Win32Fact("Has text")]
public async Task RestrictedHeight_VerticalAlign() public async Task RestrictedHeight_VerticalAlign()
{ {
Control text(VerticalAlignment verticalAlingnment, bool clip = true, bool restrictHeight = true) Control text(VerticalAlignment verticalAlignment, bool clip = true, bool restrictHeight = true)
{ {
return new Border() return new Border()
{ {
@ -62,7 +62,7 @@ namespace Avalonia.Direct2D1.RenderTests.Controls
FontSize = 24, FontSize = 24,
Foreground = Brushes.Black, Foreground = Brushes.Black,
Text = "L", Text = "L",
VerticalAlignment = verticalAlingnment, VerticalAlignment = verticalAlignment,
ClipToBounds = clip ClipToBounds = clip
} }
}; };

2
tests/Avalonia.RenderTests/Media/TextFormatting/TextLayoutTests.cs

@ -186,7 +186,7 @@ namespace Avalonia.Direct2D1.RenderTests.Media
[InlineData("x", 0, 200, 200 - 7.20, 0, 7.20, FontSizeHeight)] [InlineData("x", 0, 200, 200 - 7.20, 0, 7.20, FontSizeHeight)]
[InlineData(stringword, 0, 200, 171.20, 0, 7.20, FontSizeHeight)] [InlineData(stringword, 0, 200, 171.20, 0, 7.20, FontSizeHeight)]
[InlineData(stringword, 3, 200, 200 - 7.20, 0, 7.20, FontSizeHeight)] [InlineData(stringword, 3, 200, 200 - 7.20, 0, 7.20, FontSizeHeight)]
public void Should_HitTestPosition_RigthAlign_Correctly( public void Should_HitTestPosition_RightAlign_Correctly(
string input, int index, double widthConstraint, string input, int index, double widthConstraint,
double x, double y, double width, double height) double x, double y, double width, double height)
{ {

2
tests/Avalonia.RenderTests/OpacityMaskTests.cs

@ -57,7 +57,7 @@ namespace Avalonia.Direct2D1.RenderTests
} }
[Fact] [Fact]
public async Task RenderTansform_Applies_To_Opacity_Mask() public async Task RenderTransform_Applies_To_Opacity_Mask()
{ {
var target = new Canvas var target = new Canvas
{ {

Loading…
Cancel
Save