From cc30d95ac2750a298b6b6bbefd515226f83d3558 Mon Sep 17 00:00:00 2001 From: "Aaron A. Kelley" Date: Wed, 16 Mar 2016 10:37:34 -0400 Subject: [PATCH 1/3] Bump version number to 0.9.2. --- ssdumpConsole/Properties/AssemblyInfo.cs | 4 ++-- ssdumpGUI/Properties/AssemblyInfo.cs | 4 ++-- ssdumpLibrary/DumpProcessor.cs | 2 +- ssdumpLibrary/Properties/AssemblyInfo.cs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ssdumpConsole/Properties/AssemblyInfo.cs b/ssdumpConsole/Properties/AssemblyInfo.cs index fe142a2..07681d0 100644 --- a/ssdumpConsole/Properties/AssemblyInfo.cs +++ b/ssdumpConsole/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.1.0")] -[assembly: AssemblyFileVersion("0.9.1.0")] +[assembly: AssemblyVersion("0.9.2.0")] +[assembly: AssemblyFileVersion("0.9.2.0")] diff --git a/ssdumpGUI/Properties/AssemblyInfo.cs b/ssdumpGUI/Properties/AssemblyInfo.cs index 447360c..d92bdaf 100644 --- a/ssdumpGUI/Properties/AssemblyInfo.cs +++ b/ssdumpGUI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.1.0")] -[assembly: AssemblyFileVersion("0.9.1.0")] +[assembly: AssemblyVersion("0.9.2.0")] +[assembly: AssemblyFileVersion("0.9.2.0")] diff --git a/ssdumpLibrary/DumpProcessor.cs b/ssdumpLibrary/DumpProcessor.cs index 70e027f..61d6594 100644 --- a/ssdumpLibrary/DumpProcessor.cs +++ b/ssdumpLibrary/DumpProcessor.cs @@ -20,7 +20,7 @@ public class DumpProcessor /// /// Program version. /// - public static readonly string ProgramVersion = "0.9.1"; + public static readonly string ProgramVersion = "0.9.2"; public string Host { get; set; } public string Username { get; set; } diff --git a/ssdumpLibrary/Properties/AssemblyInfo.cs b/ssdumpLibrary/Properties/AssemblyInfo.cs index 7730980..6cf758d 100644 --- a/ssdumpLibrary/Properties/AssemblyInfo.cs +++ b/ssdumpLibrary/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.1.0")] -[assembly: AssemblyFileVersion("0.9.1.0")] +[assembly: AssemblyVersion("0.9.2.0")] +[assembly: AssemblyFileVersion("0.9.2.0")] From 0fea8f084b7aeb6b80ac979ae27b87aad1c97c4e Mon Sep 17 00:00:00 2001 From: "Aaron A. Kelley" Date: Thu, 17 Mar 2016 08:47:43 -0400 Subject: [PATCH 2/3] Bugfix: Console was not passing database name or table names to library. --- ssdumpConsole/Program.cs | 39 +++++++++++++++++-------- ssdumpConsole/ssdumpConsole.csproj.user | 6 ++++ 2 files changed, 33 insertions(+), 12 deletions(-) create mode 100644 ssdumpConsole/ssdumpConsole.csproj.user diff --git a/ssdumpConsole/Program.cs b/ssdumpConsole/Program.cs index 55b2bbd..3be5275 100644 --- a/ssdumpConsole/Program.cs +++ b/ssdumpConsole/Program.cs @@ -72,6 +72,8 @@ static void Main(string[] args) } else { + processor.DatabaseName = WhichDatabases(extras)[0]; + processor.Tables = WhichTables(extras); processor.Execute(); } } @@ -83,27 +85,40 @@ static void Main(string[] args) } /// - /// Write scripts to console. + /// Figure out which databases to dump. /// - /// Collection of scripts to be written - private static void WriteScripts(StringCollection scripts) + /// Unparsed command-line options + /// List of databases to dump + private static List WhichDatabases(List extras) { - foreach (string script in scripts) - { - Console.WriteLine(script); - } + List databases = new List(); + + // First extra is database to dump. + databases.Add(extras[0]); + + return databases; } /// - /// Write scripts to console. + /// Figure out which tables to dump. /// - /// Collection of scripts to be written - private static void WriteScripts(IEnumerable scripts) + /// Unparsed command-line options + /// List of tables to dump + private static List WhichTables(List extras) { - foreach (string script in scripts) + List tables = new List(); + + // It will be an empty list (meaning all tables) unless... + if (extras.Count > 1) { - Console.WriteLine(script); + // Everything except first value is a table to dump. + for (int index = 1; index < extras.Count; index++) + { + tables.Add(extras[index]); + } } + + return tables; } /// diff --git a/ssdumpConsole/ssdumpConsole.csproj.user b/ssdumpConsole/ssdumpConsole.csproj.user new file mode 100644 index 0000000..d6062c3 --- /dev/null +++ b/ssdumpConsole/ssdumpConsole.csproj.user @@ -0,0 +1,6 @@ + + + + --host=dmsql --include-users --no-data DMWebService + + \ No newline at end of file From fb83d3d0b14b8bc01e869e2163c61c7f7c3e922e Mon Sep 17 00:00:00 2001 From: "Aaron A. Kelley" Date: Thu, 17 Mar 2016 08:47:57 -0400 Subject: [PATCH 3/3] Removing an extra blank line. --- ssdumpLibrary/DumpProcessor.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/ssdumpLibrary/DumpProcessor.cs b/ssdumpLibrary/DumpProcessor.cs index 70e027f..6a6e27a 100644 --- a/ssdumpLibrary/DumpProcessor.cs +++ b/ssdumpLibrary/DumpProcessor.cs @@ -62,7 +62,6 @@ public DumpProcessor() /// public void Execute() { - // Set up server object and connection options. Server server = new Server(Host); server.ConnectionContext.ApplicationName = ProgramName + " v" + ProgramVersion;