void IExtensionApplication.Initialize() { ContainerRegistrar.SetupContainer(); this.logger = ContainerRegistrar.Container.Resolve <IWebTracker>(); AppDomain.CurrentDomain.FirstChanceException += CurrentDomainOnFirstChanceException; Application.DocumentManager.MdiActiveDocument.CommandWillStart += logger.TrackCommandUsage; var uiGenerator = ContainerRegistrar.Container.Resolve <IUiGenerator>(); try { uiGenerator.GenerateUi(false); } catch (Exception exception) { logger.TrackException(exception); } ContainerRegistrar.Container.Release(uiGenerator); IKojtoCadUpdater updater; try { updater = ContainerRegistrar.Container.Resolve <IKojtoCadUpdater>(); updater.UpdateKojtoCad(); } catch (Exception exception) { this.logger.TrackException(exception); } }
private static void Main(string[] args) { ContainerRegistrar.SetupContainer(); GetUserSettings(); var programComponent = ContainerRegistrar.Container.Resolve <IProgramServiceConfigDependent>(); programComponent.ConfigDependentAction(); programComponent = ContainerRegistrar.Container.Resolve <IProgramServiceConfigDependent>(); programComponent.ConfigDependentAction(); Console.ReadLine(); }