[smuxi/experiments/msg_buffer_tool: 3/3] WIP3



commit da01e1f5a5506017202c0836eb1e0241ec685a31
Author: Mirco Bauer <meebey meebey net>
Date:   Thu Mar 6 18:25:22 2014 +0100

    WIP3

 src/Engine-MessageBuffer/Main.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/Engine-MessageBuffer/Main.cs b/src/Engine-MessageBuffer/Main.cs
index 5222286..4c6aafb 100644
--- a/src/Engine-MessageBuffer/Main.cs
+++ b/src/Engine-MessageBuffer/Main.cs
@@ -104,6 +104,7 @@ namespace Smuxi.Engine
         static void CatAction(string action, IEnumerable<string> args)
         {
             var dbFormat = "";
+            var parameters = new List<string>();
             var parser = new OptionSet() {
                 { "format=", _("Database format (valid values: auto, db4o, sqlite)"),
                     val => {
@@ -113,10 +114,10 @@ namespace Smuxi.Engine
                         dbFormat = val;
                     }
                 },
-                /*
                 { "<>",
                     val => {
                         if (!val.StartsWith("-")) {
+                            parameters.Add(val);
                             return;
                         }
                         throw new OptionException(
@@ -126,7 +127,6 @@ namespace Smuxi.Engine
                         );
                     }
                 }
-                */
             };
             parser.Add("h|help", _("Show this help"),
                 val => {
@@ -145,7 +145,7 @@ namespace Smuxi.Engine
                 }
             );
 
-            var parameters = parser.Parse(args);
+            parser.Parse(args);
             if (parameters.Count < 1) {
                 throw new OptionException(
                     _("db_path is required"),
@@ -160,6 +160,7 @@ namespace Smuxi.Engine
         {
             var sourceFormat = "";
             var destinationFormat = "";
+            var parameters = new List<string>();
             var parser = new OptionSet() {
                 { "source-format=", _("Source format (valid values: auto, db4o, sqlite)"),
                     val => {
@@ -177,10 +178,10 @@ namespace Smuxi.Engine
                         destinationFormat = val;
                     }
                 },
-                /*
                 { "<>",
                     val => {
                         if (!val.StartsWith("-")) {
+                            parameters.Add(val);
                             return;
                         }
                         throw new OptionException(
@@ -190,7 +191,6 @@ namespace Smuxi.Engine
                         );
                     }
                 }
-                */
             };
             parser.Add("h|help", _("Show this help"),
                 val => {
@@ -210,7 +210,7 @@ namespace Smuxi.Engine
                 }
             );
 
-            var parameters = parser.Parse(args);
+            parser.Parse(args);
             if (parameters.Count < 2) {
                 throw new OptionException(
                     _("source_db and destination_db are required"),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]