Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[housekeeping] Automated PR to fix formatting errors #17388

Merged
merged 1 commit into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/Controls/src/Core/BindableObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ internal void SetBinding(BindableProperty targetProperty, BindingBase binding, S
{
var b_p = context.Bindings.Last();
oldSpecificity = b_p.Key;
oldBinding = b_p.Value;
oldBinding = b_p.Value;
}

if (oldBinding != null && specificity.CompareTo(oldSpecificity) < 0)
Expand Down Expand Up @@ -708,12 +708,12 @@ void RemoveBinding(BindableProperty property, BindablePropertyContext context, S
var isCurrent = binding == currentbinding;

if (isCurrent)
{
{
binding.Unapply();

currentbinding = null;
if (count > 1)
currentbinding = context.Bindings.Values.ElementAt(count-2);
currentbinding = context.Bindings.Values.ElementAt(count - 2);

property.BindingChanging?.Invoke(this, binding, currentbinding);

Expand Down
4 changes: 2 additions & 2 deletions src/Controls/src/Core/BindableObjectExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable disable
using System;
using System.Collections.Generic;
using Microsoft.Maui.Graphics;
using System.Linq;
using Microsoft.Maui.Graphics;

namespace Microsoft.Maui.Controls
{
Expand All @@ -12,7 +12,7 @@ public static class BindableObjectExtensions
internal static void RefreshPropertyValue(this BindableObject self, BindableProperty property, object value)
{
var ctx = self.GetContext(property);
if (ctx != null && ctx.Bindings.Count >0)
if (ctx != null && ctx.Bindings.Count > 0)
{
var binding = ctx.Bindings.Last().Value;

Expand Down
2 changes: 1 addition & 1 deletion src/Controls/tests/UITests/Tests/Issues/Issue16561.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void TapTwoPlacesQuickly()
AssertCorrectTapLocation(result[0].Text, expectedX2, expectedY, "Second");
}

static void TapTwice(IApp2 app, PointF point1, PointF point2)
static void TapTwice(IApp2 app, PointF point1, PointF point2)
{
var driver = app.Driver ?? throw new InvalidOperationException("The Appium driver is null; cannot perform taps.");

Expand Down
3 changes: 2 additions & 1 deletion src/Controls/tests/UITests/Tests/Issues/Issue17347.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ public Issue17347(TestDevice device) : base(device)
public override string Issue => "Setting a new TitleView on an already created page crashes iOS";

[Test]
public void AppDoesntCrashWhenSettingNewTitleViewOnExistingPage() {
public void AppDoesntCrashWhenSettingNewTitleViewOnExistingPage()
{
try
{
App.WaitForElement("TitleViewLabel4", timeout: TimeSpan.FromSeconds(4));
Expand Down
14 changes: 7 additions & 7 deletions src/Controls/tests/Xaml.UnitTests/Issues/Maui16538.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.Controls.Shapes;
using Microsoft.Maui.Devices;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Dispatching;


using NUnit.Framework;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.UnitTests;
using NUnit.Framework;

namespace Microsoft.Maui.Controls.Xaml.UnitTests;

public partial class Maui16538
public partial class Maui16538
{

public Maui16538() => InitializeComponent();
Expand All @@ -24,12 +22,14 @@ public Maui16538(bool useCompiledXaml)
[TestFixture]
class Test
{
[SetUp] public void Setup() {
[SetUp]
public void Setup()
{
Application.SetCurrentApplication(new MockApplication());
DispatcherProvider.SetCurrent(new DispatcherProviderStub());
}


[TearDown] public void TearDown() => AppInfo.SetCurrent(null);

[Test]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ public void BuildWithDifferentVersionNumber(string id, string config, string dis
[TestCase("maui-blazor", "Release", DotNetCurrent)]
public void CheckEntitlementsForMauiBlazorOnMacCatalyst(string id, string config, string framework)
{
if(TestEnvironment.IsWindows)
if (TestEnvironment.IsWindows)
Assert.Ignore("Running MacCatalyst templates is only supported on Mac.");

string projectDir = TestDirectory;
Expand Down