Skip to content

Commit

Permalink
Automated dotnet-format update (#1043)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] authored May 18, 2021
1 parent aef35c3 commit 7df55bd
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 23 deletions.
16 changes: 8 additions & 8 deletions src/Controls/samples/Controls.Sample/Pages/AppShell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

namespace Maui.Controls.Sample.Pages
{
public class AppShell : Shell
{
public AppShell(IServiceProvider services, MainPageViewModel viewModel)
{
Items.Add(new FlyoutItem() { Title = "Flyout Item 1", Items = { new MainPage(services, viewModel), new SemanticsPage() } });
Items.Add(new FlyoutItem() { Title = "Flyout Item 2", Items = { new MainPage(services, viewModel), new SemanticsPage() } });
}
}
public class AppShell : Shell
{
public AppShell(IServiceProvider services, MainPageViewModel viewModel)
{
Items.Add(new FlyoutItem() { Title = "Flyout Item 1", Items = { new MainPage(services, viewModel), new SemanticsPage() } });
Items.Add(new FlyoutItem() { Title = "Flyout Item 2", Items = { new MainPage(services, viewModel), new SemanticsPage() } });
}
}
}
9 changes: 5 additions & 4 deletions src/Controls/samples/Controls.Sample/Pages/MainPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ public class VisibilityLabel : Label, IFrameworkElement
{
private Visibility _visibility;

public void SetVisibility(Visibility visibility)
public void SetVisibility(Visibility visibility)
{
_visibility = visibility;
Handler?.UpdateValue(nameof(Visibility));
}

Visibility IFrameworkElement.Visibility
{
get
get
{
return _visibility;
return _visibility;
}
}
}
Expand Down Expand Up @@ -526,7 +526,8 @@ void SetupVisibilityTest()

var mauiLabel = new VisibilityLabel() { Text = "Core Label" };

button1.Clicked += (sender, args) => {
button1.Clicked += (sender, args) =>
{
controlsLabel.IsVisible = !controlsLabel.IsVisible;
};

Expand Down
2 changes: 1 addition & 1 deletion src/Controls/samples/Controls.Sample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void Configure(IAppHostBuilder appBuilder)
{"Position:Name", "Dictionary_Name" },
{"Logging:LogLevel:Default", "Warning"}
});
});
});

if (useFullDIAndBlazor)
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Core/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ internal static IMauiContext FindMauiContextOnParent(this Element element)
var navPage = element
.GetParentsPath()
.OfType<IView>()
.Where(x=> x.Handler?.MauiContext != null)
.Where(x => x.Handler?.MauiContext != null)
.FirstOrDefault();

return navPage?.Handler?.MauiContext;
Expand Down
4 changes: 2 additions & 2 deletions src/Core/src/Layouts/GridLayoutManager.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#nullable enable
using System;
using System.Collections.Generic;
using Microsoft.Maui.Graphics;
using System.Linq;
using Microsoft.Maui.Graphics;

namespace Microsoft.Maui.Layouts
{
Expand Down Expand Up @@ -498,7 +498,7 @@ public void Update(double size)

public abstract bool IsAuto { get; }
public abstract bool IsStar { get; }

public abstract GridLength GridLength { get; }
}

Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/Android/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static void UpdateVisibility(this AView nativeView, IView view)
nativeView.Visibility = view.Visibility.ToNativeVisibility();
}

public static ViewStates ToNativeVisibility(this Visibility visibility)
public static ViewStates ToNativeVisibility(this Visibility visibility)
{
return visibility switch
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/src/Platform/iOS/CollapseConstraint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.Maui
/// <summary>
/// Constraint which forces a UIView's height to zero
/// </summary>
internal class CollapseConstraint : NSLayoutConstraint
internal class CollapseConstraint : NSLayoutConstraint
{
public override NSLayoutRelation Relation => NSLayoutRelation.Equal;
public override NSLayoutAttribute FirstAttribute => NSLayoutAttribute.Height;
Expand Down
6 changes: 3 additions & 3 deletions src/Core/tests/UnitTests/Layouts/GridLayoutManagerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public void ColumnSpanShouldNotModifyAbsoluteColumnSize()

[Category(GridSpan)]
[Fact]
public void CanSpanAbsoluteColumns()
public void CanSpanAbsoluteColumns()
{
var grid = CreateGridLayout(rows: "auto", columns: "100,100");
var view0 = CreateTestView(new Size(150, 100));
Expand Down Expand Up @@ -774,7 +774,7 @@ public void MultipleStarColumns()
var view2 = CreateTestView(viewSize);

AddChildren(grid, view0, view1, view2);

SetLocation(grid, view0);
SetLocation(grid, view1, col: 1);
SetLocation(grid, view2, col: 2);
Expand Down Expand Up @@ -1025,7 +1025,7 @@ public void MultipleStarRowsWithViewsInfiniteHeightMeasure()
[Category(GridAbsoluteSizing)]
[Category(GridStarSizing)]
[Fact]
public void MixStarsAndExplicitSizes()
public void MixStarsAndExplicitSizes()
{
var screenWidth = 300;
var screenHeight = 600;
Expand Down
4 changes: 2 additions & 2 deletions src/SingleProject/Resizetizer/src/GetMauiAssetPath.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public override bool Execute()
if (Path.IsPathRooted(path))
{
path = Path.GetFullPath(path);
if (!MakeRelative (item.GetMetadata("ProjectDirectory"), ref path) && !MakeRelative (ProjectDirectory, ref path))
if (!MakeRelative(item.GetMetadata("ProjectDirectory"), ref path) && !MakeRelative(ProjectDirectory, ref path))
{
// If this is a random path, the best we can do is use the file name
path = Path.GetFileName(path);
Expand All @@ -67,7 +67,7 @@ public override bool Execute()
return !Log.HasLoggedErrors;
}

static bool MakeRelative (string projectDirectory, ref string path)
static bool MakeRelative(string projectDirectory, ref string path)
{
if (string.IsNullOrEmpty(projectDirectory))
return false;
Expand Down

0 comments on commit 7df55bd

Please sign in to comment.