当前位置: 首页>>代码示例>>C#>>正文


C# ILoader.load方法代码示例

本文整理汇总了C#中ILoader.load方法的典型用法代码示例。如果您正苦于以下问题:C# ILoader.load方法的具体用法?C# ILoader.load怎么用?C# ILoader.load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ILoader的用法示例。


在下文中一共展示了ILoader.load方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: init

        /// <summary>
        /// Initialize library
        /// </summary>
        /// <param name="loader"></param>
        /// <param name="dte2"></param>
        /// <param name="addIn"></param>
        private void init(ILoader loader, DTE2 dte2, AddIn addIn)
        {
            try
            {
                library = loader.load(dte2, addIn.SatelliteDllPath, dte2.RegistryRoot);
                log.info("Library: loaded from '{0}' :: v{1} [{2}] API: v{3} /'{4}':{5}",
                                                    library.Dllpath,
                                                    library.Version.Number.ToString(),
                                                    library.Version.BranchSha1,
                                                    library.Version.Bridge.Number.ToString(2),
                                                    library.Version.BranchName,
                                                    library.Version.BranchRevCount);

                coreCommand = new CoreCommand(library);
                coreCommand.attachCoreCommandListener();

                updateBuildType(Environment.GetCommandLineArgs());
                adviseEvents();
                return;
            }
            catch(DllNotFoundException ex)
            {
                log.info(ex.Message);
                log.info(new String('.', 80));
                log.info("How about:");

                log.info("");
                log.info("* Install vsSolutionBuildEvent as plugin for your Visual Studio v{0}", dte2.Version);
                log.info("* Or manually place the 'vsSolutionBuildEvent.dll' with dependencies into AddIn folder: '{0}\\'", Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
                log.info("");

                log.info("See documentation for more details:");
                log.info("- http://vssbe.r-eg.net");
                log.info("- http://visualstudiogallery.msdn.microsoft.com/0d1dbfd7-ed8a-40af-ae39-281bfeca2334/");
                log.info("");

                log.info("Minimum requirements: vsSolutionBuildEvent.dll v{0}", loader.MinVersion.ToString());
                log.info(new String('.', 80));
            }
            catch(ReflectionTypeLoadException ex)
            {
                log.info(ex.ToString());
                log.info(new String('.', 80));

                foreach(FileNotFoundException le in ex.LoaderExceptions) {
                    log.info("{2} {0}{3} {0}{0}{4} {0}{1}",
                                        Environment.NewLine,
                                        new String('~', 80),
                                        le.FileName,
                                        le.Message,
                                        le.FusionLog);
                }
            }
            catch(Exception ex) {
                log.info("Error with advising '{0}'", ex.ToString());
            }

            termination(true);
        }
开发者ID:hilbertdu,项目名称:vsSolutionBuildEvent,代码行数:65,代码来源:Connect.cs


注:本文中的ILoader.load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。