public App() { InitializeComponent(); var bootstrapper = new SimpleInjectorBootstrapper(); bootstrapper.Run(this); }
static void Main(string[] args) { Console.WriteLine("Configuring bootstrapper..."); var bootstrapper = new SimpleInjectorBootstrapper(); Console.WriteLine("Setting up subscriptions..."); var subscription = TelegramMiddleware.Use(Bot, bootstrapper); Console.WriteLine("Subscription created!"); Console.WriteLine("Getting username..."); var me = Bot.GetMeAsync().Result; Console.Title = me.Username; Bot.StartReceiving(); Console.WriteLine("Bot receiving!"); Console.WriteLine("Press any key to exit"); Console.ReadLine(); Bot.StopReceiving(); subscription.Dispose(); }
private static void InitializeContainer(Container container) { SimpleInjectorBootstrapper.Register(container); }
public void PreApplicationStart() { var bootstrapper = new SimpleInjectorBootstrapper(SitecoreApplication.ApplicationAssemblies); bootstrapper.Bootstrap(); }
protected void Application_Start() { SimpleInjectorBootstrapper.Initalize(); GlobalConfiguration.Configure(WebApiConfig.Register); }