예제 #1
0
        static void Main(string[] args)
        {
            // create service collection
            var serviceCollection = new ServiceCollection();

            ConfigureServices(serviceCollection);

            // create service provider
            var serviceProvider = serviceCollection.BuildServiceProvider();

            var createCommand = new CreateStationCommand();

            createCommand.Code = "2dayfm";
            createCommand.Name = "2DayFM - Sydney Hit Radio";

            // run app
            var stationCommandPublisher = serviceProvider.GetService <StationCommandPublisher>();

            stationCommandPublisher.Execute(createCommand);

            var editCommand = new EditStationCommand();

            editCommand.Uid  = Guid.NewGuid();
            editCommand.Code = "fox";
            editCommand.Name = "Fox - Melbourne Hit Radio";

            stationCommandPublisher.Execute(editCommand);

            System.Console.ReadKey();
        }
예제 #2
0
 public void Create(CreateStationCommand command)
 {
     // Do Something
 }