Skip to content

Commit

Permalink
Remove [Obsolete]
Browse files Browse the repository at this point in the history
This attribute was added automatically by the `dotnet format` CLI command
  • Loading branch information
TheCodeTraveler committed Jan 17, 2025
1 parent 1412e57 commit a96fe61
Show file tree
Hide file tree
Showing 11 changed files with 59 additions and 59 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static void ShouldLoopPlayback(MediaElementHandler handler, MediaElement
handler.mediaManager?.UpdateShouldLoopPlayback();
}

[Obsolete]

protected override MauiMediaElement CreatePlatformView()
{
mediaManager ??= new(MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} cannot be null"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public partial class MediaElementHandler
/// <summary>
/// The <see cref="MediaManager"/> that is managing the <see cref="IMediaElement"/> instance.
/// </summary>
[Obsolete]

protected MediaManager? mediaManager;
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void UpdateNotifications(in MediaSession session, in PlatformMediaElement
}

[MemberNotNull(nameof(playerNotificationManager))]
[Obsolete]

public void SetLegacyNotifications(in MediaSession session, in PlatformMediaElement mediaElement)
{
ArgumentNullException.ThrowIfNull(session);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected override void OnVisibilityChanged(Android.Views.View changedView, [Gen
/// Releases the unmanaged resources used by the <see cref="MediaElement"/> and optionally releases the managed resources.
/// </summary>
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
[Obsolete]

protected override void Dispose(bool disposing)
{
if (disposing)
Expand Down
36 changes: 18 additions & 18 deletions src/CommunityToolkit.Maui.MediaElement/Views/MediaManager.macios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public partial class MediaManager : IDisposable
/// Creates the corresponding platform view of <see cref="MediaElement"/> on iOS and macOS.
/// </summary>
/// <returns>The platform native counterpart of <see cref="MediaElement"/>.</returns>
[Obsolete]

public (PlatformMediaElement Player, AVPlayerViewController PlayerViewController) CreatePlatformView()
{
Player = new();
Expand Down Expand Up @@ -133,7 +133,7 @@ public void Dispose()
GC.SuppressFinalize(this);
}

[Obsolete]

protected virtual partial void PlatformPlay()
{
if (Player?.CurrentTime == PlayerItem?.Duration)
Expand All @@ -144,13 +144,13 @@ protected virtual partial void PlatformPlay()
Player?.Play();
}

[Obsolete]

protected virtual partial void PlatformPause()
{
Player?.Pause();
}

[Obsolete]

protected virtual async partial Task PlatformSeek(TimeSpan position, CancellationToken token)
{
token.ThrowIfCancellationRequested();
Expand Down Expand Up @@ -191,7 +191,7 @@ protected virtual async partial Task PlatformSeek(TimeSpan position, Cancellatio
MediaElement.SeekCompleted();
}

[Obsolete]

protected virtual partial void PlatformStop()
{
// There's no Stop method so pause the video and reset its position
Expand Down Expand Up @@ -385,7 +385,7 @@ protected virtual partial void PlatformUpdateShouldShowPlaybackControls()
MediaElement.ShouldShowPlaybackControls;
}

[Obsolete]

protected virtual partial void PlatformUpdatePosition()
{
if (Player is null)
Expand Down Expand Up @@ -418,7 +418,7 @@ protected virtual partial void PlatformUpdatePosition()
}
}

[Obsolete]

protected virtual partial void PlatformUpdateVolume()
{
if (Player is null)
Expand All @@ -433,7 +433,7 @@ protected virtual partial void PlatformUpdateVolume()
}
}

[Obsolete]

protected virtual partial void PlatformUpdateShouldKeepScreenOn()
{
if (Player is null)
Expand All @@ -443,7 +443,7 @@ protected virtual partial void PlatformUpdateShouldKeepScreenOn()
UIApplication.SharedApplication.IdleTimerDisabled = MediaElement.ShouldKeepScreenOn;
}

[Obsolete]

protected virtual partial void PlatformUpdateShouldMute()
{
if (Player is null)
Expand All @@ -463,7 +463,7 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()
/// Releases the unmanaged resources used by the <see cref="MediaManager"/> and optionally releases the managed resources.
/// </summary>
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; <see langword="false"/> to release only unmanaged resources.</param>
[Obsolete]

protected virtual void Dispose(bool disposing)
{
if (disposing)
Expand Down Expand Up @@ -548,7 +548,7 @@ protected virtual void Dispose(bool disposing)
}
}

[Obsolete]

void AddStatusObservers()
{
if (Player is null)
Expand All @@ -563,7 +563,7 @@ void AddStatusObservers()
RateObserver = AVPlayer.Notifications.ObserveRateDidChange(RateChanged);
}

[Obsolete]

void VolumeChanged(NSObservedChange e)
{
if (Player is null)
Expand All @@ -578,7 +578,7 @@ void VolumeChanged(NSObservedChange e)
}
}

[Obsolete]

void MutedChanged(NSObservedChange e)
{
if (Player is null)
Expand Down Expand Up @@ -617,7 +617,7 @@ void DestroyPlayedToEndObserver()
PlayedToEndObserver?.Dispose();
}

[Obsolete]

void StatusChanged(NSObservedChange obj)
{
if (Player is null)
Expand All @@ -636,7 +636,7 @@ void StatusChanged(NSObservedChange obj)
MediaElement.CurrentStateChanged(newState);
}

[Obsolete]

void TimeControlStatusChanged(NSObservedChange obj)
{
if (Player is null || Player.Status is AVPlayerStatus.Unknown
Expand All @@ -658,7 +658,7 @@ void TimeControlStatusChanged(NSObservedChange obj)
MediaElement.CurrentStateChanged(newState);
}

[Obsolete]

void ErrorOccurred(object? sender, NSNotificationEventArgs args)
{
string message;
Expand All @@ -681,7 +681,7 @@ void ErrorOccurred(object? sender, NSNotificationEventArgs args)
}
}

[Obsolete]

void PlayedToEnd(object? sender, NSNotificationEventArgs args)
{
if (args.Notification.Object != PlayerViewController?.Player?.CurrentItem || Player is null)
Expand All @@ -707,7 +707,7 @@ void PlayedToEnd(object? sender, NSNotificationEventArgs args)
}
}

[Obsolete]

void RateChanged(object? sender, NSNotificationEventArgs args)
{
if (Player is null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void ValidMaskWithUniqueUnmaskedCharacterTests(string? mask, char unmaske
}

[Fact]
[Obsolete]

public void AttachedToInvalidElementTest()
{
IReadOnlyList<VisualElement> invalidVisualElements =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
public class MaxLengthReachedBehaviorTests() : BaseBehaviorTest<MaxLengthReachedBehavior, InputView>(new MaxLengthReachedBehavior(), new Entry())
{
[Fact]
[Obsolete]

public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -23,7 +23,7 @@ public void ShouldExecuteCommandWhenMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -39,7 +39,7 @@ public void ShouldInvokeEventHandlerWhenMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
{
// arrange
Expand All @@ -56,7 +56,7 @@ public void ShouldExecuteCommandWithTextValueNoLargerThenMaxLength()
}

[Fact]
[Obsolete]

public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
{
// arrange
Expand All @@ -73,7 +73,7 @@ public void ShouldInvokeEventHandlerWithTextValueNoLargerThenMaxLength()
}

[Fact]
[Obsolete]

public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -88,7 +88,7 @@ public void ShouldNotExecuteCommandBeforeMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -103,7 +103,7 @@ public void ShouldNotInvokeEventHandlerBeforeMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -119,7 +119,7 @@ public void ShouldDismissKeyboardWhenMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
{
// arrange
Expand All @@ -134,7 +134,7 @@ public void ShouldNotDismissKeyboardBeforeMaxLengthHasBeenReached()
}

[Fact]
[Obsolete]

public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
{
// arrange
Expand All @@ -149,7 +149,7 @@ public void ShouldNotDismissKeyboardWhenOptionSetToFalse()
Assert.True(entry.IsFocused);
}

[Obsolete]

static Entry CreateEntry(int? maxLength = 2,
bool shouldDismissKeyboardAutomatically = false,
ICommand? command = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace CommunityToolkit.Maui.UnitTests.Behaviors;
public class SetFocusOnEntryCompletedTests() : BaseBehaviorTest<SetFocusOnEntryCompletedBehavior, VisualElement>(new SetFocusOnEntryCompletedBehavior(), new View())
{
[Fact]
[Obsolete]

public void DoesNotSetFocusBeforeCompletion()
{
// arrange
Expand All @@ -22,7 +22,7 @@ public void DoesNotSetFocusBeforeCompletion()
}

[Fact]
[Obsolete]

public void SetsFocusWhenCompleted()
{
// arrange
Expand All @@ -37,7 +37,7 @@ public void SetsFocusWhenCompleted()
Assert.True(entry2.IsFocused);
}

[Obsolete]

static Entry CreateEntry(VisualElement? nextElement = null)
{
var entry = new Entry();
Expand Down
Loading

0 comments on commit a96fe61

Please sign in to comment.