本文整理汇总了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;
}
示例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()
});
}
}
}
示例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()
});
}
}
}