コード例 #1
0
        public void Init()
        {
            var config = TestConfigurationInternal.GetConfig();

            object[] args =
            {
                new HttpClient(),
                config.AccessToken,
                new Deserializer <response>(),
                5,
                15
            };

            _httpDataRestful = LogProxyFactory.Create <HttpDataRestful>(args);

            object[] args2 =
            {
                "https://api.betradar.com/v1/replay",
                _httpDataRestful,
                0
            };
            _replayManager = LogProxyFactory.Create <ReplayManager>(args2);
        }
コード例 #2
0
        public override StartCommandResult OnStartCommand(Intent intent, [GeneratedEnum] StartCommandFlags flags, int startId)
        {
            ServiceCallAction action = (ServiceCallAction)intent.Extras.GetInt(ACTION_KEY);

            switch (action)
            {
            case ServiceCallAction.PlayPause:
                if (!player.IsPlaying)
                {
                    player.Start();
                }
                else
                {
                    player.Pause();
                }
                BroadcastPlayPause();
                SetNotificationBar();
                break;

            case ServiceCallAction.Previous:
                PlayPrevious();
                break;

            case ServiceCallAction.Next:
                PlayNext();
                break;

            case ServiceCallAction.LoopBackChange:
                manager = manager.Next();
                BroadcastLoopbackChange();
                SetNotificationBar();
                break;

            case ServiceCallAction.PlayParam:
                song = intent.Extras.GetInt(PARAMS);
                SaveSong();
                Play();
                BroadcastSongUpdate();
                break;

            case ServiceCallAction.LoopBackChangeParam:
                ChangeLoopback(intent.Extras.GetString(PARAMS));
                break;

            case ServiceCallAction.Stop:
                player.Stop();
                player.Reset();
                break;

            case ServiceCallAction.PlaylistUpdate:
                HandlePlaylist(intent.Extras.GetString(PARAMS));
                break;

            case ServiceCallAction.RequestLoopbackIcon:
                BroadcastLoopbackChange();
                break;

            case ServiceCallAction.RequestSeekPosition:
                BroadcastSeekToPosition();
                break;

            case ServiceCallAction.SeekTo:
                player.SeekTo(intent.Extras.GetInt(PARAMS));
                break;

            case ServiceCallAction.RequestCurrentSong:
                BroadcastSongUpdate();
                break;
            }
            return(StartCommandResult.Sticky);
        }
コード例 #3
0
 public TestCatchUpObserver(ICheckpointManager checkpointManager, IReplayManager replayManager,
     GetGlobalCheckpoint getGlobalCheckpoint)
     : base(checkpointManager, replayManager, getGlobalCheckpoint)
 { }