/// <summary> /// Initialises a new instance of the <see cref="TvShows" /> class. /// </summary> public TvShows() { InitializeComponent(); tvShowRepository = CompositionRoot.Get <ITvShowRepository>(); fileResultManager = CompositionRoot.Get <IFileResultManager>(); }
/// <summary> /// The main. /// </summary> /// <param name="args">The args.</param> public static void Main(string[] args) { var command1 = new SampleCommand { FirstName = "Brian", LastName = "Korzynski" }; var command2 = new SampleCommand2 { Username = "******", Password = "******" }; //var handler = new SampleCommandHandler(); //handler.Handle(command); var commandBus = CompositionRoot.Get <ICommandBus>(); commandBus.Send(command1); commandBus.Send(command2); Console.ReadKey(); //ConcurrentDictionary //Retry Logic //Logging //CommandTranslation (take one command and process it then create another command to pass to another command) //Validation: ICommandValidator (mine wording), ValidationFailure //Different assemblies //Queries //Queue: persist messages to queue }
/// <summary> /// Initialises a new instance of the <see cref="SortEpisodes" /> class. /// </summary> public SortEpisodes() { InitializeComponent(); setEpisodeButton.Enabled = false; setShowButton.Enabled = false; fileResultManager = CompositionRoot.Get <IFileResultManager>(); }
/// <summary> /// Handles the tab loading. /// </summary> /// <param name="sender"> /// The sender of the event. /// </param> /// <param name="e"> /// The arguments of the event. /// </param> private void SortEpisodesLoad(object sender, EventArgs e) { if (!DesignMode) { controller = CompositionRoot.Get <SortEpisodesController>(); controller.PropertyChanged += ControllerOnPropertyChanged; controller.Initialise(this); } }
public static async Task Main(string[] args) { CompositionRoot root = new CompositionRoot(); root.Start(); ICompanyNewsSearcher companyNewsSearcher = root.Get(); IList <string> companyNewsDownloads = await companyNewsSearcher.Filter(); }
static void Main(string[] args) { var mediator = CompositionRoot.Get <IMediator>(); var getCustomerQuery = new GetCustomerById.Query { Id = Guid.Parse("E4931718-A149-4C17-8545-5D36D81A6DD5") }; var customer = mediator.Send(getCustomerQuery).Result; }
/// <summary> /// Handles the TV Shows tab loading. /// </summary> /// <param name="sender"> /// The sender of the event. /// </param> /// <param name="e"> /// The arguments of the event. /// </param> private void TvShowsLoad(object sender, EventArgs e) { if (!DesignMode) { controller = CompositionRoot.Get <TvShowsController>(); controller.PropertyChanged += PropertyChanged; controller.ShowChanged += ShowChanged; controller.SearchShowsComplete += SearchShowsComplete; controller.Initialise(this); } }
/// <summary> /// The missing duplicate episodes load. /// </summary> /// <param name="sender"> /// The sender of the event. /// </param> /// <param name="e"> /// The arguments of the event. /// </param> private void MissingDuplicateEpisodesLoad(object sender, EventArgs e) { if (!DesignMode) { controller = CompositionRoot.Get <MissingDuplicateController>(); controller.PropertyChanged += OnPropertyChanged; controller.Initialise(this); hideLocked.Checked = controller.Settings.HideLocked; hidePart2.Checked = controller.Settings.HidePart2; hideSeason0.Checked = controller.Settings.HideSeason0; hideUnaired.Checked = controller.Settings.HideNotYetAired; hideWholeSeasons.Checked = controller.Settings.HideMissingSeasons; } }
static void Main(string[] args) { var commandBus = CompositionRoot.Get <ICommandBus>(); var customerRepository = CompositionRoot.Get <ICustomerRepository>(); var customer = customerRepository.GetById(1); Console.WriteLine(customer.ToJson()); commandBus.Send(new InactivateCustomerCommand(customer)); var updatedCustomer = customerRepository.GetById(1); Console.WriteLine(updatedCustomer.ToJson()); Console.ReadKey(); }
public void Setup() { var container = CompositionRoot.Get(); _watcher = container.Resolve <IWatcher>(); }
public void Setup() { Mediator = CompositionRoot.Get <IMediator>(); }
/// <summary> /// Initialises a new instance of the <see cref="Log" /> class. /// </summary> public Log() { InitializeComponent(); controller = CompositionRoot.Get <LogController>(); }
static Program() { CommandBus = CompositionRoot.Get <ICommandBus>(); }
public void Setup() { QueryRepository = CompositionRoot.Get <ICustomerQueryRepository>(); Mediator = CompositionRoot.Get <IMediator>(); }
/// <summary> /// Initialises a new instance of the <see cref="Settings" /> class. /// </summary> public Settings() { InitializeComponent(); fileResultManager = CompositionRoot.Get <FileResultManager>(); }