Skip to content

Commit 8457f71

Browse files
[create-pull-request] automated change
1 parent fbd615c commit 8457f71

File tree

130 files changed

+1737
-1711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+1737
-1711
lines changed

src/Compatibility/Core/src/Windows/CollectionView/ItemsViewRenderer.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,8 @@ bool IsElementVisibleInContainer(FrameworkElement element, FrameworkElement cont
597597

598598
default:
599599
return elementBounds.Left < containerBounds.Right && elementBounds.Right > containerBounds.Left;
600-
};
600+
}
601+
;
601602
}
602603

603604
void OnScrollViewChanged(object sender, ScrollViewerViewChangedEventArgs e)

src/Compatibility/Core/src/iOS/Renderers/NavigationRenderer.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,8 @@ public override CGRect Frame
16421642
value.Width = (value.X - xSpace) + value.Width;
16431643
value.X = xSpace;
16441644
}
1645-
};
1645+
}
1646+
;
16461647

16471648
value.Height = ToolbarHeight;
16481649
}

src/Controls/src/BindingSourceGen/PathParser.cs

+4-2
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ private Result<List<IPathPart>> HandleBinaryExpression(BinaryExpressionSyntax as
142142
if (typeInfo == null)
143143
{
144144
return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(castTo.GetLocation()));
145-
};
145+
}
146+
;
146147

147148
leftResult.Value.Add(new Cast(typeInfo.CreateTypeDescription(_enabledNullable)));
148149

@@ -161,7 +162,8 @@ private Result<List<IPathPart>> HandleCastExpression(CastExpressionSyntax castEx
161162
if (typeInfo == null)
162163
{
163164
return Result<List<IPathPart>>.Failure(DiagnosticsFactory.UnableToResolvePath(castExpression.GetLocation()));
164-
};
165+
}
166+
;
165167

166168
result.Value.Add(new Cast(typeInfo.CreateTypeDescription(_enabledNullable)));
167169

src/Controls/src/Build.Tasks/NodeILExtensions.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -655,9 +655,9 @@ public static IEnumerable<Instruction> PushServiceProvider(this INode node, ILCo
655655
}
656656
else
657657
yield return Create(Ldnull);
658-
658+
659659
yield return Create(Newobj, module.ImportCtorReference(context.Cache,
660-
type: ("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml.Internals", "SimpleValueTargetProvider"),
660+
type: ("Microsoft.Maui.Controls.Xaml", "Microsoft.Maui.Controls.Xaml.Internals", "SimpleValueTargetProvider"),
661661
parameterTypes: [
662662
("mscorlib", "System", "Object[]"),
663663
("mscorlib", "System", "Object"),
@@ -677,7 +677,7 @@ public static IEnumerable<Instruction> PushServiceProvider(this INode node, ILCo
677677
yield return Create(Call, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "GetTypeFromHandle", parameterTypes: new[] { ("mscorlib", "System", "RuntimeTypeHandle") }, isStatic: true));
678678
yield return Create(Ldloc, refProvider);
679679
yield return Create(Callvirt, addService);
680-
680+
681681
yield return Create(Dup); //Keep the serviceProvider on the stack
682682
yield return Create(Ldtoken, module.ImportReference(context.Cache, ("Microsoft.Maui.Controls", "Microsoft.Maui.Controls.Xaml", "IRootObjectProvider")));
683683
yield return Create(Call, module.ImportMethodReference(context.Cache, ("mscorlib", "System", "Type"), methodName: "GetTypeFromHandle", parameterTypes: new[] { ("mscorlib", "System", "RuntimeTypeHandle") }, isStatic: true));

src/Controls/src/Build.Tasks/SetPropertiesVisitor.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ static IEnumerable<Instruction> SetBinding(VariableDefinition parent, FieldRefer
14101410

14111411
static bool CanSetValue(FieldReference bpRef, bool attached, INode node, IXmlLineInfo iXmlLineInfo, ILContext context)
14121412
{
1413-
static bool CanSetValue (TypeReference bpTypeRef, VariableDefinition varValue, ILContext context, IXmlLineInfo iXmlLineInfo)
1413+
static bool CanSetValue(TypeReference bpTypeRef, VariableDefinition varValue, ILContext context, IXmlLineInfo iXmlLineInfo)
14141414
{
14151415
// If it's an attached BP, there's no second chance to handle IMarkupExtensions, so we try here.
14161416
// Worst case scenario ? InvalidCastException at runtime
@@ -1527,7 +1527,7 @@ static IEnumerable<Instruction> SetValue(VariableDefinition parent, FieldReferen
15271527
yield return instruction;
15281528
if (bpTypeRef.IsValueType)
15291529
{
1530-
if ( bpTypeRef.ResolveCached(context.Cache).FullName == "System.Nullable`1"
1530+
if (bpTypeRef.ResolveCached(context.Cache).FullName == "System.Nullable`1"
15311531
&& TypeRefComparer.Default.Equals(varValue.VariableType, ((GenericInstanceType)bpTypeRef).GenericArguments[0]))
15321532
bpTypeRef = ((GenericInstanceType)bpTypeRef).GenericArguments[0];
15331533
yield return Create(Box, module.ImportReference(bpTypeRef));

src/Controls/src/Build.Tasks/XamlCache.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public FieldReference GetOrAddFieldReference((ModuleDefinition module, string fi
4242
public TypeReference GetOrAddTypeReference(ModuleDefinition module, (string assemblyName, string clrNamespace, string typeName) type) => GetOrAdd(_typeReferenceCache, (module, type.ToString()), x =>
4343
{
4444
if (type.typeName.EndsWith("[]", StringComparison.InvariantCultureIgnoreCase))
45-
return x.module.GetTypeDefinition(this, (type.assemblyName, type.clrNamespace, type.typeName.Substring(0, type.typeName.Length-2))).MakeArrayType();
45+
return x.module.GetTypeDefinition(this, (type.assemblyName, type.clrNamespace, type.typeName.Substring(0, type.typeName.Length - 2))).MakeArrayType();
4646
else
4747
return x.module.ImportReference(x.module.GetTypeDefinition(this, type));
4848
});

src/Controls/src/Core/AppThemeBinding.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ void Set()
114114
}
115115
target.SetValueCore(_targetProperty, value, Internals.SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity);
116116
}
117-
};
117+
}
118+
;
118119
}
119120

120121
object _light;

src/Controls/src/Core/Compatibility/Handlers/FlyoutPage/iOS/PhoneFlyoutPageRenderer.cs

+15-15
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ void HandlePropertyChanged(object sender, PropertyChangedEventArgs e)
366366
UpdateBackground();
367367
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.FlyoutPage.ApplyShadowProperty.PropertyName)
368368
UpdateApplyShadow(((FlyoutPage)Element).OnThisPlatform().GetApplyShadow());
369-
else if (e.PropertyName == Microsoft.Maui.Controls.FlyoutPage.FlyoutLayoutBehaviorProperty.PropertyName)
370-
UpdateFlyoutLayoutBehaviorChanges();
369+
else if (e.PropertyName == Microsoft.Maui.Controls.FlyoutPage.FlyoutLayoutBehaviorProperty.PropertyName)
370+
UpdateFlyoutLayoutBehaviorChanges();
371371
else if (e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersHomeIndicatorAutoHiddenProperty.PropertyName ||
372372
e.PropertyName == PlatformConfiguration.iOSSpecific.Page.PrefersStatusBarHiddenProperty.PropertyName)
373373
UpdatePageSpecifics();
@@ -481,20 +481,20 @@ void LayoutChildren(bool animated)
481481
void UpdateFlyoutLayoutBehaviorChanges()
482482
{
483483
LayoutChildren(true);
484-
if (FlyoutPage is null)
484+
if (FlyoutPage is null)
485485
return;
486-
FlyoutLayoutBehavior flyoutBehavior = FlyoutPage.FlyoutLayoutBehavior;
487-
bool shouldPresent = FlyoutPageController.ShouldShowSplitMode;
488-
if (flyoutBehavior == FlyoutLayoutBehavior.Popover || flyoutBehavior == FlyoutLayoutBehavior.Default)
489-
{
490-
shouldPresent = false;
491-
}
492-
493-
if (shouldPresent != FlyoutPage.IsPresented)
494-
{
495-
((IElementController)Element).SetValueFromRenderer(FlyoutPage.IsPresentedProperty, shouldPresent);
496-
UpdateLeftBarButton();
497-
}
486+
FlyoutLayoutBehavior flyoutBehavior = FlyoutPage.FlyoutLayoutBehavior;
487+
bool shouldPresent = FlyoutPageController.ShouldShowSplitMode;
488+
if (flyoutBehavior == FlyoutLayoutBehavior.Popover || flyoutBehavior == FlyoutLayoutBehavior.Default)
489+
{
490+
shouldPresent = false;
491+
}
492+
493+
if (shouldPresent != FlyoutPage.IsPresented)
494+
{
495+
((IElementController)Element).SetValueFromRenderer(FlyoutPage.IsPresentedProperty, shouldPresent);
496+
UpdateLeftBarButton();
497+
}
498498
}
499499

500500
void PackContainers()

src/Controls/src/Core/Compatibility/Handlers/ListView/iOS/ListViewRenderer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1115,7 +1115,7 @@ public override UITableViewCell GetCell(UITableView tableView, NSIndexPath index
11151115
PreserveActivityIndicatorState(cell);
11161116
Performance.Stop(reference);
11171117

1118-
if(platformCell is ContextActionsCell contextActionsCell)
1118+
if (platformCell is ContextActionsCell contextActionsCell)
11191119
_contextActionsCells.Add(contextActionsCell);
11201120

11211121
return platformCell;

src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1996,7 +1996,8 @@ public override CGRect Frame
19961996
value.Width = (value.X - xSpace) + value.Width;
19971997
value.X = xSpace;
19981998
}
1999-
};
1999+
}
2000+
;
20002001

20012002
value.Height = ToolbarHeight;
20022003
}

src/Controls/src/Core/Compatibility/Handlers/Shell/Android/SearchHandlerAppearanceTracker.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ void UpdateText()
9898
bool selectionExists = _editText.HasSelection;
9999

100100
_editText.Text = _searchHandler.Query ?? string.Empty;
101-
101+
102102
UpdateTextTransform();
103-
103+
104104
// If we had a selection, place the cursor at the end of text
105105
// Otherwise try to maintain the cursor at its previous position
106106
int textLength = _editText.Text?.Length ?? 0;
107107
int newPosition = selectionExists ? textLength : Math.Min(cursorPosition, textLength);
108-
108+
109109
// Prevents the cursor from resetting to position zero when text is set programmatically
110110
_editText.SetSelection(newPosition);
111111
}

src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellItemRendererBase.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ void RemoveAllButCurrent(Fragment skip)
393393

394394
trans ??= ChildFragmentManager.BeginTransactionEx();
395395
trans.Remove(f);
396-
};
396+
}
397+
;
397398

398399
trans?.CommitAllowingStateLossEx();
399400
}

src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellPageRendererTracker.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ UIImage DrawHamburger()
480480
float size = 3f;
481481
float start = 4f;
482482
context.CGContext.SetLineWidth(size);
483-
483+
484484
for (int i = 0; i < 3; i++)
485485
{
486486
context.CGContext.MoveTo(1f, start + i * (size * 2));

src/Controls/src/Core/Handlers/Items/ItemsViewHandler.Windows.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,8 @@ bool IsElementVisibleInContainer(FrameworkElement element, FrameworkElement cont
583583

584584
default:
585585
return elementBounds.Left < containerBounds.Right && elementBounds.Right > containerBounds.Left;
586-
};
586+
}
587+
;
587588
}
588589

589590
async void ScrollToRequested(object sender, ScrollToRequestEventArgs args)

src/Controls/src/Core/Handlers/Items/iOS/SelectableItemsViewController.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using Foundation;
6+
using Microsoft.Maui.Controls.Platform;
67
using ObjCRuntime;
78
using UIKit;
8-
using Microsoft.Maui.Controls.Platform;
99

1010
namespace Microsoft.Maui.Controls.Handlers.Items
1111
{

src/Controls/src/Core/Handlers/Items/iOS/TemplatedCell.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
using CoreGraphics;
55
using Foundation;
66
using Microsoft.Maui.Controls.Internals;
7+
using Microsoft.Maui.Controls.Platform;
78
using Microsoft.Maui.Graphics;
89
using UIKit;
9-
using Microsoft.Maui.Controls.Platform;
1010

1111
namespace Microsoft.Maui.Controls.Handlers.Items
1212
{
@@ -97,8 +97,8 @@ public override UICollectionViewLayoutAttributes PreferredLayoutAttributesFittin
9797
var preferredAttributes = base.PreferredLayoutAttributesFittingAttributes(layoutAttributes);
9898

9999
if (_measureInvalidated ||
100-
!AttributesConsistentWithConstrainedDimension(preferredAttributes) ||
101-
!preferredAttributes.Frame.Size.IsCloseTo(_size))
100+
!AttributesConsistentWithConstrainedDimension(preferredAttributes) ||
101+
!preferredAttributes.Frame.Size.IsCloseTo(_size))
102102
{
103103
// Measure this cell (including the Forms element) if there is no constrained size
104104
var size = ConstrainedSize == default ? Measure() : ConstrainedSize;

src/Controls/src/Core/Handlers/Items2/iOS/CarouselViewController2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private int GetTargetPosition()
303303
{
304304
return 0;
305305
}
306-
306+
307307
return ItemsView.ItemsUpdatingScrollMode switch
308308
{
309309
ItemsUpdatingScrollMode.KeepItemsInView => 0,

src/Controls/src/Core/Handlers/Items2/iOS/LayoutFactory2.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ static NSCollectionLayoutBoundarySupplementaryItem[] CreateSupplementaryItems(La
6262
scrollDirection == UICollectionViewScrollDirection.Vertical
6363
? NSRectAlignment.Top
6464
: NSRectAlignment.Leading));
65-
};
65+
}
66+
;
6667

6768
if (layoutHeaderFooterInfo.HasFooter)
6869
{

src/Controls/src/Core/Handlers/Items2/iOS/SelectableItemsViewController2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
using System.Collections.Generic;
44
using System.Linq;
55
using Foundation;
6+
using Microsoft.Maui.Controls.Platform;
67
using ObjCRuntime;
78
using UIKit;
8-
using Microsoft.Maui.Controls.Platform;
99

1010
namespace Microsoft.Maui.Controls.Handlers.Items2
1111
{

src/Controls/src/Core/Handlers/Items2/iOS/StructuredItemsViewController2.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void InvalidateLayoutIfItemsMeasureChanged()
192192
// We could then invalidate the layout for supplementary cell only `collectionView.IndexPathForCell(headerCell)` like we do on standard cells,
193193
// but that causes other cells to oddly collapse (see Issue25362 UITest), so in this case we have to stick with `InvalidateLayout`.
194194
var collectionView = CollectionView;
195-
195+
196196
if (ItemsView.Header is not null || ItemsView.HeaderTemplate is not null)
197197
{
198198
var visibleHeaders = collectionView.GetVisibleSupplementaryViews(UICollectionElementKindSectionKey.Header);

src/Controls/src/Core/Shell/ShellSection.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,8 @@ void WaitForRendererToGetRemoved(object s, EventArgs p)
694694
{
695695
sc.Page.PlatformEnabledChanged -= WaitForRendererToGetRemoved;
696696
base.OnChildRemoved(child, oldLogicalIndex);
697-
};
697+
}
698+
;
698699
}
699700
else
700701
{

src/Controls/src/Core/VisualElement/VisualElement.cs

+7-7
Original file line numberDiff line numberDiff line change
@@ -1416,13 +1416,13 @@ private protected void InvokeMeasureInvalidated(InvalidationTrigger trigger)
14161416
}
14171417

14181418
/// <summary>
1419-
/// A flag that determines whether the measure invalidated event should not be propagated up the visual tree.
1420-
/// </summary>
1421-
/// <remarks>
1422-
/// Propagation will still occur within legacy layout subtrees.
1423-
/// </remarks>
1424-
internal static bool SkipMeasureInvalidatedPropagation { get; set /* for testing purpose */; } =
1425-
AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.SkipMeasureInvalidatedPropagation", out var enabled) && enabled;
1419+
/// A flag that determines whether the measure invalidated event should not be propagated up the visual tree.
1420+
/// </summary>
1421+
/// <remarks>
1422+
/// Propagation will still occur within legacy layout subtrees.
1423+
/// </remarks>
1424+
internal static bool SkipMeasureInvalidatedPropagation { get; set /* for testing purpose */; } =
1425+
AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.SkipMeasureInvalidatedPropagation", out var enabled) && enabled;
14261426

14271427
internal virtual void OnChildMeasureInvalidated(VisualElement child, InvalidationTrigger trigger)
14281428
{

src/Controls/src/Xaml/XamlServiceProvider.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public SimpleValueTargetProvider(object[] objectAndParents, object targetPropert
167167
this.rootObject = rootObject ?? objectAndParents[objectAndParents.Length - 1];
168168
}
169169

170-
public object RootObject => rootObject;
170+
public object RootObject => rootObject;
171171
IEnumerable<object> IProvideParentValues.ParentObjects => objectAndParents;
172172
object IProvideValueTarget.TargetObject => objectAndParents[0];
173173
object IProvideValueTarget.TargetProperty => targetProperty;

src/Controls/tests/Core.UnitTests/BindingUnitTests.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,8 @@ void create()
12411241
proxies.Add(new WeakReference(listener));
12421242
}
12431243
Assert.NotEmpty(proxies); // Should be at least 1
1244-
};
1244+
}
1245+
;
12451246
create();
12461247

12471248
await Task.Yield();

src/Controls/tests/DeviceTests/Elements/Border/BorderTests.Windows.cs

+5-5
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ await AttachAndRun(border, (handler) =>
6161
await AssertColorAtPoint(border, expected, typeof(BorderHandler), cornerRadius, cornerRadius);
6262
}
6363

64-
[Fact]
65-
[Description("The IsVisible property of a Border should match with native IsVisible")]
64+
[Fact]
65+
[Description("The IsVisible property of a Border should match with native IsVisible")]
6666
public async Task VerifyBorderIsVisibleProperty()
6767
{
6868
var border = new Border();
@@ -73,9 +73,9 @@ public async Task VerifyBorderIsVisibleProperty()
7373
var nativeView = GetNativeBorder(handler);
7474
await InvokeOnMainThreadAsync(() =>
7575
{
76-
var isVisible = nativeView.Visibility == Microsoft.UI.Xaml.Visibility.Visible;
77-
Assert.Equal(expectedValue, isVisible);
78-
});
76+
var isVisible = nativeView.Visibility == Microsoft.UI.Xaml.Visibility.Visible;
77+
Assert.Equal(expectedValue, isVisible);
78+
});
7979
}
8080

8181
ContentPanel GetNativeBorder(BorderHandler borderHandler) =>

src/Controls/tests/DeviceTests/Elements/Border/BorderTests.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ await InvokeOnMainThreadAsync(() =>
259259

260260
await AssertionExtensions.WaitForGC(handlerReference, platformViewReference);
261261
}
262-
262+
263263
[Fact(DisplayName = "Border With Stroke Shape And Name Does Not Leak")]
264264
public async Task DoesNotLeakWithStrokeShape()
265265
{

0 commit comments

Comments
 (0)