Skip to content

Commit e66f78e

Browse files
dotnet format
1 parent a96fe61 commit e66f78e

File tree

10 files changed

+27
-72
lines changed

10 files changed

+27
-72
lines changed

src/CommunityToolkit.Maui.Core/Platform/StatusBar/StatusBar.ios.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public static void SetBarSize(bool isUsingSafeArea)
4141
static void PlatformSetColor(Color color)
4242
{
4343
var uiColor = color.ToPlatform();
44-
44+
4545
var statusBarTag = new IntPtr(38482);
4646
foreach (var window in UIApplication.SharedApplication.Windows)
4747
{
@@ -51,7 +51,7 @@ static void PlatformSetColor(Color color)
5151
{
5252
continue;
5353
}
54-
54+
5555
statusBar ??= new UIView(statusBarFrame.Value);
5656
statusBar.Tag = statusBarTag;
5757
statusBar.BackgroundColor = uiColor;
@@ -72,7 +72,7 @@ static void PlatformSetColor(Color color)
7272
static CGRect GetStatusBarFrame(in UIWindow window, in bool isUsingSafeArea)
7373
{
7474
var statusBarFrame = UIApplication.SharedApplication.StatusBarFrame;
75-
75+
7676
return isUsingSafeArea
7777
? new CGRect(statusBarFrame.X, statusBarFrame.Y, statusBarFrame.Width, window.SafeAreaInsets.Top)
7878
: statusBarFrame;

src/CommunityToolkit.Maui.MediaElement/Handlers/MediaElementHandler.android.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public static void ShouldLoopPlayback(MediaElementHandler handler, MediaElement
1717
handler.mediaManager?.UpdateShouldLoopPlayback();
1818
}
1919

20-
20+
2121
protected override MauiMediaElement CreatePlatformView()
2222
{
2323
mediaManager ??= new(MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} cannot be null"),

src/CommunityToolkit.Maui.MediaElement/Views/MauiMediaElement.android.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ protected override void OnVisibilityChanged(Android.Views.View changedView, [Gen
8181
/// Releases the unmanaged resources used by the <see cref="MediaElement"/> and optionally releases the managed resources.
8282
/// </summary>
8383
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
84-
8584
protected override void Dispose(bool disposing)
8685
{
8786
if (disposing)

src/CommunityToolkit.Maui.MediaElement/Views/MediaManager.macios.cs

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public partial class MediaManager : IDisposable
9090
/// Creates the corresponding platform view of <see cref="MediaElement"/> on iOS and macOS.
9191
/// </summary>
9292
/// <returns>The platform native counterpart of <see cref="MediaElement"/>.</returns>
93-
9493
public (PlatformMediaElement Player, AVPlayerViewController PlayerViewController) CreatePlatformView()
9594
{
9695
Player = new();
@@ -132,7 +131,6 @@ public void Dispose()
132131
Dispose(true);
133132
GC.SuppressFinalize(this);
134133
}
135-
136134

137135
protected virtual partial void PlatformPlay()
138136
{
@@ -144,12 +142,10 @@ protected virtual partial void PlatformPlay()
144142
Player?.Play();
145143
}
146144

147-
148145
protected virtual partial void PlatformPause()
149146
{
150147
Player?.Pause();
151148
}
152-
153149

154150
protected virtual async partial Task PlatformSeek(TimeSpan position, CancellationToken token)
155151
{
@@ -191,7 +187,6 @@ protected virtual async partial Task PlatformSeek(TimeSpan position, Cancellatio
191187
MediaElement.SeekCompleted();
192188
}
193189

194-
195190
protected virtual partial void PlatformStop()
196191
{
197192
// There's no Stop method so pause the video and reset its position
@@ -384,7 +379,6 @@ protected virtual partial void PlatformUpdateShouldShowPlaybackControls()
384379
PlayerViewController.ShowsPlaybackControls =
385380
MediaElement.ShouldShowPlaybackControls;
386381
}
387-
388382

389383
protected virtual partial void PlatformUpdatePosition()
390384
{
@@ -417,7 +411,6 @@ protected virtual partial void PlatformUpdatePosition()
417411
MediaElement.Duration = MediaElement.Position = TimeSpan.Zero;
418412
}
419413
}
420-
421414

422415
protected virtual partial void PlatformUpdateVolume()
423416
{
@@ -433,7 +426,7 @@ protected virtual partial void PlatformUpdateVolume()
433426
}
434427
}
435428

436-
429+
437430
protected virtual partial void PlatformUpdateShouldKeepScreenOn()
438431
{
439432
if (Player is null)
@@ -443,7 +436,7 @@ protected virtual partial void PlatformUpdateShouldKeepScreenOn()
443436
UIApplication.SharedApplication.IdleTimerDisabled = MediaElement.ShouldKeepScreenOn;
444437
}
445438

446-
439+
447440
protected virtual partial void PlatformUpdateShouldMute()
448441
{
449442
if (Player is null)
@@ -463,7 +456,7 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()
463456
/// Releases the unmanaged resources used by the <see cref="MediaManager"/> and optionally releases the managed resources.
464457
/// </summary>
465458
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
466-
459+
467460
protected virtual void Dispose(bool disposing)
468461
{
469462
if (disposing)
@@ -548,7 +541,7 @@ protected virtual void Dispose(bool disposing)
548541
}
549542
}
550543

551-
544+
552545
void AddStatusObservers()
553546
{
554547
if (Player is null)
@@ -563,7 +556,7 @@ void AddStatusObservers()
563556
RateObserver = AVPlayer.Notifications.ObserveRateDidChange(RateChanged);
564557
}
565558

566-
559+
567560
void VolumeChanged(NSObservedChange e)
568561
{
569562
if (Player is null)
@@ -578,7 +571,7 @@ void VolumeChanged(NSObservedChange e)
578571
}
579572
}
580573

581-
574+
582575
void MutedChanged(NSObservedChange e)
583576
{
584577
if (Player is null)
@@ -617,7 +610,7 @@ void DestroyPlayedToEndObserver()
617610
PlayedToEndObserver?.Dispose();
618611
}
619612

620-
613+
621614
void StatusChanged(NSObservedChange obj)
622615
{
623616
if (Player is null)
@@ -636,7 +629,7 @@ void StatusChanged(NSObservedChange obj)
636629
MediaElement.CurrentStateChanged(newState);
637630
}
638631

639-
632+
640633
void TimeControlStatusChanged(NSObservedChange obj)
641634
{
642635
if (Player is null || Player.Status is AVPlayerStatus.Unknown
@@ -658,7 +651,7 @@ void TimeControlStatusChanged(NSObservedChange obj)
658651
MediaElement.CurrentStateChanged(newState);
659652
}
660653

661-
654+
662655
void ErrorOccurred(object? sender, NSNotificationEventArgs args)
663656
{
664657
string message;
@@ -681,7 +674,7 @@ void ErrorOccurred(object? sender, NSNotificationEventArgs args)
681674
}
682675
}
683676

684-
677+
685678
void PlayedToEnd(object? sender, NSNotificationEventArgs args)
686679
{
687680
if (args.Notification.Object != PlayerViewController?.Player?.CurrentItem || Player is null)
@@ -707,7 +700,7 @@ void PlayedToEnd(object? sender, NSNotificationEventArgs args)
707700
}
708701
}
709702

710-
703+
711704
void RateChanged(object? sender, NSNotificationEventArgs args)
712705
{
713706
if (Player is null)

src/CommunityToolkit.Maui.UnitTests/Behaviors/MaskedBehaviorTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public void ValidMaskWithUniqueUnmaskedCharacterTests(string? mask, char unmaske
5858
}
5959

6060
[Fact]
61-
6261
public void AttachedToInvalidElementTest()
6362
{
6463
IReadOnlyList<VisualElement> invalidVisualElements =

src/CommunityToolkit.Maui.UnitTests/Behaviors/MaxLengthReachedBehaviorTests.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
77
public class MaxLengthReachedBehaviorTests() : BaseBehaviorTest<MaxLengthReachedBehavior, InputView>(new MaxLengthReachedBehavior(), new Entry())
88
{
99
[Fact]
10-
1110
public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
1211
{
1312
// arrange
@@ -23,7 +22,6 @@ public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
2322
}
2423

2524
[Fact]
26-
2725
public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
2826
{
2927
// arrange
@@ -39,7 +37,6 @@ public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
3937
}
4038

4139
[Fact]
42-
4340
public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
4441
{
4542
// arrange
@@ -56,7 +53,6 @@ public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
5653
}
5754

5855
[Fact]
59-
6056
public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
6157
{
6258
// arrange
@@ -73,7 +69,6 @@ public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
7369
}
7470

7571
[Fact]
76-
7772
public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
7873
{
7974
// arrange
@@ -88,7 +83,6 @@ public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
8883
}
8984

9085
[Fact]
91-
9286
public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
9387
{
9488
// arrange
@@ -103,7 +97,6 @@ public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
10397
}
10498

10599
[Fact]
106-
107100
public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
108101
{
109102
// arrange
@@ -119,7 +112,6 @@ public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
119112
}
120113

121114
[Fact]
122-
123115
public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
124116
{
125117
// arrange
@@ -134,7 +126,6 @@ public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
134126
}
135127

136128
[Fact]
137-
138129
public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
139130
{
140131
// arrange
@@ -148,7 +139,6 @@ public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
148139
// assert
149140
Assert.True(entry.IsFocused);
150141
}
151-
152142

153143
static Entry CreateEntry(int? maxLength = 2,
154144
bool shouldDismissKeyboardAutomatically = false,

src/CommunityToolkit.Maui.UnitTests/Behaviors/SetFocusOnEntryCompletedTests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
66
public class SetFocusOnEntryCompletedTests() : BaseBehaviorTest<SetFocusOnEntryCompletedBehavior, VisualElement>(new SetFocusOnEntryCompletedBehavior(), new View())
77
{
88
[Fact]
9-
109
public void DoesNotSetFocusBeforeCompletion()
1110
{
1211
// arrange
@@ -22,7 +21,6 @@ public void DoesNotSetFocusBeforeCompletion()
2221
}
2322

2423
[Fact]
25-
2624
public void SetsFocusWhenCompleted()
2725
{
2826
// arrange
@@ -36,7 +34,6 @@ public void SetsFocusWhenCompleted()
3634
// assert
3735
Assert.True(entry2.IsFocused);
3836
}
39-
4037

4138
static Entry CreateEntry(VisualElement? nextElement = null)
4239
{

src/CommunityToolkit.Maui.UnitTests/Behaviors/UserStoppedTypingBehaviorTests.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
77
public class UserStoppedTypingBehaviorTests() : BaseBehaviorTest<UserStoppedTypingBehavior, InputView>(new UserStoppedTypingBehavior(), new Entry())
88
{
99
[Fact(Timeout = (int)TestDuration.Short)]
10-
1110
public async Task ShouldExecuteCommandWhenTimeThresholdHasExpired()
1211
{
1312
// arrange
@@ -29,7 +28,6 @@ public async Task ShouldExecuteCommandWhenTimeThresholdHasExpired()
2928
}
3029

3130
[Fact(Timeout = (int)TestDuration.Short)]
32-
3331
public async Task ShouldExecuteCommandWithSpecificParameterWhenSpecified()
3432
{
3533
// arrange
@@ -50,7 +48,6 @@ public async Task ShouldExecuteCommandWithSpecificParameterWhenSpecified()
5048
}
5149

5250
[Fact(Timeout = (int)TestDuration.Short)]
53-
5451
public async Task ShouldNotExecuteCommandBeforeTimeThresholdHasExpired()
5552
{
5653
// arrange
@@ -75,7 +72,6 @@ public async Task ShouldNotExecuteCommandBeforeTimeThresholdHasExpired()
7572
}
7673

7774
[Fact(Timeout = (int)TestDuration.Short)]
78-
7975
public async Task ShouldOnlyExecuteCommandOnceWhenTextChangedHasOccurredMultipleTimes()
8076
{
8177
// arrange
@@ -99,7 +95,6 @@ public async Task ShouldOnlyExecuteCommandOnceWhenTextChangedHasOccurredMultiple
9995
}
10096

10197
[Fact(Timeout = (int)TestDuration.Short)]
102-
10398
public async Task ShouldDismissKeyboardWhenTimeThresholdHasExpired()
10499
{
105100
// arrange
@@ -124,7 +119,6 @@ void HandleEntryUnfocused(object? sender, FocusEventArgs e)
124119
}
125120

126121
[Fact(Timeout = (int)TestDuration.Short)]
127-
128122
public async Task ShouldExecuteCommandWhenMinimumLengthThresholdHasBeenReached()
129123
{
130124
// arrange
@@ -148,7 +142,6 @@ public async Task ShouldExecuteCommandWhenMinimumLengthThresholdHasBeenReached()
148142
}
149143

150144
[Fact(Timeout = (int)TestDuration.Long)]
151-
152145
public async Task ShouldNotExecuteCommandWhenMinimumLengthThresholdHasNotBeenReached()
153146
{
154147
// arrange
@@ -187,7 +180,6 @@ void HandleFocused(object? sender, FocusEventArgs e)
187180
}
188181

189182
[Fact(Timeout = (int)TestDuration.Long)]
190-
191183
public async Task ShouldNotDismissKeyboardWhenMinimumLengthThresholdHasNotBeenReached()
192184
{
193185
// arrange
@@ -228,7 +220,6 @@ void HandleUnfocused(object? sender, FocusEventArgs e)
228220
}
229221

230222
[Fact(Timeout = (int)TestDuration.Short)]
231-
232223
public async Task ShouldExecuteCommandImmediatelyWhenMinimumLengthThresholdHasNotBeenSet()
233224
{
234225
// arrange
@@ -247,7 +238,6 @@ public async Task ShouldExecuteCommandImmediatelyWhenMinimumLengthThresholdHasNo
247238
// assert
248239
Assert.True(commandHasBeenExecuted);
249240
}
250-
251241

252242
static Entry CreateEntryWithBehavior(int stoppedTypingTimeThreshold = 500,
253243
int minimumLengthThreshold = 0,

0 commit comments

Comments
 (0)