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


C# IProject.GetBinaryFolder方法代码示例

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


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

示例1: BuildProxy

        public virtual TestRunnerProxy BuildProxy(IProject project)
        {
            var setup = new AppDomainSetup{
                ApplicationName = "StoryTeller-Testing-" + Guid.NewGuid(),
                ConfigurationFile = project.ConfigurationFileName,
                ShadowCopyFiles = "true",
                ApplicationBase = project.GetBinaryFolder()
            };

            _domain = AppDomain.CreateDomain("StoryTeller-Testing", null, setup);

            Type proxyType = typeof (TestRunnerProxy);
            var proxy =
                (TestRunnerProxy)
                _domain.CreateInstanceAndUnwrap(proxyType.Assembly.FullName, proxyType.FullName);

            if (_useTeamCityListener) proxy.UseTeamCityListener();

            return proxy;
        }
开发者ID:adymitruk,项目名称:storyteller,代码行数:20,代码来源:TestRunnerDomain.cs

示例2: Start

        public void Start(IProject project)
        {
            lock (_locker)
            {
                Teardown();

                try
                {
                    _publisher.Publish<BinaryRecycleStarted>();
                    _proxy = BuildProxy(project);
                    _library = _proxy.BuildFixtureLibrary();
                    _publisher.Publish(new BinaryRecycleFinished(_library));
                }
                catch (FileNotFoundException ex)
                {
                    if (ex.Message.Contains(GetType().Assembly.GetName().Name))
                    {
                        string message = "Could not find the StoryTeller.dll assembly in the target AppDomain.";
                        message +=
                            "\nYou will not be able to execute tests until the StoryTeller.dll file is copied to " +
                            project.GetBinaryFolder();

                        _publisher.Publish(new BinaryRecycleFailure
                        {
                            ErrorMessage = message
                        });
                    }

                    Teardown();
                }
                catch (Exception ex)
                {
                    Teardown();
                    _publisher.Publish(new BinaryRecycleFailure
                    {
                        ErrorMessage = ex.ToString()
                    });
                }

            }
        }
开发者ID:wbinford,项目名称:storyteller,代码行数:41,代码来源:TestRunnerDomain.cs

示例3: LoadProject

        public void LoadProject(IProject project)
        {
            lock (_locker)
            {
                Teardown();

                try
                {
                    _publisher.Publish<BinaryRecycleStarted>();
                    _proxy = BuildProxy(project);

                    _library = _proxy.StartSystem(new FixtureAssembly(project), (MarshalByRefObject)_publisher);
                    _publisher.Publish(new BinaryRecycleFinished(_library));

                    _proxy.ImportEnvironment(StoryTellerEnvironment.Variables());
                }
                catch (FileNotFoundException ex)
                {
                    if (ex.Message.Contains(GetType().Assembly.GetName().Name))
                    {
                        string message = "Could not find the StoryTeller.dll assembly in the target AppDomain.";
                        message +=
                            "\nYou will not be able to execute tests until the StoryTeller.dll file is copied to " +
                            project.GetBinaryFolder();

                        _publisher.Publish(new BinaryRecycleFailure
                        {
                            ErrorMessage = message
                        });
                    }
                    else
                    {
                        _publisher.Publish(new BinaryRecycleFailure
                        {
                            ErrorMessage = ex.ToString()
                        });
                    }

                    Teardown();
                }
                catch (Exception ex)
                {
                    Console.WriteLine(ex);
                    Teardown();
                    _publisher.Publish(new BinaryRecycleFailure
                    {
                        ErrorMessage = ex.ToString()
                    });
                }
            }
        }
开发者ID:KevM,项目名称:StoryTeller2,代码行数:51,代码来源:TestRunnerDomain.cs


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