Exemple #1
0
        // kind of the "Application's (App's) UI domain MODEL language" defined in Ui.cs
        // All AddStuffToInboxController knows is that it gets handed a View
        // that it controls (AddStuffToInboxForm) and then it has two other injections points,
        // a Bus and a MainQueue. In this case its ISubscriber event source to tell the
        // "uiBus" to call its Hanlde method for specific events it cares about,
        // and its IMessageQueue, the target it notifies when its stuff/events happen, is "mainQueue".
        #endregion
        public static void Wire(IAddActionToProjectWizard form, ISubscriber source, IMessageQueue target)
        {
            // when setup code calls this static Wire method
            // we create a new instance of this controller
            var controller = new AddActionToProjectController(form, target);

            // and tell the uiBus to register this new controller instance
            // as something that should be called when Ui.CaptureThoughtClicked events happen.
            // "Hey, I implement IHandle<Ui.CaptureThoughtClicked>, so have something call me when it
            // happens so that I can react to it with the code inside of my Handle method below."
            source.Subscribe <UI.AddActionClicked>(controller);
        }
Exemple #2
0
 AddActionToProjectController(IAddActionToProjectWizard form, IMessageQueue queue)
 {
     _form  = form;
     _queue = queue;
 }