Browse Source

more arrays list replaced with generic lists

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1967 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 19 years ago
parent
commit
7f5f7ceae8
  1. 6
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/EventHandlerCompletitionDataProvider.cs
  2. 6
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Commands/FormsCommands.cs
  3. 4
      src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerEventService.cs
  4. 7
      src/AddIns/Misc/SharpServerTools/ServerBrowserTool/Src/Forms/RebuildRequiredEvents.cs
  5. 21
      src/Main/Base/Project/Src/Gui/Dialogs/WordCountDialog.cs

6
src/AddIns/BackendBindings/CSharpBinding/Project/Src/EventHandlerCompletitionDataProvider.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using ICSharpCode.Core;
@ -37,7 +37,7 @@ namespace CSharpBinding @@ -37,7 +37,7 @@ namespace CSharpBinding
/// </summary>
public override ICompletionData[] GenerateCompletionData(string fileName, TextArea textArea, char charTyped)
{
ArrayList completionData = new ArrayList();
List<ICompletionData> completionData = new List<ICompletionData>();
completionData.Add(new DelegateCompletionData("new " + resolveResult.ResolvedType.Name + "();", 2,
"delegate " + resolvedClass.FullyQualifiedName + "\n" + CodeCompletionData.GetDocumentation(resolvedClass.Documentation)));
completionData.Add(new DelegateCompletionData("delegate { };", 3,
@ -95,7 +95,7 @@ namespace CSharpBinding @@ -95,7 +95,7 @@ namespace CSharpBinding
}
}
}
return (ICompletionData[])completionData.ToArray(typeof(ICompletionData));
return completionData.ToArray();
}
private class DelegateCompletionData : DefaultCompletionData

6
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Commands/FormsCommands.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel.Design;
using System.Windows.Forms;
using System.Windows.Forms.Design;
@ -98,7 +98,7 @@ namespace ICSharpCode.FormsDesigner.Commands @@ -98,7 +98,7 @@ namespace ICSharpCode.FormsDesigner.Commands
{
IMenuCommandService menuCommandService = (IMenuCommandService)owner;
ArrayList items = new ArrayList();
List<ToolStripItem> items = new List<ToolStripItem>();
foreach (DesignerVerb verb in menuCommandService.Verbs) {
items.Add(new ContextMenuCommand(verb));
@ -109,7 +109,7 @@ namespace ICSharpCode.FormsDesigner.Commands @@ -109,7 +109,7 @@ namespace ICSharpCode.FormsDesigner.Commands
items.Add(new MenuSeparator());
}
return (ToolStripItem[])items.ToArray(typeof(ToolStripItem));
return items.ToArray();
}
class ContextMenuCommand : ICSharpCode.Core.MenuCommand

4
src/AddIns/DisplayBindings/FormsDesigner/Project/Src/Services/DesignerEventService.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.Design;
@ -15,7 +15,7 @@ namespace ICSharpCode.FormsDesigner.Services @@ -15,7 +15,7 @@ namespace ICSharpCode.FormsDesigner.Services
public class DesignerEventService : IDesignerEventService
{
IDesignerHost activeDesigner = null;
ArrayList designers = new ArrayList();
List<IDesignerHost> designers = new List<IDesignerHost>();
public void Reset()
{

7
src/AddIns/Misc/SharpServerTools/ServerBrowserTool/Src/Forms/RebuildRequiredEvents.cs

@ -6,11 +6,10 @@ @@ -6,11 +6,10 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
namespace SharpServerTools.Forms
{
/// <summary>
/// An IRebuildable can be asked to rebuild its Node tree
/// </summary>
@ -39,9 +38,9 @@ namespace SharpServerTools.Forms @@ -39,9 +38,9 @@ namespace SharpServerTools.Forms
/// </summary>
public class RebuildRequiredEventArgs: EventArgs
{
ArrayList rebuildNodes = new ArrayList();
List<IRebuildable> rebuildNodes = new List<IRebuildable>();
public IEnumerable Nodes {
public IEnumerable<IRebuildable> Nodes {
get {
return rebuildNodes;
}

21
src/Main/Base/Project/Src/Gui/Dialogs/WordCountDialog.cs

@ -6,7 +6,7 @@ @@ -6,7 +6,7 @@
// </file>
using System;
using System.Collections;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
@ -19,7 +19,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -19,7 +19,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{
public class WordCountDialog : BaseSharpDevelopForm
{
ArrayList items;
List<Report> items;
Report total;
internal class Report
@ -83,7 +83,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -83,7 +83,7 @@ namespace ICSharpCode.SharpDevelop.Gui
void startEvent(object sender, System.EventArgs e)
{
items = new ArrayList();
items = new List<Report>();
total = null;
switch (((ComboBox)ControlDictionary["locationComboBox"]).SelectedIndex) {
@ -180,7 +180,7 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -180,7 +180,7 @@ namespace ICSharpCode.SharpDevelop.Gui
}
internal class ReportComparer : IComparer
internal class ReportComparer : IComparer<Report>
{
int sortKey;
@ -189,22 +189,19 @@ namespace ICSharpCode.SharpDevelop.Gui @@ -189,22 +189,19 @@ namespace ICSharpCode.SharpDevelop.Gui
sortKey = SortKey;
}
public int Compare(object x, object y)
public int Compare(Report x, Report y)
{
Report xr = x as Report;
Report yr = y as Report;
if (x == null || y == null) return 1;
switch (sortKey) {
case 0: // files
return String.Compare(xr.name, yr.name);
return String.Compare(x.name, y.name);
case 1: // chars
return xr.chars.CompareTo(yr.chars);
return x.chars.CompareTo(y.chars);
case 2: // words
return xr.words.CompareTo(yr.words);
return x.words.CompareTo(y.words);
case 3: // lines
return xr.lines.CompareTo(yr.lines);
return x.lines.CompareTo(y.lines);
default:
return 1;
}

Loading…
Cancel
Save