Ejemplo n.º 1
0
        /// <summary>
        /// Gets the current display rotation.
        /// </summary>
        /// <returns>The <see cref="Rotation"/>.</returns>
        /// <exception cref="InvalidOperationException">
        ///     The server has already been stopped.<br/>
        ///     -or-<br/>
        ///     An internal error occurs.
        /// </exception>
        /// <exception cref="ObjectDisposedException">
        /// The <see cref="MediaControllerManager"/> has already been disposed.
        /// </exception>
        /// <since_tizen> 6 </since_tizen>
        public Rotation GetDisplayRotation()
        {
            ThrowIfStopped();

            Native.GetDisplayRotation(Manager.Handle, ServerAppId, out var rotation).
            ThrowIfError("Failed to get display rotation state.");

            return(rotation.ToPublic());
        }