Skip to content

Commit

Permalink
[create-pull-request] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Nov 27, 2024
1 parent 8b7989a commit ce99daf
Show file tree
Hide file tree
Showing 468 changed files with 4,060 additions and 4,001 deletions.
2 changes: 1 addition & 1 deletion src/BlazorWebView/samples/BlazorWinFormsApp/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private async void _useServicesButton_Click(object sender, EventArgs e)

if (!called)
{
//s MessageBox.Show(this, "Couldn't call TryDispatchAsync!");
//s MessageBox.Show(this, "Couldn't call TryDispatchAsync!");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2143, "Picker on windows phone", PlatformAffected.WinPhone)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2143 : ContentPage
{
public Issue2143()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 22246, "Entry in Grid nested in ViewCell isn't expanding", PlatformAffected.WinPhone, NavigationBehavior.PushModalAsync)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue22246Bz : ContentPage
{
public Issue22246Bz()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 2615, "iOS Cell Reuse screws up when cells are both ViewCell with different children", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue2615 : ContentPage
{
public Issue2615()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Microsoft.Maui.Controls.ControlGallery.Issues
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Github, 5555, "Memory leak when SwitchCell or EntryCell", PlatformAffected.iOS)]
#if UITEST
#if UITEST
[NUnit.Framework.Category(Compatibility.UITests.UITestCategories.TableView)]
#endif
#endif
public class Issue5555 : TestContentPage
{
[Preserve(AllMembers = true)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ namespace Microsoft.Maui.Controls.Compatibility.Platform.Android.AppCompat
{
[System.Obsolete]
internal class FormsFragmentPagerAdapter<[DynamicallyAccessedMembers(BindableProperty.DeclaringTypeMembers
#if NET8_0 // IL2091
#if NET8_0 // IL2091
| BindableProperty.ReturnTypeMembers
#endif
#endif
)] T> : FragmentPagerAdapter where T : Page
{
MultiPage<T> _page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public static IMauiHandlersCollection AddCompatibilityRenderer(this IMauiHandler
return handlersCollection;
}

public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, [DynamicallyAccessedMembers(Internals.HandlerType.TargetMembers)] TRenderer>(this IMauiHandlersCollection handlersCollection)
public static IMauiHandlersCollection AddCompatibilityRenderer<TControlType, [DynamicallyAccessedMembers(Internals.HandlerType.TargetMembers)] TRenderer>(this IMauiHandlersCollection handlersCollection)
where TControlType : IView
{
Internals.Registrar.CheckIfRendererIsCompatibilityRenderer(typeof(TRenderer));
Expand Down
2 changes: 1 addition & 1 deletion src/Compatibility/Core/src/Tizen/ResourcePath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static string GetPath(string res)
return res;
}

foreach (AppFW.ResourceManager.Category category in Enum.GetValues<AppFW.ResourceManager.Category>())
foreach (AppFW.ResourceManager.Category category in Enum.GetValues<AppFW.ResourceManager.Category>())
{
var path = AppFW.ResourceManager.TryGetPath(category, res);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,46 +9,46 @@ namespace Microsoft.Maui.Controls.Core.UnitTests;

public class FrameUnitTests : BaseTestFixture
{
[Fact]
public void TestPackWithoutChild()
{
Frame frame = new Frame();

var parent = new NaiveLayout();

bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}

Assert.False(thrown);
}

[Fact]
public void TestPackWithChild()
{
Frame frame = new Frame
{
Content = new View()
};

var parent = new NaiveLayout();

bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}

Assert.False(thrown);
}
[Fact]
public void TestPackWithoutChild()
{
Frame frame = new Frame();

var parent = new NaiveLayout();

bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}

Assert.False(thrown);
}

[Fact]
public void TestPackWithChild()
{
Frame frame = new Frame
{
Content = new View()
};

var parent = new NaiveLayout();

bool thrown = false;
try
{
parent.Children.Add(frame);
}
catch
{
thrown = true;
}

Assert.False(thrown);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Handlers;
using Microsoft.Maui.Controls.Core.UnitTests;
using Microsoft.Maui.UnitTests;
using NSubstitute;
using Xunit;
using Microsoft.Maui.UnitTests;

namespace Microsoft.Maui.Controls.Core.UnitTests
{
Expand Down
136 changes: 68 additions & 68 deletions src/Compatibility/Core/tests/Compatibility.UnitTests/ViewUnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,74 +10,74 @@ namespace Microsoft.Maui.Controls.Core.UnitTests;
public class ViewUnitTests : BaseTestFixture
{

[Fact]
public void BindingsApplyAfterViewAddedToParentWithContextSet()
{
var parent = new NaiveLayout();
parent.BindingContext = new MockViewModel { Text = "test" };

var child = new Entry();
child.SetBinding(Entry.TextProperty, new Binding("Text"));

parent.Children.Add(child);

Assert.Same(child.BindingContext, parent.BindingContext);
Assert.Equal("test", child.Text);
}

[Fact]
public void TestBindingContextChaining()
{
View child;
var group = new NaiveLayout
{
Children = { (child = new View()) }
};

var context = new object();
group.BindingContext = context;

Assert.Equal(context, child.BindingContext);
}

[Fact]
public void TestAncestorRemoved()
{
var ancestor = new View();
var child = new NaiveLayout { Children = { ancestor } };
var view = new NaiveLayout { Children = { child } };

bool removed = false;
view.DescendantRemoved += (sender, arg) => removed = true;

child.Children.Remove(ancestor);
Assert.True(removed, "AncestorRemoved must fire when removing a child from an ancestor of a view.");
}

[Fact]
public void TestDoubleSetParent()
{
var view = new ParentSignalView();
var parent = new NaiveLayout { Children = { view } };

view.ParentSet = false;
view.Parent = parent;

Assert.False(view.ParentSet, "OnParentSet should not be called in the event the parent is already properly set");
}

[Fact]
public void TestAncestorAdded()
{
var child = new NaiveLayout();
var view = new NaiveLayout { Children = { child } };

bool added = false;
view.DescendantAdded += (sender, arg) => added = true;

child.Children.Add(new View());

Assert.True(added, "AncestorAdded must fire when adding a child to an ancestor of a view.");
[Fact]
public void BindingsApplyAfterViewAddedToParentWithContextSet()
{
var parent = new NaiveLayout();
parent.BindingContext = new MockViewModel { Text = "test" };

var child = new Entry();
child.SetBinding(Entry.TextProperty, new Binding("Text"));

parent.Children.Add(child);

Assert.Same(child.BindingContext, parent.BindingContext);
Assert.Equal("test", child.Text);
}

[Fact]
public void TestBindingContextChaining()
{
View child;
var group = new NaiveLayout
{
Children = { (child = new View()) }
};

var context = new object();
group.BindingContext = context;

Assert.Equal(context, child.BindingContext);
}

[Fact]
public void TestAncestorRemoved()
{
var ancestor = new View();
var child = new NaiveLayout { Children = { ancestor } };
var view = new NaiveLayout { Children = { child } };

bool removed = false;
view.DescendantRemoved += (sender, arg) => removed = true;

child.Children.Remove(ancestor);
Assert.True(removed, "AncestorRemoved must fire when removing a child from an ancestor of a view.");
}

[Fact]
public void TestDoubleSetParent()
{
var view = new ParentSignalView();
var parent = new NaiveLayout { Children = { view } };

view.ParentSet = false;
view.Parent = parent;

Assert.False(view.ParentSet, "OnParentSet should not be called in the event the parent is already properly set");
}

[Fact]
public void TestAncestorAdded()
{
var child = new NaiveLayout();
var view = new NaiveLayout { Children = { child } };

bool added = false;
view.DescendantAdded += (sender, arg) => added = true;

child.Children.Add(new View());

Assert.True(added, "AncestorAdded must fire when adding a child to an ancestor of a view.");
}

class ParentSignalView : View
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/Maps/src/HandlerImpl/Polygon.Impl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public IEnumerator<Location> GetEnumerator()
{
return Geopath.GetEnumerator();
}

/// <summary>
/// Gets the index of a specified location object.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using Android.Runtime;
using Android.Views;
using AndroidX.Navigation.Fragment;
using static Android.Views.ViewGroup.LayoutParams;
using Button = Android.Widget.Button;
using Fragment = AndroidX.Fragment.App.Fragment;
using View = Android.Views.View;
using static Android.Views.ViewGroup.LayoutParams;

namespace Maui.Controls.Sample.Droid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
// This is the main entry point of the application.
// If you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main (args, null, typeof (AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private void AddNavBarButtons()
UIBarButtonSystemItem.Add,
(sender, e) => RequestSession("NewTaskWindow"));

NavigationItem.RightBarButtonItems = [ addNewTaskButton, addNewWindowButton ];
NavigationItem.RightBarButtonItems = [addNewTaskButton, addNewWindowButton];
}

private void RequestSession(string? activityType = null)
Expand Down Expand Up @@ -128,7 +128,7 @@ public ContainerView(UIView view)

public override void LayoutSubviews()
{
if (Subviews?.FirstOrDefault() is {} view)
if (Subviews?.FirstOrDefault() is { } view)
view.Frame = Bounds;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ private void ConfigureToolbar()
return;

var toolbar = new NSToolbar();
#pragma warning disable CA1422

#pragma warning disable CA1422
toolbar.ShowsBaselineSeparator = false;
#pragma warning restore CA1422

Expand Down
Loading

0 comments on commit ce99daf

Please sign in to comment.