Browse Source

Remove skip-messages for projects not compiled when compiling only a single project using F9.

Replace ICSharpCode.SharpDevelop.Func<...> with System.Func<...>; use System.Linq.Enumerable instead of the ICSharpCode.SharpDevelop.Linq helper class.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2628 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 18 years ago
parent
commit
f3528c4d04
  1. 4
      src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj
  2. 4
      src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/FormsDesignerBinding.cs
  3. 1
      src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj
  4. 1
      src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj
  5. 3
      src/AddIns/BackendBindings/WixBinding/Test/Project/CreateNewWixProjectObjectTestFixture.cs
  6. 1
      src/AddIns/BackendBindings/WixBinding/Test/WixBinding.Tests.csproj
  7. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj
  8. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs
  9. 6
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/SecondaryDisplayBinding.cs
  10. 1
      src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj
  11. 1
      src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj
  12. 1
      src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj
  13. 1
      src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj
  14. 3
      src/AddIns/Misc/StartPage/Project/Src/Main.cs
  15. 4
      src/AddIns/Misc/StartPage/Project/StartPage.csproj
  16. 1
      src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj
  17. 1
      src/AddIns/Misc/UnitTesting/UnitTesting.csproj
  18. 3
      src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj
  19. 3
      src/Main/Base/Project/Src/Commands/FileCommands.cs
  20. 3
      src/Main/Base/Project/Src/Commands/FileTabStripCommands.cs
  21. 3
      src/Main/Base/Project/Src/Gui/AbstractViewContentHandlingLoadErrors.cs
  22. 3
      src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/AddNewConfigurationDialog.cs
  23. 3
      src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/EditAvailableConfigurationsDialog.cs
  24. 15
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs
  25. 2
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs
  26. 2
      src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs
  27. 3
      src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs
  28. 5
      src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs
  29. 5
      src/Main/Base/Project/Src/Project/Items/FileProjectItem.cs
  30. 3
      src/Main/Base/Project/Src/Project/Items/ProjectItem.cs
  31. 13
      src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs
  32. 13
      src/Main/Base/Project/Src/Project/MSBuildEngine.cs
  33. 4
      src/Main/Base/Project/Src/Project/MSBuildInternals.cs
  34. 5
      src/Main/Base/Project/Src/Project/Solution/Solution.cs
  35. 3
      src/Main/Base/Project/Src/Services/File/FileService.cs
  36. 9
      src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs
  37. 2
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs
  38. 5
      src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/DocumentIterator/AllOpenDocumentIterator.cs
  39. 37
      src/Main/Base/Project/Src/Util/ExtensionMethods.cs
  40. 184
      src/Main/Base/Project/Src/Util/Linq.cs
  41. 1
      src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj
  42. 5
      src/Main/Base/Test/NRefactoryResolverTests.cs
  43. 2
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj
  44. 21
      src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Functional.cs
  45. 1
      src/Main/ICSharpCode.SharpDevelop.Sda/ICSharpCode.SharpDevelop.Sda.csproj
  46. 3
      src/Main/ICSharpCode.SharpDevelop.Sda/Src/CallHelper.cs

4
src/AddIns/BackendBindings/Boo/BooBinding/Project/BooBinding.csproj

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<OutputType>Library</OutputType>
<RootNamespace>Grunwald.BooBinding</RootNamespace>
@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
<FileAlignment>4096</FileAlignment>
<WarningLevel>4</WarningLevel>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<OutputPath>..\..\..\..\..\..\AddIns\AddIns\BackendBindings\BooBinding\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
@ -33,6 +34,7 @@ @@ -33,6 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />

4
src/AddIns/BackendBindings/Boo/BooBinding/Project/Src/Designer/FormsDesignerBinding.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
using System;
using System.IO;
using System.Linq;
using ICSharpCode.FormsDesigner;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
@ -47,8 +48,7 @@ namespace Grunwald.BooBinding.Designer @@ -47,8 +48,7 @@ namespace Grunwald.BooBinding.Designer
public IViewContent[] CreateSecondaryViewContent(IViewContent viewContent)
{
if (Linq.Exists(viewContent.SecondaryViewContents, delegate(IViewContent c) { return c is FormsDesignerViewContent; }))
{
if (viewContent.SecondaryViewContents.Any(c => c is FormsDesignerViewContent)) {
return new IViewContent[0];
}

1
src/AddIns/BackendBindings/Boo/BooBinding/Test/BooBinding.Tests.csproj

@ -37,6 +37,7 @@ @@ -37,6 +37,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="nunit.framework">

1
src/AddIns/BackendBindings/CSharpBinding/Project/CSharpBinding.csproj

@ -38,6 +38,7 @@ @@ -38,6 +38,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />

3
src/AddIns/BackendBindings/WixBinding/Test/Project/CreateNewWixProjectObjectTestFixture.cs

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
// </file>
using System;
using System.Linq;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.Dom;
using ICSharpCode.SharpDevelop.Internal.Templates;
@ -156,7 +157,7 @@ namespace WixBinding.Tests.Project @@ -156,7 +157,7 @@ namespace WixBinding.Tests.Project
MSBuild.BuildProperty GetMSBuildProperty(string name)
{
MSBuild.Project msbuildProject = project.MSBuildProject;
foreach (MSBuild.BuildPropertyGroup g in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(msbuildProject.PropertyGroups))) {
foreach (MSBuild.BuildPropertyGroup g in msbuildProject.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList()) {
if (!g.IsImported) {
MSBuild.BuildProperty property = MSBuildInternals.GetProperty(g, name);
if (property != null) {

1
src/AddIns/BackendBindings/WixBinding/Test/WixBinding.Tests.csproj

@ -35,6 +35,7 @@ @@ -35,6 +35,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Design" />

4
src/AddIns/DisplayBindings/FormsDesigner/Project/FormsDesigner.csproj

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
<OutputPath>..\..\..\..\..\AddIns\AddIns\DisplayBindings\FormsDesigner\</OutputPath>
<BaseAddress>108003328</BaseAddress>
<FileAlignment>4096</FileAlignment>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<Optimize>True</Optimize>
@ -37,6 +38,7 @@ @@ -37,6 +38,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

4
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Gui/CustomComponentsSideTab.cs

@ -10,6 +10,7 @@ using System.Collections.Generic; @@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Drawing.Design;
using System.Linq;
using System.Reflection;
using ICSharpCode.Core;
@ -67,7 +68,8 @@ namespace ICSharpCode.FormsDesigner.Gui @@ -67,7 +68,8 @@ namespace ICSharpCode.FormsDesigner.Gui
/// </summary>
static IEnumerable<IProjectContent> AllProjectContentsWithReferences {
get {
return Linq.Distinct(Linq.Concat(ParserService.AllProjectContents, ParserService.DefaultProjectContentRegistry.GetLoadedProjectContents()));
return Enumerable.Concat(ParserService.AllProjectContents, ParserService.DefaultProjectContentRegistry.GetLoadedProjectContents())
.Distinct();
}
}

6
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/SecondaryDisplayBinding.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
using System;
using System.IO;
using System.Linq;
using ICSharpCode.NRefactory;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
@ -109,10 +110,7 @@ namespace ICSharpCode.FormsDesigner @@ -109,10 +110,7 @@ namespace ICSharpCode.FormsDesigner
public IViewContent[] CreateSecondaryViewContent(IViewContent viewContent)
{
if (Linq.Exists(viewContent.SecondaryViewContents,
delegate(IViewContent c) { return c is FormsDesignerViewContent; })
)
{
if (viewContent.SecondaryViewContents.Any(c => c is FormsDesignerViewContent)) {
return new IViewContent[0];
}

1
src/AddIns/DisplayBindings/XmlEditor/Project/XmlEditor.csproj

@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

1
src/AddIns/Misc/CodeCoverage/Project/CodeCoverage.csproj

@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />

1
src/AddIns/Misc/HtmlHelp2/Project/HtmlHelp2.csproj

@ -40,6 +40,7 @@ @@ -40,6 +40,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="stdole">

1
src/AddIns/Misc/MonoAddIn/Project/MonoAddIn.csproj

@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

3
src/AddIns/Misc/StartPage/Project/Src/Main.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
// project created on 16.07.2002 at 18:07
using System;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.BrowserDisplayBinding;
@ -25,7 +26,7 @@ namespace ICSharpCode.StartPage @@ -25,7 +26,7 @@ namespace ICSharpCode.StartPage
isFirstStartPage = false;
ProjectService.SolutionLoaded += delegate {
// close all start pages when loading a solution
foreach (IViewContent v in Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection)) {
foreach (IViewContent v in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) {
BrowserPane b = v as BrowserPane;
if (b != null) {
if (b.Url.Scheme == "startpage") {

4
src/AddIns/Misc/StartPage/Project/StartPage.csproj

@ -1,4 +1,4 @@ @@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
<BaseAddress>126877696</BaseAddress>
<PlatformTarget>AnyCPU</PlatformTarget>
<FileAlignment>4096</FileAlignment>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@ -39,6 +40,7 @@ @@ -39,6 +40,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />
</ItemGroup>

1
src/AddIns/Misc/SubversionAddIn/Project/SubversionAddIn.csproj

@ -25,6 +25,7 @@ @@ -25,6 +25,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

1
src/AddIns/Misc/UnitTesting/UnitTesting.csproj

@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

3
src/Main/Base/Project/ICSharpCode.SharpDevelop.csproj

@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.Drawing" />
@ -696,7 +697,7 @@ @@ -696,7 +697,7 @@
<DependentUpon>AsynchronousWaitDialog.cs</DependentUpon>
</EmbeddedResource>
<Compile Include="Src\Gui\Dialogs\SharpDevelopColorDialog.cs" />
<Compile Include="Src\Util\Linq.cs" />
<Compile Include="Src\Util\ExtensionMethods.cs" />
<Compile Include="Src\Util\DebugTimer.cs" />
<Compile Include="Src\Project\CustomTool.cs" />
<Compile Include="Src\Gui\Dialogs\SolutionConfiguration\EditAvailableConfigurationsDialog.Designer.cs">

3
src/Main/Base/Project/Src/Commands/FileCommands.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Drawing.Printing;
using System.IO;
using System.Linq;
using System.Diagnostics;
using System.Windows.Forms;
@ -69,7 +70,7 @@ namespace ICSharpCode.SharpDevelop.Commands @@ -69,7 +70,7 @@ namespace ICSharpCode.SharpDevelop.Commands
return;
}
foreach (OpenedFile file in Linq.ToArray(content.Files)) {
foreach (OpenedFile file in content.Files.ToArray()) {
Save(file);
}
}

3
src/Main/Base/Project/Src/Commands/FileTabStripCommands.cs

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
using System;
using System.IO;
using System.Linq;
using System.Windows.Forms;
using ICSharpCode.Core;
@ -31,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Commands.TabStrip @@ -31,7 +32,7 @@ namespace ICSharpCode.SharpDevelop.Commands.TabStrip
public override void Run()
{
IWorkbenchWindow thisWindow = Owner as IWorkbenchWindow;
foreach (IWorkbenchWindow window in Linq.ToArray(WorkbenchSingleton.Workbench.WorkbenchWindowCollection)) {
foreach (IWorkbenchWindow window in WorkbenchSingleton.Workbench.WorkbenchWindowCollection.ToArray()) {
if (window != thisWindow) {
if (!window.CloseWindow(false))
break;

3
src/Main/Base/Project/Src/Gui/AbstractViewContentHandlingLoadErrors.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.IO;
using System.Windows.Forms;
@ -113,7 +114,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -113,7 +114,7 @@ namespace ICSharpCode.SharpDevelop.Gui
panel.Controls.Add(userControl);
}
} else {
ShowError(Linq.First(errorList.Values).exception);
ShowError(errorList.Values.First().exception);
}
}
} catch (Exception ex) {

3
src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/AddNewConfigurationDialog.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using ICSharpCode.Core;
@ -40,7 +41,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -40,7 +41,7 @@ namespace ICSharpCode.SharpDevelop.Gui
okButton.Enabled = nameTextBox.TextLength > 0;
};
copyFromComboBox.Items.Add("<Empty>");
copyFromComboBox.Items.AddRange(Linq.ToArray(availableSourceItems));
copyFromComboBox.Items.AddRange(availableSourceItems.ToArray());
copyFromComboBox.SelectedIndex = 0;
if (solution) {

3
src/Main/Base/Project/Src/Gui/Dialogs/SolutionConfiguration/EditAvailableConfigurationsDialog.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using ICSharpCode.Core;
@ -79,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -79,7 +80,7 @@ namespace ICSharpCode.SharpDevelop.Gui
void ShowEntries(IEnumerable<string> list, string activeItem)
{
string[] array = Linq.ToArray(list);
string[] array = list.ToArray();
listBox.Items.Clear();
listBox.Items.AddRange(array);
if (listBox.Items.Count == 0) {

15
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Diagnostics;
using System.Drawing;
using System.Globalization;
@ -112,12 +113,8 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -112,12 +113,8 @@ namespace ICSharpCode.SharpDevelop.Gui
public IList<IWorkbenchWindow> WorkbenchWindowCollection {
get {
return Linq.ToArray(Linq.Distinct(
Linq.Select<IViewContent, IWorkbenchWindow>(
viewContentCollection,
delegate (IViewContent vc) { return vc.WorkbenchWindow; }
)
));
return viewContentCollection.Select(vc => vc.WorkbenchWindow)
.Distinct().ToArray().AsReadOnly();
}
}
@ -303,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -303,7 +300,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{
try {
closeAll = true;
foreach (IWorkbenchWindow window in Linq.ToArray(this.WorkbenchWindowCollection)) {
foreach (IWorkbenchWindow window in this.WorkbenchWindowCollection.ToArray()) {
window.CloseWindow(false);
}
} finally {
@ -459,9 +456,9 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -459,9 +456,9 @@ namespace ICSharpCode.SharpDevelop.Gui
void CheckRemovedOrReplacedFile(object sender, FileEventArgs e)
{
foreach (OpenedFile file in Linq.ToArray(FileService.OpenedFiles)) {
foreach (OpenedFile file in FileService.OpenedFiles.ToArray()) {
if (FileUtility.IsBaseDirectory(e.FileName, file.FileName)) {
foreach (IViewContent content in Linq.ToArray(file.RegisteredViewContents)) {
foreach (IViewContent content in file.RegisteredViewContents.ToArray()) {
content.WorkbenchWindow.CloseWindow(true);
}
}

2
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceLayout.cs

@ -579,7 +579,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -579,7 +579,7 @@ namespace ICSharpCode.SharpDevelop.Gui
content.Control.Dock = DockStyle.Fill;
SdiWorkspaceWindow sdiWorkspaceWindow = new SdiWorkspaceWindow();
sdiWorkspaceWindow.ViewContents.Add(content);
Linq.Apply(content.SecondaryViewContents, sdiWorkspaceWindow.ViewContents.Add);
content.SecondaryViewContents.Apply(sdiWorkspaceWindow.ViewContents.Add);
sdiWorkspaceWindow.CloseEvent += new EventHandler(CloseWindowEvent);
if (dockPanel != null) {
sdiWorkspaceWindow.Show(dockPanel);

2
src/Main/Base/Project/Src/Gui/Workbench/Layouts/SdiWorkspaceWindow.cs

@ -333,7 +333,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -333,7 +333,7 @@ namespace ICSharpCode.SharpDevelop.Gui
case DialogResult.Yes:
if (ActiveViewContent.PrimaryFile != null) {
while (true) {
Linq.Apply(ActiveViewContent.Files, ICSharpCode.SharpDevelop.Commands.SaveFile.Save);
ActiveViewContent.Files.Apply(ICSharpCode.SharpDevelop.Commands.SaveFile.Save);
if (ActiveViewContent.IsDirty) {
if (MessageService.AskQuestion("${res:MainWindow.DiscardChangesMessage}")) {

3
src/Main/Base/Project/Src/Internal/Templates/Project/ProjectDescriptor.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Xml;
@ -98,7 +99,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates @@ -98,7 +99,7 @@ namespace ICSharpCode.SharpDevelop.Internal.Templates
static IEnumerable<XmlElement> ChildElements(XmlElement parentElement)
{
return Linq.OfType<XmlElement>(parentElement.ChildNodes);
return parentElement.ChildNodes.OfType<XmlElement>();
}
void LoadElement(XmlElement node, string hintPath)

5
src/Main/Base/Project/Src/Project/ConfigurationGuiHelper.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Drawing;
using System.Globalization;
using System.Windows.Forms;
@ -638,11 +639,11 @@ namespace ICSharpCode.SharpDevelop.Project @@ -638,11 +639,11 @@ namespace ICSharpCode.SharpDevelop.Project
{
List<string> items;
configurationComboBox.Items.Clear();
items = Linq.ToList(helper.Project.ConfigurationNames);
items = helper.Project.ConfigurationNames.ToList();
items.Sort();
configurationComboBox.Items.AddRange(items.ToArray());
platformComboBox.Items.Clear();
items = Linq.ToList(helper.Project.PlatformNames);
items = helper.Project.PlatformNames.ToList();
items.Sort();
platformComboBox.Items.AddRange(items.ToArray());
ResetIndex();

5
src/Main/Base/Project/Src/Project/Items/FileProjectItem.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing.Design;
using System.Linq;
using System.IO;
using System.Windows.Forms;
using System.Windows.Forms.Design;
@ -74,9 +75,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -74,9 +75,7 @@ namespace ICSharpCode.SharpDevelop.Project
static IEnumerable<string> GetNames(IEnumerable<ItemType> itemTypes)
{
return Linq.Select<ItemType, string>(
itemTypes, delegate(ItemType it) { return it.ItemName; }
);
return itemTypes.Select(it => it.ItemName);
}
}

3
src/Main/Base/Project/Src/Project/Items/ProjectItem.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.IO;
using System.Text;
using System.Xml;
@ -301,7 +302,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -301,7 +302,7 @@ namespace ICSharpCode.SharpDevelop.Project
if (buildItem != null)
return MSBuildInternals.GetCustomMetadataNames(buildItem);
else
return Linq.ToArray(virtualMetadata.Keys);
return virtualMetadata.Keys.ToArray();
}
}
}

13
src/Main/Base/Project/Src/Project/MSBuildBasedProject.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.IO;
using ICSharpCode.Core;
@ -309,10 +310,10 @@ namespace ICSharpCode.SharpDevelop.Project @@ -309,10 +310,10 @@ namespace ICSharpCode.SharpDevelop.Project
if (string.IsNullOrEmpty(configuration)) configuration = ActiveConfiguration;
if (string.IsNullOrEmpty(platform)) platform = ActivePlatform;
// We need to use ToArray because EvaluateMSBuildCondition invalidates the list
// We need to use ToList because EvaluateMSBuildCondition invalidates the list
// of property groups.
foreach (MSBuild.BuildPropertyGroup g
in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(project.PropertyGroups)))
in project.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList())
{
if (g.IsImported) {
continue;
@ -1073,7 +1074,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1073,7 +1074,7 @@ namespace ICSharpCode.SharpDevelop.Project
bool copiedGroup = false;
if (copyFrom != null) {
foreach (MSBuild.BuildPropertyGroup g
in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(project.PropertyGroups)))
in project.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList())
{
if (g.IsImported) {
continue;
@ -1103,7 +1104,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1103,7 +1104,7 @@ namespace ICSharpCode.SharpDevelop.Project
bool copiedGroup = false;
if (copyFrom != null) {
foreach (MSBuild.BuildPropertyGroup g
in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(project.PropertyGroups)))
in project.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList())
{
if (g.IsImported) {
continue;
@ -1153,7 +1154,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1153,7 +1154,7 @@ namespace ICSharpCode.SharpDevelop.Project
throw new InvalidOperationException("cannot remove the last configuration");
}
foreach (MSBuild.BuildPropertyGroup g
in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(project.PropertyGroups)))
in project.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList())
{
if (g.IsImported) {
continue;
@ -1191,7 +1192,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -1191,7 +1192,7 @@ namespace ICSharpCode.SharpDevelop.Project
throw new InvalidOperationException("cannot remove the last platform");
}
foreach (MSBuild.BuildPropertyGroup g
in Linq.ToList(Linq.CastTo<MSBuild.BuildPropertyGroup>(project.PropertyGroups)))
in project.PropertyGroups.Cast<MSBuild.BuildPropertyGroup>().ToList())
{
if (g.IsImported) {
continue;

13
src/Main/Base/Project/Src/Project/MSBuildEngine.cs

@ -10,6 +10,7 @@ using System.Collections.Generic; @@ -10,6 +10,7 @@ using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Text.RegularExpressions;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Gui;
@ -215,10 +216,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -215,10 +216,8 @@ namespace ICSharpCode.SharpDevelop.Project
else
projectsToBuildWithoutDependencies = GetAllReferencedProjects(project);
projectsToBuild = Linq.ToList(Linq.Select<IProject, ProjectToBuild>(
projectsToBuildWithoutDependencies,
p => new ProjectToBuild(p.FileName, options.Target.TargetName)
));
projectsToBuild = (from p in projectsToBuildWithoutDependencies
select new ProjectToBuild(p.FileName, options.Target.TargetName)).ToList();
Dictionary<string, ProjectToBuild> projectDict = new Dictionary<string, ProjectToBuild>(StringComparer.InvariantCultureIgnoreCase);
foreach (ProjectToBuild ptb in projectsToBuild) {
@ -240,7 +239,11 @@ namespace ICSharpCode.SharpDevelop.Project @@ -240,7 +239,11 @@ namespace ICSharpCode.SharpDevelop.Project
ptb.configuration = item.GetEvaluatedMetadata("Configuration");
ptb.platform = item.GetEvaluatedMetadata("Platform");
} else {
parentEngine.MessageView.AppendLine("Cannot build project file: " + path + " (project is not loaded by SharpDevelop)");
// don't warn when compiling a specific project, but simply ignore projects
// that are not required
if (project == null) {
parentEngine.MessageView.AppendLine("Cannot build project file: " + path + " (project is not loaded by SharpDevelop)");
}
}
}
}

4
src/Main/Base/Project/Src/Project/MSBuildInternals.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Diagnostics;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Xml;
using System.Text;
using System.Globalization;
@ -214,8 +215,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -214,8 +215,7 @@ namespace ICSharpCode.SharpDevelop.Project
public static MSBuild.BuildProperty GetProperty(MSBuild.BuildPropertyGroup pg, string name)
{
return Linq.Find(Linq.CastTo<MSBuild.BuildProperty>(pg),
delegate(MSBuild.BuildProperty p) { return p.Name == name; });
return pg.Cast<MSBuild.BuildProperty>().FirstOrDefault(p => p.Name == name);
}
public static MSBuild.Engine CreateEngine()

5
src/Main/Base/Project/Src/Project/Solution/Solution.cs

@ -9,6 +9,7 @@ using System; @@ -9,6 +9,7 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
@ -942,8 +943,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -942,8 +943,8 @@ namespace ICSharpCode.SharpDevelop.Project
projectConfiguration = matching.Configuration;
projectPlatform = matching.Platform;
} else {
projectConfiguration = Linq.ToArray(project.ConfigurationNames)[0];
projectPlatform = FixPlatformNameForSolution(Linq.ToArray(project.PlatformNames)[0]);
projectConfiguration = project.ConfigurationNames.First();
projectPlatform = FixPlatformNameForSolution(project.PlatformNames.First());
}
if (createInProjects) {
ICollection<string> existingInProject = addPlatform ? project.PlatformNames : project.ConfigurationNames;

3
src/Main/Base/Project/Src/Services/File/FileService.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.IO;
using System.Windows.Forms;
@ -188,7 +189,7 @@ namespace ICSharpCode.SharpDevelop @@ -188,7 +189,7 @@ namespace ICSharpCode.SharpDevelop
{
WorkbenchSingleton.SafeThreadAsyncCall(
delegate {
foreach (IViewContent content in Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection)) {
foreach (IViewContent content in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) {
DisplayBindingService.AttachSubWindows(content, true);
}
});

9
src/Main/Base/Project/Src/Services/ProjectService/ProjectService.cs

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
// </file>
using System;
using System.Linq;
using System.IO;
using System.Text;
@ -161,7 +162,7 @@ namespace ICSharpCode.SharpDevelop.Project @@ -161,7 +162,7 @@ namespace ICSharpCode.SharpDevelop.Project
if (FileUtility.IsBaseDirectory(project.Directory, fileName)) {
IProjectItemListProvider provider = project as IProjectItemListProvider;
if (provider != null) {
foreach (ProjectItem item in Linq.ToArray(provider.Items)) {
foreach (ProjectItem item in provider.Items.ToArray()) {
if (FileUtility.IsBaseDirectory(fileName, item.FileName)) {
provider.RemoveProjectItem(item);
OnProjectItemRemoved(new ProjectItemEventArgs(project, item));
@ -187,10 +188,8 @@ namespace ICSharpCode.SharpDevelop.Project @@ -187,10 +188,8 @@ namespace ICSharpCode.SharpDevelop.Project
public static void AddProject(ISolutionFolderNode solutionFolderNode, IProject newProject)
{
if (Linq.Exists(solutionFolderNode.Solution.SolutionFolders,
delegate (ISolutionFolder folder) {
return string.Equals(folder.IdGuid, newProject.IdGuid, StringComparison.OrdinalIgnoreCase);
}))
if (solutionFolderNode.Solution.SolutionFolders.Any(
folder => string.Equals(folder.IdGuid, newProject.IdGuid, StringComparison.OrdinalIgnoreCase)))
{
LoggingService.Warn("ProjectService.AddProject: Duplicate IdGuid detected");
newProject.IdGuid = Guid.NewGuid().ToString().ToUpperInvariant();

2
src/Main/Base/Project/Src/TextEditor/Gui/Editor/CompletionWindow/CodeCompletionData.cs

@ -141,7 +141,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -141,7 +141,7 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
member = method;
imageIndex = ClassBrowserIconService.GetIcon(method);
ambience = AmbienceService.CurrentAmbience;
ambience.ConversionFlags = ConversionFlags.ShowTypeParameterList;
ambience.ConversionFlags = ConversionFlags.None;
text = ambience.Convert(method);
ambience.ConversionFlags = ConversionFlags.StandardConversionFlags;
description = ambience.Convert(method);

5
src/Main/Base/Project/Src/TextEditor/SearchAndReplace/Engine/DocumentIterator/AllOpenDocumentIterator.cs

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
// </file>
using System;
using System.Linq;
using ICSharpCode.SharpDevelop;
using ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor;
using ICSharpCode.SharpDevelop.Gui;
@ -39,7 +40,7 @@ namespace SearchAndReplace @@ -39,7 +40,7 @@ namespace SearchAndReplace
{
GetCurIndex();
if (curIndex >= 0) {
IViewContent viewContent = Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection)[curIndex];
IViewContent viewContent = WorkbenchSingleton.Workbench.ViewContentCollection.ToList()[curIndex];
if (viewContent is ITextEditorControlProvider) {
return viewContent;
}
@ -63,7 +64,7 @@ namespace SearchAndReplace @@ -63,7 +64,7 @@ namespace SearchAndReplace
void GetCurIndex()
{
IViewContent[] viewContentCollection = Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection);
IViewContent[] viewContentCollection = WorkbenchSingleton.Workbench.ViewContentCollection.ToArray();
int viewCount = WorkbenchSingleton.Workbench.ViewContentCollection.Count;
if (curIndex == -1 || curIndex >= viewCount) {
for (int i = 0; i < viewCount; ++i) {

37
src/Main/Base/Project/Src/Util/ExtensionMethods.cs

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// Extension methods used in SharpDevelop.
/// </summary>
public static class ExtensionMethods
{
/// <summary>
/// Applies an action to all elements in the input.
/// </summary>
public static void Apply<T>(this IEnumerable<T> input, Action<T> action)
{
if (input == null)
throw new ArgumentNullException("input");
foreach (T element in input) {
action(element);
}
}
public static ReadOnlyCollection<T> AsReadOnly<T>(this T[] arr)
{
return Array.AsReadOnly(arr);
}
}
}

184
src/Main/Base/Project/Src/Util/Linq.cs

@ -1,184 +0,0 @@ @@ -1,184 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
namespace ICSharpCode.SharpDevelop
{
/// <summary>
/// A set of methods that replicate some of the LINQ functionality.
/// </summary>
/// <remarks>
/// Will be removed when SharpDevelop is compiled with C# 3.0.
/// </remarks>
public static class Linq
{
/// <summary>
/// Applies a conversion function to all elements in the input.
/// </summary>
public static IEnumerable<S> Select<T, S>(IEnumerable<T> input, Converter<T, S> converter)
{
foreach (T element in input) {
yield return converter(element);
}
}
/// <summary>
/// Applies an action to all elements in the input.
/// </summary>
public static void Apply<T>(IEnumerable<T> input, Action<T> action)
{
foreach (T element in input) {
action(element);
}
}
/// <summary>
/// Returns only the elements in input for which filter is true.
/// </summary>
public static IEnumerable<T> Where<T>(IEnumerable<T> input, Predicate<T> filter)
{
foreach (T element in input) {
if (filter(element))
yield return element;
}
}
/// <summary>
/// Returns the elements of type T inside input by running
/// "if (element is T) yield return (T)element;" on each element.
/// </summary>
public static IEnumerable<T> OfType<T>(IEnumerable input)
{
foreach (object element in input) {
if (element is T)
yield return (T)element;
}
}
/// <summary>
/// Casts a non-generic enumeration into a generic enumeration.
/// </summary>
public static IEnumerable<T> CastTo<T>(IEnumerable input)
{
foreach (object element in input) {
yield return (T)element;
}
}
/// <summary>
/// Returns the first element in input for which filter is true.
/// Returns default(T) if no element matches the filter.
/// </summary>
public static T Find<T>(IEnumerable<T> input, Predicate<T> filter)
{
foreach (T element in input) {
if (filter(element))
return element;
}
return default(T);
}
/// <summary>
/// Gets if any element in the input matches the filter.
/// </summary>
public static bool Exists<T>(IEnumerable<T> input, Predicate<T> filter)
{
foreach (T element in input) {
if (filter(element))
return true;
}
return false;
}
/// <summary>
/// Returns the first element from <paramref name="input"/>.
/// </summary>
public static T First<T>(IEnumerable<T> input)
{
if (input == null)
throw new ArgumentNullException("input");
foreach (T item in input) {
return item;
}
throw new ArgumentException("input must not be an empty collection", "input");
}
public static List<T> ToList<T>(IEnumerable<T> input)
{
return new List<T>(input);
}
public static T[] ToArray<T>(IEnumerable<T> input)
{
if (input is ICollection<T>) {
ICollection<T> c = (ICollection<T>)input;
T[] arr = new T[c.Count];
c.CopyTo(arr, 0);
return arr;
} else {
return new List<T>(input).ToArray();
}
}
public static int Count<T>(IEnumerable<T> input)
{
if (input is ICollection<T>) {
return ((ICollection<T>)input).Count;
}
int count = 0;
using (IEnumerator<T> e = input.GetEnumerator()) {
while (e.MoveNext())
count++;
}
return count;
}
/// <summary>
/// Concatenates the specified enumerables.
/// </summary>
public static IEnumerable<T> Concat<T>(IEnumerable<T> input1, IEnumerable<T> input2)
{
foreach (T element in input1) {
yield return element;
}
foreach (T element in input2) {
yield return element;
}
}
/// <summary>
/// Concatenates the specified enumerables.
/// </summary>
public static IEnumerable<T> Concat<T>(IEnumerable<IEnumerable<T>> inputs)
{
foreach (IEnumerable<T> input in inputs) {
foreach (T element in input) {
yield return element;
}
}
}
/// <summary>
/// Outputs distinct elements only, filtering all duplicates.
/// </summary>
public static IEnumerable<T> Distinct<T>(IEnumerable<T> input)
{
// store elements already seen
Dictionary<T, object> elements = new Dictionary<T, object>();
foreach (T element in input) {
if (!elements.ContainsKey(element)) {
elements.Add(element, null);
yield return element;
}
}
}
}
}

1
src/Main/Base/Test/ICSharpCode.SharpDevelop.Tests.csproj

@ -33,6 +33,7 @@ @@ -33,6 +33,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

5
src/Main/Base/Test/NRefactoryResolverTests.cs

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
using System;
using System.Collections;
using System.IO;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Dom;
@ -911,9 +912,7 @@ End Class @@ -911,9 +912,7 @@ End Class
bool ContainsMember(IEnumerable input, string fullMemberName)
{
return Linq.Exists(Linq.OfType<IMember>(input), delegate(IMember m) {
return m.FullyQualifiedName == fullMemberName;
});
return input.OfType<IMember>().Any(m => m.FullyQualifiedName == fullMemberName);
}
#endregion

2
src/Main/ICSharpCode.SharpDevelop.Dom/Project/ICSharpCode.SharpDevelop.Dom.csproj

@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="Mono.Cecil">
<HintPath>..\..\..\Libraries\Mono.Cecil\Mono.Cecil.dll</HintPath>
@ -144,7 +145,6 @@ @@ -144,7 +145,6 @@
<Compile Include="Src\FusionNative.cs" />
<Compile Include="Src\DiffUtility.cs" />
<Compile Include="Src\ProjectContent\ParseInformation.cs" />
<Compile Include="Src\Functional.cs" />
<Compile Include="Src\HostCallback.cs" />
<Compile Include="Src\Refactoring\CodeGenerator.cs" />
<Compile Include="Src\Refactoring\IDocument.cs" />

21
src/Main/ICSharpCode.SharpDevelop.Dom/Project/Src/Functional.cs

@ -1,21 +0,0 @@ @@ -1,21 +0,0 @@
// <file>
// <copyright see="prj:///doc/copyright.txt"/>
// <license see="prj:///doc/license.txt"/>
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
// <version>$Revision$</version>
// </file>
using System;
namespace ICSharpCode.SharpDevelop
{
// define some delegates for functional programming
public delegate void Action();
// void Action<A>(A arg1) is already defined in System.
public delegate void Action<A, B>(A arg1, B arg2);
public delegate void Action<A, B, C>(A arg1, B arg2, C arg3);
public delegate R Func<R>();
public delegate R Func<A, R>(A arg1);
public delegate R Func<A, B, R>(A arg1, B arg2);
public delegate R Func<A, B, C, R>(A arg1, B arg2, C arg3);
}

1
src/Main/ICSharpCode.SharpDevelop.Sda/ICSharpCode.SharpDevelop.Sda.csproj

@ -47,6 +47,7 @@ @@ -47,6 +47,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />

3
src/Main/ICSharpCode.SharpDevelop.Sda/Src/CallHelper.cs

@ -13,6 +13,7 @@ using System.IO; @@ -13,6 +13,7 @@ using System.IO;
using System.Reflection;
using System.Resources;
using System.Threading;
using System.Linq;
using ICSharpCode.Core;
using ICSharpCode.SharpDevelop.Commands;
@ -223,7 +224,7 @@ namespace ICSharpCode.SharpDevelop.Sda @@ -223,7 +224,7 @@ namespace ICSharpCode.SharpDevelop.Sda
bool CloseWorkbenchInternal(bool force)
{
if (force) {
foreach (IViewContent vc in Linq.ToArray(WorkbenchSingleton.Workbench.ViewContentCollection)) {
foreach (IViewContent vc in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) {
vc.WorkbenchWindow.CloseWindow(true);
}
}

Loading…
Cancel
Save