32 lines
994 B
C#
32 lines
994 B
C#
using System.Collections.Generic;
|
|
using System.IO;
|
|
using System.Linq;
|
|
|
|
namespace TeaBox.Code
|
|
{
|
|
/// <summary>
|
|
/// Lists all the solutions and allows to open them.
|
|
/// </summary>
|
|
public class QuickRunSolution : IQuickRunItemProvider
|
|
{
|
|
public IEnumerable<IQuickOpenItem> QuickRunItems
|
|
{
|
|
get
|
|
{
|
|
yield return new QuickOpenItem
|
|
{
|
|
Name = " Solutions",
|
|
Hint = "Press tab to see solution list",
|
|
ChildrenProvider = () =>
|
|
{
|
|
var tools = Directory.GetDirectories(Path.Combine(RootFolder.Value, @"tools"));
|
|
|
|
return from directory in tools
|
|
from file in Directory.GetFiles(directory, "*.sln", SearchOption.AllDirectories)
|
|
select file.ToQuickRunItem();
|
|
},
|
|
};
|
|
}
|
|
}
|
|
}
|
|
}
|