/// <summary>
        /// Initializes a new instance of the <see cref="MediaControlServerStartedEventArgs"/> class.
        /// </summary>
        /// <param name="mediaController">A <see cref="MediaController"/> of the server.</param>
        /// <exception cref="ArgumentNullException"><paramref name="mediaController"/> is null.</exception>
        /// <since_tizen> 4 </since_tizen>
        public MediaControlServerStartedEventArgs(MediaController mediaController)
        {
            if (mediaController == null)
            {
                throw new ArgumentNullException(nameof(mediaController));
            }

            Controller = mediaController;
        }
        private MediaController HandleActivation(string serverName)
        {
            if (_activated.ContainsKey(serverName))
            {
                return(null);
            }

            var controller = new MediaController(this, serverName);

            _activated.Add(serverName, controller);

            return(controller);
        }
        private void RaiseServerChangedEvent(MediaControllerNativeServerState state, MediaController controller)
        {
            if (controller == null)
            {
                return;
            }

            if (state == MediaControllerNativeServerState.Activated)
            {
                ServerStarted?.Invoke(this, new MediaControlServerStartedEventArgs(controller));
            }
            else
            {
                controller.RaiseStoppedEvent();
                ServerStopped?.Invoke(this, new MediaControlServerStoppedEventArgs(controller.ServerAppId));
            }
        }