Пример #1
0
        private static void RegisterShuffleModeCommandReceivedEvent()
        {
            _shuffleModeCommandCallback = (clientName, requestId, mode, _) =>
            {
                var command = new ShuffleModeCommand(mode == MediaControllerNativeShuffleMode.On ? true : false);
                command.SetResponseInformation(clientName, requestId);

                ShuffleModeCommandReceived?.Invoke(null, new ShuffleModeCommandReceivedEventArgs(command));
            };
            Native.SetShuffleModeCommandReceivedCb(Handle, _shuffleModeCommandCallback).
            ThrowIfError("Failed to init ShuffleModeCommandReceived event.");
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ShuffleModeCommandReceivedEventArgs"/> class.
 /// </summary>
 /// <param name="command">The playback position command.</param>
 /// <exception cref="ArgumentNullException"><paramref name="command"/> is null.</exception>
 /// <since_tizen> 5 </since_tizen>
 public ShuffleModeCommandReceivedEventArgs(ShuffleModeCommand command)
 {
     Command = command ?? throw new ArgumentNullException(nameof(command));
 }