public void Init( IBrain brain, IVideoProvider videoProvider, IVideoRecorder videoRecorder, IAudioRecorder audioRecorder, IAudioPlayer audioPlayer, IAudioRepository audioRepository) { this.brain = brain; this.videoProvider = videoProvider; this.videoRecorder = videoRecorder; this.audioRecorder = audioRecorder; var frameObserver = new FrameObserver(brain); var frameRecognizedObserver = new FrameRecognizedObserver(audioPlayer, audioRepository); recognizeAvailableFrameSubscription = videoProvider.FrameAvailable.Subscribe(frameObserver); this.lifetimeStreams = new CompositeDisposable { brain.FrameRecognized.Subscribe(frameRecognizedObserver), videoRecorder.RecordingAvailable.Subscribe(new VideoPublisher(brain)), audioRecorder.RecordingAvailable.Subscribe(new AudioPublisher(audioRepository)) }; }
public UnitOfWork(ApplicationContext applicationContext, IAudioRepository audioRepository) { _applicationContext = applicationContext; AudioRepository = audioRepository; Transaction = applicationContext.Database.BeginTransaction(); }
private Audio GenerateAudioEntity(AudioAnalysis audioAnalysis, string guid, IAudioRepository DbContext) { var audio = DbContext.Find(guid); audio.Key = audioAnalysis.Key; audio.Bpm = audioAnalysis.Tempo; audio.ChordUnits = audioAnalysis.Chords.Select(c => new ChordUnit { Time = c.Key, Chord = c.Value }).OrderBy(c => c.Time).ToList(); return(audio); }
public UnitOfWork(IAudioRepository audios, IUserRepository users, IEntityRepository <FavoriteAudio> favoriteAudios, IEntityRepository <FollowedUser> followedUsers, ApplicationDbContext dbContext) { _dbContext = dbContext; FavoriteAudios = favoriteAudios; FollowedUsers = followedUsers; Audios = audios; Users = users; }
public AudioService( IAudioRepository audioRepository, AudioAnalyzer audioAnalyzer, FileStorage fileStorage, IServiceProvider provider, IBackgroundTaskQueue queue, IClaimAccessor currentUser) { this.audioRepository = audioRepository; this.audioAnalyzer = audioAnalyzer; this.fileStorage = fileStorage; this.queue = queue; this.provider = provider; this.currentUser = currentUser; }
public PhotosController(IPhotoService photoService, IPhotoRepository photoRepository, IAudioRepository audioRepository) { _photoService = photoService; _photoRepository = photoRepository; _audioRepository = audioRepository; }
public AudioHelper(IAudioRepository audioRepository, IConfiguration configuration) { _audioRepository = audioRepository; _configuration = configuration; }
public AudiosController(IAudioRepository audioRepository) { _audioRepository = audioRepository; }
public AudioService(ITrackRepository trackRepository, IAudioRepository audioRepository, IUnitOfWork unitOfWork) { this._trackRepository = trackRepository; this._audioRepository = audioRepository; this._unitOfWork = unitOfWork; }
public AudioService(ILogger <AudioService> logger, IAudioRepository audioRepository, IAudioFileService audioFileService) { _audioRepository = audioRepository; _audioFileService = audioFileService; _logger = logger; }
public AudiosController(IAudioRepository audioRepository, IStationRepository stationRepository, IFileProvider fileProvider) { _audioRepository = audioRepository; _stationRepository = stationRepository; _fileProvider = fileProvider; }
public FrameRecognizedObserver(IAudioPlayer audioPlayer, IAudioRepository audioRepository) { this.audioPlayer = audioPlayer; this.audioRepository = audioRepository; }
public AudioPublisher(IAudioRepository audioRepository) { this.audioRepository = audioRepository; }
public FileController(IFileProvider fileProvider, IAudioRepository AudioRepository, IStationRepository StationRepository) { _fileProvider = fileProvider; _AudioRepository = AudioRepository; _StationRepository = StationRepository; }