logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityMusicPlayerGateway

    Unity-specific implementation of music player gateway for managing multiple music player services.
    Provides interface adapter layer between application use cases and Unity music player service infrastructure.
    Manages service lookup and routing of music player operations to the appropriate service instances.
    Currently implements pause functionality with placeholder implementations for other music control operations.

    Inheritance
    object
    UnityMusicPlayerGateway
    Implements
    IMusicPlayerGateway
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.MusicPlayer.InterfaceAdapters.Gateways
    Assembly: Serenity.UnityMusicPlayer.InterfaceAdapters.dll
    Syntax
    public class UnityMusicPlayerGateway : IMusicPlayerGateway

    Constructors

    UnityMusicPlayerGateway(Dictionary<string, IMusicPlayerService>)

    Initializes a new instance of UnityMusicPlayerGateway with a collection of music player services.
    Sets up the service dictionary for music player service management and routing.
    Enables multi-service support for different music contexts within the application.

    Declaration
    public UnityMusicPlayerGateway(Dictionary<string, IMusicPlayerService> services)
    Parameters
    Type Name Description
    Dictionary<string, IMusicPlayerService> services

    Dictionary of service IDs mapped to music player service instances.

    Fields

    _services

    Declaration
    protected Dictionary<string, IMusicPlayerService> _services
    Field Value
    Type Description
    Dictionary<string, IMusicPlayerService>

    Dictionary mapping service IDs to their corresponding music player service instances.

    Methods

    PauseSong(MusicPlayerPauseSongInput)

    Pauses the currently playing song on the specified music player service.
    Routes the pause command to the appropriate music player service based on the service ID.
    Provides application-level pause functionality through the gateway interface.

    Declaration
    public void PauseSong(MusicPlayerPauseSongInput input)
    Parameters
    Type Name Description
    MusicPlayerPauseSongInput input

    Input DTO containing the service ID for the music player to pause.

    PlayNextSong(MusicPlayerPlayNextSongInput)

    Advances to the next song in the playlist on the specified music player service.
    This method is currently not implemented and throws a NotImplementedException.

    Declaration
    public void PlayNextSong(MusicPlayerPlayNextSongInput input)
    Parameters
    Type Name Description
    MusicPlayerPlayNextSongInput input

    Input DTO containing the service ID for the music player.

    Exceptions
    Type Condition
    NotImplementedException

    This method is not yet implemented.

    PlayPreviousSong(MusicPlayerPlayPreviousSongInput)

    Goes back to the previous song in the playlist on the specified music player service.
    This method is currently not implemented and throws a NotImplementedException.

    Declaration
    public void PlayPreviousSong(MusicPlayerPlayPreviousSongInput input)
    Parameters
    Type Name Description
    MusicPlayerPlayPreviousSongInput input

    Input DTO containing the service ID for the music player.

    Exceptions
    Type Condition
    NotImplementedException

    This method is not yet implemented.

    PlaySong(MusicPlayerPlaySongInput)

    Starts playing a song on the specified music player service.
    This method is currently not implemented and throws a NotImplementedException.

    Declaration
    public void PlaySong(MusicPlayerPlaySongInput input)
    Parameters
    Type Name Description
    MusicPlayerPlaySongInput input

    Input DTO containing the service ID and song information for playback.

    Exceptions
    Type Condition
    NotImplementedException

    This method is not yet implemented.

    ResumeSong(MusicPlayerResumeSongInput)

    Resumes playback of a previously paused song on the specified music player service.
    This method is currently not implemented and throws a NotImplementedException.

    Declaration
    public void ResumeSong(MusicPlayerResumeSongInput input)
    Parameters
    Type Name Description
    MusicPlayerResumeSongInput input

    Input DTO containing the service ID for the music player to resume.

    Exceptions
    Type Condition
    NotImplementedException

    This method is not yet implemented.

    StopSong(MusicPlayerStopSongInput)

    Stops the currently playing song on the specified music player service.
    This method is currently not implemented and throws a NotImplementedException.

    Declaration
    public void StopSong(MusicPlayerStopSongInput input)
    Parameters
    Type Name Description
    MusicPlayerStopSongInput input

    Input DTO containing the service ID for the music player to stop.

    Exceptions
    Type Condition
    NotImplementedException

    This method is not yet implemented.

    Implements

    IMusicPlayerGateway
    In this article
    © 2026 Serenity. All Rights Reserved