コード例 #1
0
        internal static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            Application.ThreadException += (sender, e) => Fail(e.Exception);

            try
            {
                var evl = new API.EventLevel();
                evl.load(GetSln(args), new Dictionary <string, string>());

                var pUnkReserved = new object();
                evl.solutionOpened(pUnkReserved, 0);
                {
                    Application.Run(new EventsFrm(Bootloader.Init(evl.Environment)));
                }
                evl.solutionClosed(pUnkReserved);
            }
            catch (Exception ex)
            {
                Fail(ex);
            }
        }
コード例 #2
0
        /// <summary>
        /// Initialize level
        /// </summary>
        protected void init()
        {
#if VSSDK_15_AND_NEW
            Log.Info($"SDK15 & {vsSBE.Version.S_INFO}");
#else
            Log.Info($"SDK10 & {vsSBE.Version.S_INFO}");
#endif

#if DEBUG
            Log.Warn($"Debug version");
#endif
            Log.Info($"Solution: {Environment.SolutionFile}");

            loader = Bootloader.Init(Environment);

            if (Environment.Events != null)
            {
                slnEvents = Environment.Events.SolutionEvents;
            }

            Environment.CoreCmdSender = this;
            attachCommandEvents();

            Log._.Received -= onLogReceived;
            Log._.Received += onLogReceived;

            //TODO: extract all below into new methods. It's valuable for CoreCommand etc.
            //+ do not forget about ClientLibrary, Provider, etc.

            Action = new Actions.Binder
                     (
                new Actions.Command
                (
                    Environment,
                    loader.Soba,
                    loader.Soba.EvMSBuild
                ),
                loader.Soba,
                buildState
                     );
        }
コード例 #3
0
        /// <summary>
        /// Initialize level
        /// </summary>
        protected void init()
        {
#if DEBUG
            Log.Warn("Used [Debug version]");
#else
            //if(vsSBE.Version.branchName.ToLower() != "releases") {
            //    Log.Warn("Used [Unofficial release]");
            //}
#endif

            loader = Bootloader.Init(Environment);

            if (Environment.Events != null)
            {
                slnEvents = Environment.Events.SolutionEvents;
            }

            Environment.CoreCmdSender = this;
            attachCommandEvents();

            Log._.Received -= onLogReceived;
            Log._.Received += onLogReceived;

            //TODO: extract all below into new methods. It's valuable for CoreCommand etc.
            //+ do not forget about ClientLibrary, Provider, etc.

            Action = new Actions.Binder
                     (
                new Actions.Command
                (
                    Environment,
                    loader.Soba,
                    loader.Soba.EvMSBuild
                ),
                loader.Soba
                     );
        }