From e18621fafaeceb6847ab8be91f0ffba155317bb6 Mon Sep 17 00:00:00 2001 From: inga-lovinde <52715130+inga-lovinde@users.noreply.github.com> Date: Tue, 6 Jul 2010 12:34:27 +0000 Subject: [PATCH] Slight refactoring in shallerdbprocessor --- ImportConsole/ShallerDBProcessor.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ImportConsole/ShallerDBProcessor.cs b/ImportConsole/ShallerDBProcessor.cs index d6288e7..739d0a9 100644 --- a/ImportConsole/ShallerDBProcessor.cs +++ b/ImportConsole/ShallerDBProcessor.cs @@ -147,7 +147,7 @@ namespace FLocal.ImportConsole { private readonly static DateTime UNIX = new DateTime(1970, 1, 1, 0, 0, 0); public static void processDB(string filename) { - List> inserts = new List>(); + Dictionary inserts = new Dictionary(); HashSet discussionsIds = new HashSet(); using(StreamReader reader = new StreamReader(filename)) { int i=0; @@ -207,7 +207,7 @@ namespace FLocal.ImportConsole { if(data.ContainsKey("Layer")) { layer = PostLayer.LoadById(int.Parse(data["Layer"])); } - inserts.Add(new KeyValuePair(postId, () => { + inserts[postId] = () => { if(postId == main || postId == localMain) { //first post in the thread string legacyBoardName; @@ -240,7 +240,7 @@ namespace FLocal.ImportConsole { } post.Reply(user, title, body, layer, date, postId); } - })); + }; Console.Write("+"); } } catch(Exception e) {