private static void RegisterPlaylistCommandReceivedEvent() { _playlistCommandCallback = (clientName, requestId, playlistName, index, playbackCommand, playbackPosition, _) => { var command = new PlaylistCommand(playbackCommand.ToPublic(), playlistName, index, playbackPosition); command.SetResponseInformation(clientName, requestId); PlaylistCommandReceived?.Invoke(null, new PlaylistCommandReceivedEventArgs(command)); }; Native.SetPlaylistCommandReceivedCb(Handle, _playlistCommandCallback). ThrowIfError("Failed to init PlaylistCommandReceived event."); }
/// <summary> /// Initializes a new instance of the <see cref="PlaylistCommandReceivedEventArgs"/> 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 PlaylistCommandReceivedEventArgs(PlaylistCommand command) { Command = command ?? throw new ArgumentNullException(nameof(command)); }