本文整理汇总了C#中ICSharpCode.SharpDevelop.Project.Solution类的典型用法代码示例。如果您正苦于以下问题:C# Solution类的具体用法?C# Solution怎么用?C# Solution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Solution类属于ICSharpCode.SharpDevelop.Project命名空间,在下文中一共展示了Solution类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateProperties
void CreateProperties()
{
solutionHelper = new SolutionHelper();
solution = solutionHelper.Solution;
msbuildSolution = solutionHelper.MSBuildSolution;
properties = (Properties)solution.Properties;
}
示例2: OpenSolution
Solution OpenSolution()
{
var solution = new Solution(new MockProjectChangeWatcher());
solution.FileName = @"d:\projects\myprojects\test.csproj";
fakeProjectService.FireSolutionLoadedEvent(solution);
return solution;
}
示例3: SolutionPackageRepository
public SolutionPackageRepository(Solution solution)
: this(
solution,
new SharpDevelopPackageRepositoryFactory(),
PackageManagementServices.Options)
{
}
示例4: SetUp
public void SetUp()
{
testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
treeView = new DummyParserServiceTestTreeView(testFrameworks);
// Create a solution with two test projects.
solution = new Solution(new MockProjectChangeWatcher());
// Create the first test project.
firstProject = new MockCSharpProject(solution, "FirstTestProject");
ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(firstProject);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(firstProject, nunitFrameworkReferenceItem);
// Create the second test project.
secondProject = new MockCSharpProject(solution, "SecondTestProject");
nunitFrameworkReferenceItem = new ReferenceProjectItem(secondProject);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(secondProject, nunitFrameworkReferenceItem);
// Add the projects to the solution.
solution.Folders.Add(firstProject);
solution.Folders.Add(secondProject);
// Create a dummy project content so the projects will be added
// to the tree.
treeView.ProjectContentForProject = new MockProjectContent();
// Add the solution to the tree.
treeView.AddSolution(solution);
allTestsTreeNode = treeView.Nodes[0] as AllTestsTreeNode;
firstTestProject = treeView.GetTestProject(firstProject);
secondTestProject = treeView.GetTestProject(secondProject);
}
示例5: Solution
public Solution(IPackageManagementProjectService projectService)
{
this.projectService = projectService;
this.solution = projectService.OpenSolution;
this.Projects = new Projects(projectService);
this.Globals = new SolutionGlobals(this);
}
示例6: OpenSolution
void OpenSolution()
{
FakeProjectService = new FakePackageManagementProjectService();
MSBuildSolution = CreateSharpDevelopSolution();
FakeProjectService.OpenSolution = MSBuildSolution;
Solution = new Solution(FakeProjectService);
}
示例7: SolutionConfigurationEditor
public SolutionConfigurationEditor()
{
this.solution = ProjectService.OpenSolution;
if (solution == null)
throw new Exception("A solution must be opened");
//
// The InitializeComponent() call is required for Windows Forms designer support.
//
InitializeComponent();
this.Text = StringParser.Parse(this.Text);
label1.Text = StringParser.Parse(label1.Text);
label2.Text = StringParser.Parse(label2.Text);
okButton.Text = StringParser.Parse(okButton.Text);
projectNameColumn.HeaderText = StringParser.Parse(projectNameColumn.HeaderText);
configurationColumn.HeaderText = StringParser.Parse(configurationColumn.HeaderText);
platformColumn.HeaderText = StringParser.Parse(platformColumn.HeaderText);
inUpdate = true;
UpdateAvailableSolutionConfigurationPlatforms();
foreach (IProject p in solution.Projects) {
DataGridViewRow row = grid.Rows[grid.Rows.Add()];
row.Tag = p;
row.Cells[0].Value = p.Name;
}
UpdateGrid();
}
示例8: Init
public void Init()
{
solution = new Solution();
project1 = new MockCSharpProject(solution);
project1.Name = "A";
ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project1);
refProjectItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project1, refProjectItem);
solution.Folders.Add(project1);
project2 = new MockCSharpProject(solution);
project2.Name = "Z";
refProjectItem = new ReferenceProjectItem(project2);
refProjectItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project2, refProjectItem);
solution.Folders.Add(project2);
MockProjectContent projectContent = new MockProjectContent();
projectContent.Project = project1;
treeView = new DummyParserServiceTestTreeView();
treeView.ProjectContentForProject = projectContent;
treeView.AddSolution(solution);
projects = treeView.GetProjects();
}
示例9: SetUp
public void SetUp()
{
solution = new Solution();
// Create a project to display in the test tree view.
project = new MockCSharpProject(solution, "TestProject");
ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
nunitFrameworkReferenceItem.Include = "NUnit.Framework";
ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
// Add a test class with a TestFixture attributes.
projectContent = new MockProjectContent();
projectContent.Language = LanguageProperties.None;
testClass1 = new MockClass(projectContent, "Project.Tests.MyTestFixture");
testClass1.Attributes.Add(new MockAttribute("TestFixture"));
projectContent.Classes.Add(testClass1);
testClass2 = new MockClass(projectContent, "Project.MyTestFixture");
testClass2.Attributes.Add(new MockAttribute("TestFixture"));
projectContent.Classes.Add(testClass2);
testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks);
dummyTreeView.ProjectContentForProject = projectContent;
// Load the projects into the test tree view.
treeView = dummyTreeView as TestTreeView;
solution.Folders.Add(project);
treeView.AddSolution(solution);
nodes = treeView.Nodes;
rootNode = (ExtTreeNode)treeView.Nodes[0];
treeView.SelectedNode = rootNode;
testProject = treeView.SelectedTestProject;
}
示例10: CreatePackageInitializationScripts
public IPackageInitializationScripts CreatePackageInitializationScripts(
Solution solution)
{
var repository = new SolutionPackageRepository(solution);
var scriptFactory = new PackageScriptFactory();
return new PackageInitializationScripts(repository, scriptFactory);
}
示例11: CreateTestProject
public static TestableProject CreateTestProject(string name)
{
Solution solution = new Solution(new MockProjectChangeWatcher());
solution.FileName = @"d:\projects\Test\TestSolution.sln";
return CreateTestProject(solution, name);
}
示例12: CreateVsSolution
void CreateVsSolution(string solutionFileName = @"d:\projects\test\Test.sln")
{
var msbuildSolution = new Solution(new MockProjectChangeWatcher());
msbuildSolution.FileName = solutionFileName;
fakeProjectService = new FakePackageManagementProjectService();
fakeProjectService.OpenSolution = msbuildSolution;
solution = new VsSolution(fakeProjectService);
}
示例13: Save
public void Save(Solution solution)
{
if (WorkbenchSingleton.InvokeRequired) {
Action<Solution> action = Save;
WorkbenchSingleton.SafeThreadCall<Solution>(action, solution);
} else {
solution.Save();
}
}
示例14: Solution
public Solution(IPackageManagementProjectService projectService)
{
this.projectService = projectService;
this.solution = projectService.OpenSolution;
this.Projects = new Projects(projectService);
this.Globals = new SolutionGlobals(this);
this.SolutionBuild = new SolutionBuild(this, projectService.ProjectBuilder);
CreateProperties();
}
示例15: SolutionWithOneProjectOpen
IProject SolutionWithOneProjectOpen()
{
var solution = new Solution(new MockProjectChangeWatcher());
var project = new MockCSharpProject(solution, "MyProject");
solution.AddFolder(project);
runTestCommandContext.Solution = solution;
return project;
}