private static void RegisterSubtitleModeCommandReceivedEvent()
        {
            _subtitleModeCommandCallback = (clientName, requestId, isEnabled, _) =>
            {
                var command = new SubtitleModeCommand(isEnabled);
                command.SetResponseInformation(clientName, requestId);

                SubtitleModeCommandReceived?.Invoke(null, new SubtitleModeCommandReceivedEventArgs(command));
            };
            Native.SetSubtitleModeCommandReceivedCb(Handle, _subtitleModeCommandCallback).
            ThrowIfError("Failed to init SubtitleModeCommandReceived event.");
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SubtitleModeCommandReceivedEventArgs"/> class.
 /// </summary>
 /// <param name="command">The subtitle command.</param>
 /// <exception cref="ArgumentNullException"><paramref name="command"/> is null.</exception>
 /// <since_tizen> 6 </since_tizen>
 internal SubtitleModeCommandReceivedEventArgs(SubtitleModeCommand command)
 {
     Command = command ?? throw new ArgumentNullException(nameof(command));
 }