Skip to content

Commit 00a9ffe

Browse files
author
GitHub Actions Autoformatter
committed
Auto-format source code
1 parent a5d2bd1 commit 00a9ffe

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

src/Controls/tests/DeviceTests/ControlsHandlerTestBase.cs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -599,27 +599,27 @@ void OnBatchCommitted(object sender, Controls.Internals.EventArg<VisualElement>
599599
protected Task ValidateHasColor<THandler>(IView view, Color color, Action action = null) =>
600600
ValidateHasColor(view, color, typeof(THandler), action);
601601

602-
// protected static void MockAccessibilityExpectations(View view)
603-
// {
604-
// #if IOS || MACCATALYST
605-
// if (UIKit.UIAccessibility.IsVoiceOverRunning)
606-
// return;
607-
608-
// var mapperOverride = view.GetRendererOverrides<IView>();
609-
610-
// mapperOverride.ModifyMapping(AutomationProperties.IsInAccessibleTreeProperty.PropertyName, (handler, virtualView, action) =>
611-
// {
612-
// if (virtualView is ILabel)
613-
// {
614-
// // accessibility for UILabel depends on if the text is set or not
615-
// // so we want to make sure text has propagated to the platform view
616-
// // before mocking accessibility expectations
617-
// handler.UpdateValue(nameof(ILabel.Text));
618-
// }
619-
// (handler.PlatformView as UIKit.UIView)?.SetupAccessibilityExpectationIfVoiceOverIsOff();
620-
// (mapperOverride as PropertyMapper).Chained[0]!.UpdateProperty(handler, view, nameof(AutomationProperties.IsInAccessibleTreeProperty));
621-
// });
622-
// #endif
623-
// }
602+
// protected static void MockAccessibilityExpectations(View view)
603+
// {
604+
// #if IOS || MACCATALYST
605+
// if (UIKit.UIAccessibility.IsVoiceOverRunning)
606+
// return;
607+
608+
// var mapperOverride = view.GetRendererOverrides<IView>();
609+
610+
// mapperOverride.ModifyMapping(AutomationProperties.IsInAccessibleTreeProperty.PropertyName, (handler, virtualView, action) =>
611+
// {
612+
// if (virtualView is ILabel)
613+
// {
614+
// // accessibility for UILabel depends on if the text is set or not
615+
// // so we want to make sure text has propagated to the platform view
616+
// // before mocking accessibility expectations
617+
// handler.UpdateValue(nameof(ILabel.Text));
618+
// }
619+
// (handler.PlatformView as UIKit.UIView)?.SetupAccessibilityExpectationIfVoiceOverIsOff();
620+
// (mapperOverride as PropertyMapper).Chained[0]!.UpdateProperty(handler, view, nameof(AutomationProperties.IsInAccessibleTreeProperty));
621+
// });
622+
// #endif
623+
// }
624624
}
625625
}

src/Controls/tests/DeviceTests/Stubs/WindowHandlerStub.Android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void UpdateContent()
2323
{
2424
_ = MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");
2525

26-
AView platformView = (AView)typeof(WindowHandler).GetMethod("CreateRootViewFromContent", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).Invoke(null, new object[] {this, VirtualView});
26+
AView platformView = (AView)typeof(WindowHandler).GetMethod("CreateRootViewFromContent", System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.NonPublic).Invoke(null, new object[] { this, VirtualView });
2727

2828
// This is used for cases where we are testing swapping out the page set on window
2929
if (PlatformViewUnderTest?.Parent is FakeActivityRootView farw)

src/Controls/tests/DeviceTests/Stubs/WindowHandlerStub.iOS.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void UpdateContent()
5454
_currentView = VirtualView.Content;
5555
var view = _currentView.ToPlatform2(MauiContext);
5656
if (needsToPush)
57-
{
57+
{
5858
bool fireEvents = VirtualView is Window ? !(bool)typeof(Window).GetProperty("IsActivated", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).GetValue((Window)VirtualView) : true;
5959
var vc =
6060
((IPlatformViewHandler)_currentView.Handler).ViewController;

src/Core/src/Platform/ElementExtensions.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static IElementHandler CreateTypeWithInjection(this Type viewType, IMauiContext
5555

5656
// After adding MAUI from public nugets, these methods now exist in two different assemblies,
5757
// adding a renamed version here seemed the easiest way to avoid the collision.
58-
public static IElementHandler ToHandler2(this IElement view, IMauiContext context) =>
58+
public static IElementHandler ToHandler2(this IElement view, IMauiContext context) =>
5959
ToHandler(view, context);
6060

6161
public static IElementHandler ToHandler(this IElement view, IMauiContext context)
@@ -139,7 +139,7 @@ public static PlatformView ToPlatform2(this IElement view, IMauiContext context)
139139

140140
public static PlatformView ToPlatform(this IElement view, IMauiContext context)
141141
{
142-
var handler = ToHandler((IElement)view, (IMauiContext) context);
142+
var handler = ToHandler((IElement)view, (IMauiContext)context);
143143

144144
if (handler.PlatformView is not PlatformView result)
145145
{
@@ -183,11 +183,11 @@ public static void SetApplicationHandler(this PlatformApplication platformApplic
183183
public static void SetWindowHandler(this PlatformWindow platformWindow, IWindow window, IMauiContext context) =>
184184
SetHandler(platformWindow, window, context);
185185

186-
// #if WINDOWS || IOS || ANDROID || TIZEN
187-
// internal static IWindow GetWindow(this IElement element) =>
188-
// element.Handler?.MauiContext?.GetPlatformWindow()?.GetWindow() ??
189-
// throw new InvalidOperationException("IWindow not found");
190-
// #endif
186+
// #if WINDOWS || IOS || ANDROID || TIZEN
187+
// internal static IWindow GetWindow(this IElement element) =>
188+
// element.Handler?.MauiContext?.GetPlatformWindow()?.GetWindow() ??
189+
// throw new InvalidOperationException("IWindow not found");
190+
// #endif
191191

192192
internal static T FindParentOfType<T>(this IElement element, bool includeThis = false)
193193
where T : IElement

src/Core/tests/DeviceTests.Shared/Stubs/ContextStub.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public object GetService(Type serviceType)
5151
#pragma warning disable CA1422 // Validate platform compatibility
5252
return UIKit.UIApplication.SharedApplication.KeyWindow;
5353
#pragma warning restore CA1422 // Validate platform compatibility
54-
// return UIKit.UIApplication.SharedApplication.GetKeyWindow();
54+
// return UIKit.UIApplication.SharedApplication.GetKeyWindow();
5555
#elif WINDOWS
5656
if (serviceType == typeof(NavigationRootManager))
5757
return _windowManager ??= new NavigationRootManager((UI.Xaml.Window)this.GetService(typeof(UI.Xaml.Window)));

0 commit comments

Comments
 (0)