using System; using Common.Logging; using NServiceBus; using Messages; using System.Collections.Generic; using System.ComponentModel; using Org.TechA.Wpf.Controls; using NServiceBus.Unicast.Transport.Msmq.Config; using NServiceBus.Unicast.Transport.Msmq; using NServiceBus.ObjectBuilder; //register the extensions for configuration //so IronPython can see the extension methods [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureSpringBuilder))] [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureMsmqSubscriptionStorage))] [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureXmlSerializer))] [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureMsmqTransport))] [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureUnicastBus))] [assembly: Microsoft.Scripting.Runtime.ExtensionType( typeof(Configure), typeof(ConfigureUnicastBus))] namespace Server { class Program { static IBus bus = null; [STAThread] static void Main() { LogManager.GetLogger("hello").Debug("Started."); //BY DEFAULT SETUP FOR THE BUS TO BE //CONFIGURED INTERACTIVELY USING THE //IRONPYTHON APPLICATION SHELL. //UNCOMMENT THE FOUR LINES BELOW //IF YOU JUST WANT TO SEND MESSAGES //FROM THE IRONPYTHON SHELL. //bus = NServiceBus.Configure.With() // .SpringBuilder() // .MsmqSubscriptionStorage() // .XmlSerializer() // .MsmqTransport() // .IsTransactional(true) // .PurgeOnStartup(false) // .UnicastBus() // .ImpersonateSender(false) // .CreateBus() // .Start(); var ir_window = new ConsoleWindow(); //var vars = new Dictionary(); //vars.Add("bus", bus); //ir_window.ctlIronPythonConsole.OnVariablesAdded(vars); ir_window.Title = "NServiceBus IronPython Publisher"; ir_window.ShowDialog(); } } }