diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..1ff0c42
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,63 @@
+###############################################################################
+# Set default behavior to automatically normalize line endings.
+###############################################################################
+* text=auto
+
+###############################################################################
+# Set default behavior for command prompt diff.
+#
+# This is need for earlier builds of msysgit that does not have it on by
+# default for csharp files.
+# Note: This is only used by command line
+###############################################################################
+#*.cs diff=csharp
+
+###############################################################################
+# Set the merge driver for project and solution files
+#
+# Merging from the command prompt will add diff markers to the files if there
+# are conflicts (Merging from VS is not affected by the settings below, in VS
+# the diff markers are never inserted). Diff markers may cause the following
+# file extensions to fail to load in VS. An alternative would be to treat
+# these files as binary and thus will always conflict and require user
+# intervention with every merge. To do so, just uncomment the entries below
+###############################################################################
+#*.sln merge=binary
+#*.csproj merge=binary
+#*.vbproj merge=binary
+#*.vcxproj merge=binary
+#*.vcproj merge=binary
+#*.dbproj merge=binary
+#*.fsproj merge=binary
+#*.lsproj merge=binary
+#*.wixproj merge=binary
+#*.modelproj merge=binary
+#*.sqlproj merge=binary
+#*.wwaproj merge=binary
+
+###############################################################################
+# behavior for image files
+#
+# image files are treated as binary by default.
+###############################################################################
+#*.jpg binary
+#*.png binary
+#*.gif binary
+
+###############################################################################
+# diff behavior for common document formats
+#
+# Convert binary document formats to text before diffing them. This feature
+# is only available from the command line. Turn it on by uncommenting the
+# entries below.
+###############################################################################
+#*.doc diff=astextplain
+#*.DOC diff=astextplain
+#*.docx diff=astextplain
+#*.DOCX diff=astextplain
+#*.dot diff=astextplain
+#*.DOT diff=astextplain
+#*.pdf diff=astextplain
+#*.PDF diff=astextplain
+#*.rtf diff=astextplain
+#*.RTF diff=astextplain
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..3c4efe2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,261 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+project.fragment.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+#*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.jfm
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# CodeRush
+.cr/
+
+# Python Tools for Visual Studio (PTVS)
+__pycache__/
+*.pyc
\ No newline at end of file
diff --git a/Console.Waterworks/CW_Console/App.config b/Console.Waterworks/CW_Console/App.config
new file mode 100644
index 0000000..9d2c7ad
--- /dev/null
+++ b/Console.Waterworks/CW_Console/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/Console.Waterworks/CW_Console/CW_Console.csproj b/Console.Waterworks/CW_Console/CW_Console.csproj
new file mode 100644
index 0000000..25c60e4
--- /dev/null
+++ b/Console.Waterworks/CW_Console/CW_Console.csproj
@@ -0,0 +1,60 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {E26D7001-2A4E-4618-8C27-8BF504993EE9}
+ Exe
+ CW_Console
+ CW_Console
+ v4.7
+ 512
+ true
+
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {d1354760-61f7-4aee-8d6f-e78a463ee3c9}
+ Console.Waterworks
+
+
+
+
\ No newline at end of file
diff --git a/Console.Waterworks/CW_Console/ConsoleCommands.cs b/Console.Waterworks/CW_Console/ConsoleCommands.cs
new file mode 100644
index 0000000..8cc8b86
--- /dev/null
+++ b/Console.Waterworks/CW_Console/ConsoleCommands.cs
@@ -0,0 +1,106 @@
+using Console.Waterworks;
+using Console.Waterworks.Attributes;
+using System;
+
+namespace CW_Console
+{
+ public class ConsoleCommands
+ {
+ [ListCommand()]
+ [Description("Displays the Help section at run-time")]
+ [Parameters("None")]
+ [Usage("CW_Console> Help")]
+ public static string Help()
+ {
+ CW_Liaison liaison = new CW_Liaison();
+ return liaison.RequestHelpDocumentation("CW_Console");
+ }
+
+ [ListCommand()]
+ [Description("Outputs to the console the command has been completed.")]
+ [Parameters("None")]
+ [Usage("CW_Console> Command1")]
+ public static string Command1() => "Command1 has completed";
+
+ [ListCommand()]
+ [Description("Repeats back to the user the string they entered.")]
+ [Parameters(" input")]
+ [Usage("CW_Console> Command2 \"Hello, World.\"")]
+ public static string Command2(string input) => $"Command2 has completed... {input} was entered";
+
+ [ListCommand()]
+ [Description("Repeats back to the user what int they entered.")]
+ [Parameters(" int1")]
+ [Usage("CW_Console> Command3 31")]
+ public static string Command3(int input) => $"Command3 has completed... The number {input} was entered";
+
+ [ListCommand()]
+ [Description("Takes the two ints and adds them together.")]
+ [Parameters(" int, int2")]
+ [Usage("CW_Console> Command4 31 10")]
+ public static string Command4(int int1, int int2) => $"Command4 has completed... {int1} and {int2} was entered and make {int1 + int2} when added together";
+
+ [ListCommand()]
+ [Description("Take the int and double and adds them together.")]
+ [Parameters(" int1, double1")]
+ [Usage("CW_Console> Command5 31 25.4")]
+ public static string Command5(int int1, double double1) => $"Command5 has completed... {int1} and {double1} was entered and make {int1 + double1} when added together";
+
+ [ListCommand()]
+ [Description("Terminates the program.")]
+ [Parameters("None")]
+ [Usage("CW_Console> Quit")]
+ public static void Quit() => Environment.Exit(-1);
+
+ #region Alias-Methods
+
+ /*
+ * A NOTE ABOUT ALIAS-METHODS - DELETE AFTER READING
+ * =========================================================
+ * These methods are shorthand versions of the ones above.
+ * For the most part, this is a hack.
+ * But, it is a useful one.
+ * When new users start using your console program, they need help getting started.
+ * This is why I recommend using descriptive names for your command-methods.
+ * But, when your users become more familiar with the program, they will want terser commands.
+ * They will no longer need their hand holding. This is where these alias-commands come in.
+ */
+
+ [ListCommand(false)] // change to true or delete "false" for it to show at run-time.
+ [Description("Alias for Command1. See Command1 for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> c1")]
+ public static string c1() => Command1();
+
+ [ListCommand(false)]
+ [Description("Alias for Command2. See Command2 for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> c2 \"Hello, World.\"")]
+ public static string c2(string input) => Command2(input);
+
+ [ListCommand(false)]
+ [Description("Alias for Command3. See Command3 for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> c3 78")]
+ public static string c3(int input) => Command3(input);
+
+ [ListCommand(false)]
+ [Description("Alias for Command4. See Command4 for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> c4 24 67")]
+ public static string c4(int int1, int int2) => Command4(int1, int2);
+
+ [ListCommand(false)]
+ [Description("Alias for Command5. See Command5 for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> c5 12 46.3")]
+ public static string c5(int int1, double double1) => Command5(int1, double1);
+
+ [ListCommand(false)]
+ [Description("Alias for Quit. See Quit for details.")]
+ [Parameters("None")]
+ [Usage("CW_Console> quit")]
+ public static void quit() => Quit();
+ #endregion
+ }
+}
diff --git a/Console.Waterworks/CW_Console/Program.cs b/Console.Waterworks/CW_Console/Program.cs
new file mode 100644
index 0000000..8c1d3cc
--- /dev/null
+++ b/Console.Waterworks/CW_Console/Program.cs
@@ -0,0 +1,15 @@
+using Console.Waterworks;
+
+namespace CW_Console
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ CW_Liaison bob = new CW_Liaison();
+ bob.Run("CW_Console", true);
+ // That is it. You are done here.
+ // Head over to ConsoleCommands.cs to begin adding features...
+ }
+ }
+}
diff --git a/Console.Waterworks/CW_Console/Properties/AssemblyInfo.cs b/Console.Waterworks/CW_Console/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..a104d39
--- /dev/null
+++ b/Console.Waterworks/CW_Console/Properties/AssemblyInfo.cs
@@ -0,0 +1,39 @@
+using System.Resources;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("CW_Console")]
+[assembly: AssemblyDescription("This is the console program for testing the Console.Waterworks Nuget package.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("Craig Oates")]
+[assembly: AssemblyProduct("CW_Console")]
+[assembly: AssemblyCopyright("Copyright © 2017 Craig Oates")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("e26d7001-2a4e-4618-8c27-8bf504993ee9")]
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// 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("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: NeutralResourcesLanguage("en-GB")]
+
diff --git a/Console.Waterworks/Console.Waterworks.sln b/Console.Waterworks/Console.Waterworks.sln
new file mode 100644
index 0000000..dd94c8a
--- /dev/null
+++ b/Console.Waterworks/Console.Waterworks.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26730.16
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Console.Waterworks", "Console.Waterworks\Console.Waterworks.csproj", "{D1354760-61F7-4AEE-8D6F-E78A463EE3C9}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CW_Console", "CW_Console\CW_Console.csproj", "{E26D7001-2A4E-4618-8C27-8BF504993EE9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {D1354760-61F7-4AEE-8D6F-E78A463EE3C9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D1354760-61F7-4AEE-8D6F-E78A463EE3C9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D1354760-61F7-4AEE-8D6F-E78A463EE3C9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D1354760-61F7-4AEE-8D6F-E78A463EE3C9}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E26D7001-2A4E-4618-8C27-8BF504993EE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E26D7001-2A4E-4618-8C27-8BF504993EE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E26D7001-2A4E-4618-8C27-8BF504993EE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E26D7001-2A4E-4618-8C27-8BF504993EE9}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BC405CAC-EBE7-4A72-AEE1-93C99AE240E3}
+ EndGlobalSection
+EndGlobal
diff --git a/Console.Waterworks/Console.Waterworks/Assistants/CoOrdinatorAssistant.cs b/Console.Waterworks/Console.Waterworks/Assistants/CoOrdinatorAssistant.cs
new file mode 100644
index 0000000..2f661cb
--- /dev/null
+++ b/Console.Waterworks/Console.Waterworks/Assistants/CoOrdinatorAssistant.cs
@@ -0,0 +1,52 @@
+using Console.Waterworks.Constants;
+using Console.Waterworks.Loggers;
+using Console.Waterworks.Specialists;
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+
+namespace Console.Waterworks.Assistants
+{
+ class CoOrdinatorAssistant
+ {
+ internal void SetConsoleTitle(CW_Logger logger, ProgramInfoSpecialist progInfoSpec, ConsoleIOSpecialist consoleSpec)
+ {
+ logger.LogInfoMessage("Attempting to set console title..");
+ var title = progInfoSpec.GetProductName();
+ if (!string.IsNullOrEmpty(title))
+ {
+ consoleSpec.SetConsoleTitle(title);
+ logger.LogSuccessMessage("Console title is now set");
+ }
+ else
+ logger.LogErrorMessage("Unable to determine the program's title. Check the manifest file to make sure it has been set");
+ }
+
+ internal void OutputProgramInfo(CW_Logger logger, ProgramInfoSpecialist progInfoSpec, ConsoleIOSpecialist consoleSpec)
+ {
+ logger.LogInfoMessage("Attempting to retrieve program information..");
+ List programInfo = progInfoSpec.GatherProgramInfomation();
+ logger.LogInfoMessage($"Found {programInfo.Count} out of {CW_Constants.PROGRAM_INFO_PROPERTIES_COUNT} properties");
+ logger.LogInfoMessage($"Writing program properties to console..");
+ consoleSpec.WriteProgramInfo(programInfo);
+ }
+
+
+ internal void LogCommandGatheringAttempt(List commandClasses, Dictionary>> commandLibraries, CW_Logger logger)
+ {
+ logger.LogInfoMessage($"Found {commandClasses.Count} command class(es)..");
+ logger.LogInfoMessage($"Found {GetFoundCommandsTotal(commandLibraries)} command(s)..");
+ logger.LogInfoMessage($"Found [{CW_Constants.COMMAND_CLASS_NAME}] class: { commandLibraries.ContainsKey(CW_Constants.COMMAND_CLASS_NAME)}");
+ logger.LogNoteMessage($"WaterWorks is only looking for the methods in the [{CW_Constants.COMMAND_CLASS_NAME}] class in the specified namespace. Everything else will be ignored");
+ logger.LogInfoMessage("Program is now initialised and awaiting input from the user. You are welcome ;-)");
+ }
+
+ internal int GetFoundCommandsTotal(Dictionary>> commandLibraries)
+ {
+ int total = 0;
+ foreach (var currentClass in commandLibraries.Values)
+ total += currentClass.Count;
+ return total;
+ }
+ }
+}
diff --git a/Console.Waterworks/Console.Waterworks/Assistants/CommandsAssistant.cs b/Console.Waterworks/Console.Waterworks/Assistants/CommandsAssistant.cs
new file mode 100644
index 0000000..cfa76cf
--- /dev/null
+++ b/Console.Waterworks/Console.Waterworks/Assistants/CommandsAssistant.cs
@@ -0,0 +1,105 @@
+using Console.Waterworks.Models;
+using Console.Waterworks.Specialists;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+
+namespace Console.Waterworks.Assistants
+{
+ class CommandsAssistant
+ {
+ internal bool ValidateClass(Command command, Dictionary>> commandLibraries)
+ => (commandLibraries.ContainsKey(command.ClassName)) ? true : false;
+
+ internal bool ValidateCommand(Command command, Dictionary>> commandLibraries)
+ {
+ var methodDict = commandLibraries[command.ClassName];
+ return (methodDict.ContainsKey(command.Name)) ? true : false;
+ }
+
+ internal string ExecuteBadCommandProcedure(Command command, ConsoleIOSpecialist consoleSpec)
+ {
+ consoleSpec.WriteErrorSuffix();
+ return $"The command \'{command.Name}\' is not recognised.";
+ }
+
+ internal bool ValidateParamArguments(Command command, List paramInfoList)
+ {
+ var requiredParams = paramInfoList.Where(p => p.IsOptional == false);
+ var optionalParams = paramInfoList.Where(p => p.IsOptional == true);
+ int requiredCount = requiredParams.Count();
+ int optionalCount = optionalParams.Count();
+ int providedCount = command.Arguments.Count();
+ return (requiredCount > providedCount) ? false : true;
+ }
+
+ internal string ExecuteMissingArgumentProcedure(Command command, List paramInfoList, ConsoleIOSpecialist consoleSpec)
+ {
+ var requiredParams = paramInfoList.Where(p => p.IsOptional == false);
+ var optionalParams = paramInfoList.Where(p => p.IsOptional == true);
+ int requiredCount = requiredParams.Count();
+ int optionalCount = optionalParams.Count();
+ int providedCount = command.Arguments.Count();
+ return $"Missing required argument. {requiredCount} required, {optionalCount} optional, {providedCount} provided.";
+ }
+
+ internal List