diff --git a/Browser/ModuleListPanel.cs b/Browser/ModuleListPanel.cs index 3ff01e31..29e8c8dd 100644 --- a/Browser/ModuleListPanel.cs +++ b/Browser/ModuleListPanel.cs @@ -118,6 +118,8 @@ private void ActAddExecute(object sender, EventArgs e) foreach (ListViewItem item in listView1.SelectedItems) { string name = item.Text.ToUpperInvariant(); + + // TODO: bad performance. improve later. List list = new List(File.ReadAllLines(index)); if (list.Contains(name)) { @@ -138,6 +140,8 @@ private void ActRemoveExecute(object sender, EventArgs e) foreach (ListViewItem item in listView1.SelectedItems) { string name = item.Text.ToUpperInvariant(); + + // TODO: bad performance. improve later. List list = new List(File.ReadAllLines(index)); if (!list.Contains(name)) { diff --git a/Compiler/MainForm.cs b/Compiler/MainForm.cs index 4aa6826f..b0873737 100644 --- a/Compiler/MainForm.cs +++ b/Compiler/MainForm.cs @@ -75,8 +75,7 @@ private void ActCompileExecute(object sender, EventArgs e) { IDockContent content = dockPanel1.ActiveDocument; DocumentPanel doc = (DocumentPanel)content; - List fileList = new List(1) { doc.FileName }; - Compiler.Compile(fileList); + Compiler.Compile(new [] { doc.FileName }); } private void ActCompileUpdate(object sender, EventArgs e) diff --git a/SharpSnmpLib/GetRequestPdu.cs b/SharpSnmpLib/GetRequestPdu.cs index 687bfce4..a87bf3fa 100644 --- a/SharpSnmpLib/GetRequestPdu.cs +++ b/SharpSnmpLib/GetRequestPdu.cs @@ -45,7 +45,6 @@ public GetRequestPdu(int requestId, ErrorCode errorStatus, int errorIndex, IList ErrorIndex = new Integer32(errorIndex); Variables = variables; _varbindSection = Variable.Transform(variables); - ////_raw = ByteTool.ParseItems(_sequenceNumber, _errorStatus, _errorIndex, _varbindSection); } /// diff --git a/SharpSnmpLib/Messaging/SnmpMessageExtension.cs b/SharpSnmpLib/Messaging/SnmpMessageExtension.cs index fed3dd14..c7377e6c 100644 --- a/SharpSnmpLib/Messaging/SnmpMessageExtension.cs +++ b/SharpSnmpLib/Messaging/SnmpMessageExtension.cs @@ -63,7 +63,7 @@ internal static Sequence PackMessage(VersionCode version, ISegment header, ISegm throw new ArgumentNullException("privacy"); } - List collection = new List(4) + ISnmpData[] collection = new ISnmpData[4] { new Integer32((int)version), header.GetData(version), @@ -95,7 +95,7 @@ internal static Sequence PackMessage(VersionCode version, ISegment header, Secur throw new ArgumentNullException("privacy"); } - List collection = new List(4) + ISnmpData[] collection = new ISnmpData[4] { new Integer32((int)version), header.GetData(version), diff --git a/SharpSnmpLib/Variable.cs b/SharpSnmpLib/Variable.cs index 48f2dfa6..2bc3e20e 100644 --- a/SharpSnmpLib/Variable.cs +++ b/SharpSnmpLib/Variable.cs @@ -132,6 +132,7 @@ internal static IList Transform(Sequence varbindSection) /// internal static Sequence Transform(IList variables) { + // TODO: use IEnumerable instead of IList. if (variables == null) { throw new ArgumentNullException("variables");