Skip to content

Commit

Permalink
Automated dotnet-format update
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Feb 15, 2024
1 parent cc62c6f commit 8eff768
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace CommunityToolkit.Maui.Media;
public sealed partial class SpeechToTextImplementation
{
[MemberNotNull(nameof(audioEngine), nameof(recognitionTask), nameof(liveSpeechRequest), nameof(getRecognitionTaskCompletionSource))]
[Obsolete]
Task InternalStartListeningAsync(CultureInfo culture, CancellationToken cancellationToken)
{
speechRecognizer = new SFSpeechRecognizer(NSLocale.FromLocaleIdentifier(culture.Name));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ void ResultGenerated(SpeechContinuousRecognitionSession sender, SpeechContinuous
OnRecognitionResultUpdated(args.Result.Text);
}

Task InternalStopListeningAsync(CancellationToken cancellationToken) => StopRecording(cancellationToken);
Task InternalStopListeningAsync(CancellationToken cancellationToken) => StopRecording(cancellationToken);

async Task<string> InternalListenAsync(CultureInfo culture, IProgress<string>? recognitionResult, CancellationToken cancellationToken)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public MapHandlerWindows() : base(Mapper, CommandMapper)

/// <inheritdoc/>

[Obsolete]
protected override FrameworkElement CreatePlatformView()
{
if (string.IsNullOrEmpty(MapsKey))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ namespace CommunityToolkit.Maui.Core.Views;
/// </summary>
public class MauiMediaElement : CoordinatorLayout
{
[Obsolete]
readonly StyledPlayerView playerView;

/// <summary>
/// Initializes a new instance of the <see cref="MauiMediaElement"/> class.
/// </summary>
/// <param name="context">The application's <see cref="Context"/>.</param>
/// <param name="playerView">The <see cref="StyledPlayerView"/> that acts as the platform media player.</param>
[Obsolete]
public MauiMediaElement(Context context, StyledPlayerView playerView) : base(context)
{
this.playerView = playerView;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public void Dispose()
/// </summary>
protected virtual void Dispose(bool disposing)
{
if(isDisposed)
if (isDisposed)
{
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

namespace CommunityToolkit.Maui.Core.Views;

[Obsolete]
public partial class MediaManager : Java.Lang.Object, IPlayer.IListener
{
readonly SemaphoreSlim seekToSemaphoreSlim = new(1, 1);
Expand All @@ -25,13 +26,15 @@ public partial class MediaManager : Java.Lang.Object, IPlayer.IListener
/// <summary>
/// The platform native counterpart of <see cref="MediaElement"/>.
/// </summary>
[Obsolete]
protected StyledPlayerView? PlayerView { get; set; }

/// <summary>
/// Creates the corresponding platform view of <see cref="MediaElement"/> on Android.
/// </summary>
/// <returns>The platform native counterpart of <see cref="MediaElement"/>.</returns>
/// <exception cref="NullReferenceException">Thrown when <see cref="Android.Content.Context"/> is <see langword="null"/> or when the platform view could not be created.</exception>
[Obsolete]
public (PlatformMediaElement platformView, StyledPlayerView PlayerView) CreatePlatformView()
{
ArgumentNullException.ThrowIfNull(MauiContext.Context);
Expand All @@ -56,6 +59,7 @@ public partial class MediaManager : Java.Lang.Object, IPlayer.IListener
/// This is part of the <see cref="IPlayer.IListener"/> implementation.
/// While this method does not seem to have any references, it's invoked at runtime.
/// </remarks>
[Obsolete]
public void OnPlaybackParametersChanged(PlaybackParameters? playbackParameters)
{
if (playbackParameters is null)
Expand All @@ -78,6 +82,7 @@ public void OnPlaybackParametersChanged(PlaybackParameters? playbackParameters)
/// This is part of the <see cref="IPlayer.IListener"/> implementation.
/// While this method does not seem to have any references, it's invoked at runtime.
/// </remarks>
[Obsolete]
public void OnPlayerStateChanged(bool playWhenReady, int playbackState)
{
if (Player is null || MediaElement.Source is null)
Expand Down Expand Up @@ -127,6 +132,7 @@ or PlaybackStateCompat.StateSkippingToQueueItem
/// This is part of the <see cref="IPlayer.IListener"/> implementation.
/// While this method does not seem to have any references, it's invoked at runtime.
/// </remarks>
[Obsolete]
public void OnPlaybackStateChanged(int playbackState)
{
if (MediaElement.Source is null)
Expand Down Expand Up @@ -161,6 +167,7 @@ public void OnPlaybackStateChanged(int playbackState)
/// This is part of the <see cref="IPlayer.IListener"/> implementation.
/// While this method does not seem to have any references, it's invoked at runtime.
/// </remarks>
[Obsolete]
public void OnPlayerError(PlaybackException? error)
{
var errorMessage = string.Empty;
Expand Down Expand Up @@ -252,6 +259,7 @@ protected virtual partial void PlatformPause()
Player.Pause();
}

[Obsolete]
protected virtual async partial Task PlatformSeek(TimeSpan position, CancellationToken token)
{
if (Player is null)
Expand Down Expand Up @@ -291,6 +299,7 @@ protected virtual partial void PlatformStop()
MediaElement.Position = TimeSpan.Zero;
}

[Obsolete]
protected virtual partial void PlatformUpdateSource()
{
var hasSetSource = false;
Expand Down Expand Up @@ -356,6 +365,7 @@ protected virtual partial void PlatformUpdateSource()
}
}

[Obsolete]
protected virtual partial void PlatformUpdateAspect()
{
if (PlayerView is null)
Expand Down Expand Up @@ -472,6 +482,7 @@ protected virtual partial void PlatformUpdateShouldMute()
Player.Volume = MediaElement.ShouldMute ? 0 : volumeBeforeMute;
}

[Obsolete]
protected virtual partial void PlatformUpdateShouldLoopPlayback()
{
if (Player is null)
Expand All @@ -484,26 +495,49 @@ protected virtual partial void PlatformUpdateShouldLoopPlayback()

#region IPlayer.IListener implementation method stubs

[Obsolete]
public void OnAudioAttributesChanged(AudioAttributes? audioAttributes) { }
public void OnAudioSessionIdChanged(int audioSessionId) { }

[Obsolete]
public void OnAvailableCommandsChanged(IPlayer.Commands? availableCommands) { }

[Obsolete]
public void OnCues(CueGroup? cueGroup) { }

[Obsolete]
public void OnCues(List<Cue> cues) { }

[Obsolete]
public void OnDeviceInfoChanged(Com.Google.Android.Exoplayer2.DeviceInfo? deviceInfo) { }
public void OnDeviceVolumeChanged(int volume, bool muted) { }

[Obsolete]
public void OnEvents(IPlayer? player, IPlayer.Events? events) { }
public void OnIsLoadingChanged(bool isLoading) { }
public void OnIsPlayingChanged(bool isPlaying) { }
public void OnLoadingChanged(bool isLoading) { }
public void OnMaxSeekToPreviousPositionChanged(long maxSeekToPreviousPositionMs) { }

[Obsolete]
public void OnMediaItemTransition(MediaItem? mediaItem, int transition) { }

[Obsolete]
public void OnMediaMetadataChanged(MediaMetadata? mediaMetadata) { }

[Obsolete]
public void OnMetadata(Metadata? metadata) { }
public void OnPlaybackSuppressionReasonChanged(int playbackSuppressionReason) { }

[Obsolete]
public void OnPlayerErrorChanged(PlaybackException? error) { }

[Obsolete]
public void OnPlaylistMetadataChanged(MediaMetadata? mediaMetadata) { }
public void OnPlayWhenReadyChanged(bool playWhenReady, int reason) { }
public void OnPositionDiscontinuity(int reason) { }

[Obsolete]
public void OnPositionDiscontinuity(IPlayer.PositionInfo oldPosition, IPlayer.PositionInfo newPosition, int reason) { }
public void OnRenderedFirstFrame() { }
public void OnRepeatModeChanged(int repeatMode) { }
Expand All @@ -512,9 +546,17 @@ public void OnSeekForwardIncrementChanged(long seekForwardIncrementMs) { }
public void OnShuffleModeEnabledChanged(bool shuffleModeEnabled) { }
public void OnSkipSilenceEnabledChanged(bool skipSilenceEnabled) { }
public void OnSurfaceSizeChanged(int width, int height) { }

[Obsolete]
public void OnTimelineChanged(Timeline? timeline, int reason) { }

[Obsolete]
public void OnTracksChanged(Tracks? tracks) { }

[Obsolete]
public void OnTrackSelectionParametersChanged(TrackSelectionParameters? trackSelectionParameters) { }

[Obsolete]
public void OnVideoSizeChanged(VideoSize? videoSize) { }

#endregion
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public MediaManager(IMauiContext context, IMediaElement mediaElement, IDispatche
/// <summary>
/// The platform-specific media player.
/// </summary>
[Obsolete]
protected PlatformMediaElement? Player { get; set; }
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,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 @@ -35,6 +35,7 @@ public void SetsFocusWhenCompleted()
Assert.True(entry2.IsFocused);
}

[Obsolete]
static Entry CreateEntry(VisualElement? nextElement = null)
{
var entry = new Entry();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ public async Task ShouldExecuteCommandImmediatelyWhenMinimumLengthThresholdHasNo
Assert.True(commandHasBeenExecuted);
}

[Obsolete]
static Entry CreateEntryWithBehavior(int stoppedTypingTimeThreshold = 500,
int minimumLengthThreshold = 0,
bool shouldDismissKeyboardAutomatically = false,
Expand Down

0 comments on commit 8eff768

Please sign in to comment.