Skip to content

Commit 513755f

Browse files
[create-pull-request] automated change (dotnet#31312)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 03ab375 commit 513755f

145 files changed

Lines changed: 3380 additions & 3374 deletions

File tree

Some content is hidden

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

src/Controls/tests/ManualTests/Categories/Category.cs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
public static class Category
44
{
5-
public const string Layout = nameof(Layout);
6-
public const string Scroll = nameof(Scroll);
7-
public const string RefreshView = nameof(RefreshView);
8-
public const string Editor = nameof(Editor);
9-
public const string Entry = nameof(Entry);
10-
public const string FlyoutPage = nameof(FlyoutPage);
11-
public const string Animation = nameof(Animation);
12-
public const string Commands = nameof(Commands);
13-
public const string CollectionView = nameof(CollectionView);
14-
public const string TitleBar = nameof(TitleBar);
15-
public const string Performance = nameof(Performance);
5+
public const string Layout = nameof(Layout);
6+
public const string Scroll = nameof(Scroll);
7+
public const string RefreshView = nameof(RefreshView);
8+
public const string Editor = nameof(Editor);
9+
public const string Entry = nameof(Entry);
10+
public const string FlyoutPage = nameof(FlyoutPage);
11+
public const string Animation = nameof(Animation);
12+
public const string Commands = nameof(Commands);
13+
public const string CollectionView = nameof(CollectionView);
14+
public const string TitleBar = nameof(TitleBar);
15+
public const string Performance = nameof(Performance);
1616
}

src/Controls/tests/ManualTests/Categories/CategoryAttribute.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
44
public class CategoryAttribute : Attribute
55
{
6-
public CategoryAttribute(string id, string title)
7-
{
8-
Id = id;
9-
Title = title;
10-
}
6+
public CategoryAttribute(string id, string title)
7+
{
8+
Id = id;
9+
Title = title;
10+
}
1111

12-
public string Id { get; set; }
12+
public string Id { get; set; }
1313

14-
public string Title { get; set; }
14+
public string Title { get; set; }
1515
}

src/Controls/tests/ManualTests/Categories/CategoryPage.xaml.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ public CategoryPage(CategoryViewModel viewModel)
1111
BindingContext = viewModel;
1212
}
1313

14-
private void CollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e)
15-
{
16-
if (e.CurrentSelection.FirstOrDefault() is TestPageInfo test)
17-
{
18-
var page = (Page)Activator.CreateInstance(test.Type);
14+
private void CollectionView_SelectionChanged(object sender, SelectionChangedEventArgs e)
15+
{
16+
if (e.CurrentSelection.FirstOrDefault() is TestPageInfo test)
17+
{
18+
var page = (Page)Activator.CreateInstance(test.Type);
1919

20-
if (page is ContentPage)
21-
Navigation.PushAsync(page);
22-
else if (page is not Shell)
23-
Navigation.PushModalAsync(page);
24-
else
25-
this.Window.Page = page;
26-
}
20+
if (page is ContentPage)
21+
Navigation.PushAsync(page);
22+
else if (page is not Shell)
23+
Navigation.PushModalAsync(page);
24+
else
25+
this.Window.Page = page;
26+
}
2727

28-
var cv = sender as CollectionView;
29-
if (cv is not null)
30-
cv.SelectedItem = null;
31-
}
28+
var cv = sender as CollectionView;
29+
if (cv is not null)
30+
cv.SelectedItem = null;
31+
}
3232
}

src/Controls/tests/ManualTests/Categories/CategoryViewModel.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,84 +5,84 @@ namespace Microsoft.Maui.ManualTests.Categories;
55

66
public abstract class CategoryViewModel
77
{
8-
public CategoryViewModel()
9-
{
10-
Tests = GetType().Assembly.GetTypes()
11-
.Where(t => t.IsAssignableTo(typeof(Page)))
12-
.Select(t => new TestPageInfo(t, t.GetCustomAttribute<TestAttribute>()))
13-
.Where(t => t.Test is not null)
14-
.Where(t => t.Test.Category == CategoryName)
15-
.ToList();
16-
Tests.Sort();
17-
}
8+
public CategoryViewModel()
9+
{
10+
Tests = GetType().Assembly.GetTypes()
11+
.Where(t => t.IsAssignableTo(typeof(Page)))
12+
.Select(t => new TestPageInfo(t, t.GetCustomAttribute<TestAttribute>()))
13+
.Where(t => t.Test is not null)
14+
.Where(t => t.Test.Category == CategoryName)
15+
.ToList();
16+
Tests.Sort();
17+
}
1818

19-
public List<TestPageInfo> Tests { get; set; }
19+
public List<TestPageInfo> Tests { get; set; }
2020

21-
public abstract string CategoryName { get;}
21+
public abstract string CategoryName { get; }
2222
}
2323

2424
[Category(id: "A", title: Category.Layout)]
2525
public class LayoutCategoryViewModel : CategoryViewModel
2626
{
27-
public override string CategoryName => Category.Layout;
27+
public override string CategoryName => Category.Layout;
2828
}
2929

3030
[Category(id: "B", title: Category.Scroll)]
3131
public class ScrollCategoryViewModel : CategoryViewModel
3232
{
33-
public override string CategoryName => Category.Scroll;
33+
public override string CategoryName => Category.Scroll;
3434
}
3535

3636
[Category(id: "C", title: Category.RefreshView)]
3737
public class RefreshViewCategoryViewModel : CategoryViewModel
3838
{
39-
public override string CategoryName => Category.RefreshView;
39+
public override string CategoryName => Category.RefreshView;
4040
}
4141

4242
[Category(id: "D", title: Category.Editor)]
4343
public class EditorCategoryViewModel : CategoryViewModel
4444
{
45-
public override string CategoryName => Category.Editor;
45+
public override string CategoryName => Category.Editor;
4646
}
4747

4848
[Category(id: "E", title: Category.Entry)]
4949
public class EntryCategoryViewModel : CategoryViewModel
5050
{
51-
public override string CategoryName => Category.Entry;
51+
public override string CategoryName => Category.Entry;
5252
}
5353

5454
[Category(id: "F", title: Category.Animation)]
5555
public class AnimationCategoryViewModel : CategoryViewModel
5656
{
57-
public override string CategoryName => Category.Animation;
57+
public override string CategoryName => Category.Animation;
5858
}
5959

6060
[Category(id: "G", title: Category.Commands)]
6161
public class CommandsCategoryViewModel : CategoryViewModel
6262
{
63-
public override string CategoryName => Category.Commands;
63+
public override string CategoryName => Category.Commands;
6464
}
6565

6666
[Category(id: "H", title: Category.FlyoutPage)]
6767
public class FlyoutPageCategoryViewModel : CategoryViewModel
6868
{
69-
public override string CategoryName => Category.FlyoutPage;
69+
public override string CategoryName => Category.FlyoutPage;
7070
}
7171

7272
[Category(id: "I", title: Category.CollectionView)]
73-
public class CollectionViewCategoryViewModel: CategoryViewModel
73+
public class CollectionViewCategoryViewModel : CategoryViewModel
7474
{
75-
public override string CategoryName => Category.CollectionView;
75+
public override string CategoryName => Category.CollectionView;
7676
}
7777

7878
[Category(id: "J", title: Category.TitleBar)]
7979
public class TitleBarCategoryViewModel : CategoryViewModel
8080
{
81-
public override string CategoryName => Category.TitleBar;
81+
public override string CategoryName => Category.TitleBar;
8282
}
8383

8484
[Category(id: "K", title: Category.Performance)]
8585
public class PerformanceCategoryViewModel : CategoryViewModel
8686
{
87-
public override string CategoryName => Category.Performance;
87+
public override string CategoryName => Category.Performance;
8888
}

src/Controls/tests/ManualTests/Controls/EnumPicker.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,31 @@
22

33
namespace Microsoft.Maui.ManualTests.Controls
44
{
5-
class EnumPicker : Picker
6-
{
7-
public static readonly BindableProperty EnumTypeProperty =
8-
BindableProperty.Create(nameof(EnumType), typeof(Type), typeof(EnumPicker),
9-
propertyChanged: (bindable, oldValue, newValue) =>
10-
{
11-
EnumPicker picker = (EnumPicker)bindable;
5+
class EnumPicker : Picker
6+
{
7+
public static readonly BindableProperty EnumTypeProperty =
8+
BindableProperty.Create(nameof(EnumType), typeof(Type), typeof(EnumPicker),
9+
propertyChanged: (bindable, oldValue, newValue) =>
10+
{
11+
EnumPicker picker = (EnumPicker)bindable;
1212

13-
if (oldValue != null)
14-
{
15-
picker.ItemsSource = null;
16-
}
17-
if (newValue != null)
18-
{
19-
if (!((Type)newValue).GetTypeInfo().IsEnum)
20-
throw new ArgumentException("EnumPicker: EnumType property must be enumeration type");
13+
if (oldValue != null)
14+
{
15+
picker.ItemsSource = null;
16+
}
17+
if (newValue != null)
18+
{
19+
if (!((Type)newValue).GetTypeInfo().IsEnum)
20+
throw new ArgumentException("EnumPicker: EnumType property must be enumeration type");
2121

22-
picker.ItemsSource = Enum.GetValues((Type)newValue);
23-
}
24-
});
22+
picker.ItemsSource = Enum.GetValues((Type)newValue);
23+
}
24+
});
2525

26-
public Type EnumType
27-
{
28-
set => SetValue(EnumTypeProperty, value);
29-
get => (Type)GetValue(EnumTypeProperty);
30-
}
31-
}
26+
public Type EnumType
27+
{
28+
set => SetValue(EnumTypeProperty, value);
29+
get => (Type)GetValue(EnumTypeProperty);
30+
}
31+
}
3232
}
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
namespace Microsoft.Maui.ManualTests.Controls
22
{
3-
public class FilterData : BindableObject
4-
{
5-
public static readonly BindableProperty FilterProperty = BindableProperty.Create(nameof(Filter), typeof(string), typeof(FilterData), null);
3+
public class FilterData : BindableObject
4+
{
5+
public static readonly BindableProperty FilterProperty = BindableProperty.Create(nameof(Filter), typeof(string), typeof(FilterData), null);
66

7-
public string Filter
8-
{
9-
get { return (string)GetValue(FilterProperty); }
10-
set { SetValue(FilterProperty, value); }
11-
}
12-
}
7+
public string Filter
8+
{
9+
get { return (string)GetValue(FilterProperty); }
10+
set { SetValue(FilterProperty, value); }
11+
}
12+
}
1313
}

src/Controls/tests/ManualTests/Controls/MonkeyDataTemplateSelector.cs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
namespace Microsoft.Maui.ManualTests.Controls
44
{
5-
public class MonkeyDataTemplateSelector : DataTemplateSelector
6-
{
7-
public DataTemplate AmericanMonkey { get; set; }
8-
public DataTemplate OtherMonkey { get; set; }
5+
public class MonkeyDataTemplateSelector : DataTemplateSelector
6+
{
7+
public DataTemplate AmericanMonkey { get; set; }
8+
public DataTemplate OtherMonkey { get; set; }
99

10-
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
11-
{
12-
return ((Monkey)item).Location.Contains("America", StringComparison.Ordinal) ? AmericanMonkey : OtherMonkey;
13-
}
14-
}
10+
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
11+
{
12+
return ((Monkey)item).Location.Contains("America", StringComparison.Ordinal) ? AmericanMonkey : OtherMonkey;
13+
}
14+
}
1515
}
Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
namespace Microsoft.Maui.ManualTests.Controls
22
{
3-
public class SearchTermDataTemplateSelector : DataTemplateSelector
4-
{
5-
public DataTemplate DefaultTemplate { get; set; }
6-
public DataTemplate OtherTemplate { get; set; }
3+
public class SearchTermDataTemplateSelector : DataTemplateSelector
4+
{
5+
public DataTemplate DefaultTemplate { get; set; }
6+
public DataTemplate OtherTemplate { get; set; }
77

8-
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
9-
{
10-
string query = (string)item;
11-
return string.Equals(query, "xamarin", StringComparison.OrdinalIgnoreCase) ? OtherTemplate : DefaultTemplate;
12-
}
13-
}
8+
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
9+
{
10+
string query = (string)item;
11+
return string.Equals(query, "xamarin", StringComparison.OrdinalIgnoreCase) ? OtherTemplate : DefaultTemplate;
12+
}
13+
}
1414
}

0 commit comments

Comments
 (0)