コード例 #1
0
 public PlayController(
     ILaberBot bot,
     WebServiceOptions options,
     IAudioPlayer player,
     ISoundRepository soundRepository)
 {
     _bot             = bot;
     _options         = options;
     _player          = player;
     _soundRepository = soundRepository;
 }
コード例 #2
0
        public PlayRandomCommand(
            IAudioPlayer player,
            ISoundRepository soundRepository)
            : base("playrnd", "Play a random sound")
        {
            _player          = player;
            _soundRepository = soundRepository;
            _random          = new Random();

            Parameter = new[] { Tuple.Create(ARG_GROUP, ParameterType.Optional) };
        }
コード例 #3
0
 public PlayCommand(
     IAudioPlayer player,
     ISoundRepository soundRepository)
     : base("play", "Play a sound")
 {
     _player          = player;
     _soundRepository = soundRepository;
     Parameter        = new[]
     {
         Tuple.Create(ARG_FILE, ParameterType.Required),
         Tuple.Create(ARG_USER, ParameterType.Optional)
     };
 }
コード例 #4
0
        public ControllerPlugin(
            ControllerOptions options,
            IController controller,
            IAudioPlayer player,
            ISoundRepository soundRepository)
        {
            _options         = options;
            _controller      = controller;
            _player          = player;
            _soundRepository = soundRepository;

            controller.KeyPressed += OnKeyPressed;
        }
コード例 #5
0
 public CacheTestController(ISoundRepository sr,
                            IRawSoundRepository rsr,
                            ITextRepository tr,
                            IRawTextRepository rtr,
                            IImageRepository ir,
                            IRawImageRepository rir,
                            IVideoRepository vr)
 {
     _sr  = sr;
     _rsr = rsr;
     _tr  = tr;
     _rtr = rtr;
     _ir  = ir;
     _rir = rir;
     _vr  = vr;
 }
コード例 #6
0
ファイル: UploadCommand.cs プロジェクト: FlorianRoth/LaberBot
 public UploadCommand(ISoundRepository soundRepository)
     : base("upload", "Upload a sound file")
 {
     _soundRepository = soundRepository;
 }
コード例 #7
0
 public ListCommand(ISoundRepository soundRepository)
     : base("list", "List available sounds")
 {
     _soundRepository = soundRepository;
 }
コード例 #8
0
 public EFSoundService(IRawSoundRepository rsr, ISoundRepository sr)
 {
     _rsr = rsr;
     _sr  = sr;
 }
コード例 #9
0
 public SoundService(ISoundRepository soundRepository)
 {
     _soundRepository = soundRepository;
 }
コード例 #10
0
 public SoundService(ISoundRepository soundRepository)
 {
     _soundRepository = soundRepository ?? throw new ArgumentNullException(nameof(soundRepository));
     _outputDevice    = new WaveOutEvent();
     _outputDevice.PlaybackStopped += _outputDevice_PlaybackStopped;
 }
コード例 #11
0
 public SoundUseCase(ISoundRepository soundRepository)
 {
     _soundRepository = soundRepository;
 }
コード例 #12
0
 public SoundUseCase()
 {
     _soundRepository = new SoundRepository();
 }