本文整理汇总了C#中IVsSolution.GetSolutionInfo方法的典型用法代码示例。如果您正苦于以下问题:C# IVsSolution.GetSolutionInfo方法的具体用法?C# IVsSolution.GetSolutionInfo怎么用?C# IVsSolution.GetSolutionInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IVsSolution
的用法示例。
在下文中一共展示了IVsSolution.GetSolutionInfo方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SolutionService
public SolutionService(IServiceProvider serviceProvider, SourceControlProvider sourceControlProvider)
{
_serviceProvider = serviceProvider;
_vsSolution = serviceProvider.GetService<SVsSolution, IVsSolution>();
_isRefreshEnabled = true;
sourceControlProvider.Activated += (sender, e) =>
{
string directory, fileName, userFile;
_vsSolution.GetSolutionInfo(out directory, out fileName, out userFile);
_vsSolution.AdviseSolutionEvents(this, out _cookieSolutionEvents);
if (string.IsNullOrEmpty(directory))
_repositoryService.CloseRepository();
else
_repositoryService.OpenRepositoryAt(directory);
};
sourceControlProvider.Deactivated += (sender, e) =>
{
StopListeningToSolutionEvents();
_repositoryService.CloseRepository();
};
}
示例2: GetOrchardExe
/// <summary>
/// Gets the orchard executable path.
/// </summary>
/// <returns></returns>
private string GetOrchardExe(IVsSolution solution)
{
string solDir, solFile, userOpts;
solution.GetSolutionInfo(out solDir, out solFile, out userOpts);
var exe = Path.Combine(solDir, "Orchard.Web", "bin", "Orchard.exe");
return exe;
}