private static void RegisterPlayListCommandProcessorsInTo(CommandQueuePort commandQueue, PlayListCommandProcessor playListCommandProcessor)
 {
     commandQueue.SetQueueSingleConsumer <CreatePLayList>(playListCommandProcessor.Process);
     commandQueue.SetQueueSingleConsumer <RenamePlaylist>(playListCommandProcessor.Process);
     commandQueue.SetQueueSingleConsumer <ChangePlayListImageUrl>(playListCommandProcessor.Process);
     commandQueue.SetQueueSingleConsumer <ArchivePlayList>(playListCommandProcessor.Process);
 }
 public static void Configure(IServiceCollection services, CommandQueuePort commandQueue)
 {
     RegisterPlayListCommandProcessorsInToDependencyInjector(services, commandQueue);
     RegisterTrackCommandProcessorsInToDependencyInjector(services, commandQueue);
 }
 private static void RegisterTrackCommandProcessorsInTo(CommandQueuePort commandQueue, TrackCommandProcessor trackCommandProcessor)
 {
     commandQueue.SetQueueSingleConsumer <AddTrackToPLayList>(trackCommandProcessor.Process);
     commandQueue.SetQueueSingleConsumer <RemoveTrackFromPlayList>(trackCommandProcessor.Process);
 }
        private static void RegisterTrackCommandProcessorsInToDependencyInjector(IServiceCollection services, CommandQueuePort commandQueue)
        {
            services.AddSingleton <TrackCommandProcessor>();
            var trackCommandProcessor = services.BuildServiceProvider().GetService <TrackCommandProcessor>();

            RegisterTrackCommandProcessorsInTo(commandQueue, trackCommandProcessor);
        }
示例#5
0
 public PlaylistsController(CommandQueuePort commandQueue, PlayListQueryCreator playListQueryCreator)
 {
     this.commandQueue         = commandQueue;
     this.playListQueryCreator = playListQueryCreator;
 }
示例#6
0
 public TracksController(CommandQueuePort commandQueue, TracksQueryCreator tracksQueryCreator)
 {
     this.commandQueue       = commandQueue;
     this.tracksQueryCreator = tracksQueryCreator;
 }