diff --git a/product/roundhouse.console/packages.config b/product/roundhouse.console/packages.config index 53aa4530..edb053b0 100644 --- a/product/roundhouse.console/packages.config +++ b/product/roundhouse.console/packages.config @@ -2,7 +2,7 @@ - + diff --git a/product/roundhouse.console/roundhouse.console.csproj b/product/roundhouse.console/roundhouse.console.csproj index 038aa008..bb4d7da1 100644 --- a/product/roundhouse.console/roundhouse.console.csproj +++ b/product/roundhouse.console/roundhouse.console.csproj @@ -81,9 +81,9 @@ ..\..\packages\Iesi.Collections.3.3.2.4000\lib\Net35\Iesi.Collections.dll - - False - ..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll + + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll + True diff --git a/product/roundhouse.tasks/packages.config b/product/roundhouse.tasks/packages.config index 53aa4530..edb053b0 100644 --- a/product/roundhouse.tasks/packages.config +++ b/product/roundhouse.tasks/packages.config @@ -2,7 +2,7 @@ - + diff --git a/product/roundhouse.tasks/roundhouse.tasks.csproj b/product/roundhouse.tasks/roundhouse.tasks.csproj index f831e44a..c984e5cd 100644 --- a/product/roundhouse.tasks/roundhouse.tasks.csproj +++ b/product/roundhouse.tasks/roundhouse.tasks.csproj @@ -75,9 +75,9 @@ ..\..\packages\Iesi.Collections.3.3.2.4000\lib\Net35\Iesi.Collections.dll - + False - ..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll True diff --git a/product/roundhouse.tests.integration/packages.config b/product/roundhouse.tests.integration/packages.config index 69083a52..cd8d96ea 100644 --- a/product/roundhouse.tests.integration/packages.config +++ b/product/roundhouse.tests.integration/packages.config @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/product/roundhouse.tests.integration/roundhouse.tests.integration.csproj b/product/roundhouse.tests.integration/roundhouse.tests.integration.csproj index fe458dc6..74fa3fc6 100644 --- a/product/roundhouse.tests.integration/roundhouse.tests.integration.csproj +++ b/product/roundhouse.tests.integration/roundhouse.tests.integration.csproj @@ -86,9 +86,8 @@ ..\..\packages\Iesi.Collections.3.3.2.4000\lib\Net35\Iesi.Collections.dll - - False - ..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll + + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll False diff --git a/product/roundhouse.tests/infrastructure/filesystem/WindowsFileSystemAccessSpecs.cs b/product/roundhouse.tests/infrastructure/filesystem/DotNetFileSystemAccessSpecs.cs similarity index 89% rename from product/roundhouse.tests/infrastructure/filesystem/WindowsFileSystemAccessSpecs.cs rename to product/roundhouse.tests/infrastructure/filesystem/DotNetFileSystemAccessSpecs.cs index f814ac0c..1bf2f1b7 100644 --- a/product/roundhouse.tests/infrastructure/filesystem/WindowsFileSystemAccessSpecs.cs +++ b/product/roundhouse.tests/infrastructure/filesystem/DotNetFileSystemAccessSpecs.cs @@ -9,16 +9,16 @@ namespace roundhouse.tests.infrastructure.filesystem using developwithpassion.bdd.mbunit.standard; using developwithpassion.bdd.mbunit.standard.observations; - public class WindowsFileSystemAccessSpecs + public class DotNetFileSystemAccessSpecs { - public abstract class concern_for_file_system : observations_for_a_sut_with_a_contract + public abstract class concern_for_file_system : observations_for_a_sut_with_a_contract { protected static object result; context c = () => { }; } - [Concern(typeof(WindowsFileSystemAccess))] + [Concern(typeof(DotNetFileSystemAccess))] public class when_reading_files_with_different_formats : concern_for_file_system { protected static string utf8_file; diff --git a/product/roundhouse.tests/packages.config b/product/roundhouse.tests/packages.config index 5c531633..346b1223 100644 --- a/product/roundhouse.tests/packages.config +++ b/product/roundhouse.tests/packages.config @@ -1,6 +1,6 @@  - + \ No newline at end of file diff --git a/product/roundhouse.tests/roundhouse.tests.csproj b/product/roundhouse.tests/roundhouse.tests.csproj index ebfedf80..2a3d3216 100644 --- a/product/roundhouse.tests/roundhouse.tests.csproj +++ b/product/roundhouse.tests/roundhouse.tests.csproj @@ -77,7 +77,7 @@ ..\..\lib\developwithpassion.bdd\developwithpassion.bdd.dll - ..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll False @@ -122,7 +122,7 @@ - + diff --git a/product/roundhouse/infrastructure.app/ApplicationConfiguraton.cs b/product/roundhouse/infrastructure.app/ApplicationConfiguraton.cs index 73074383..d026062e 100644 --- a/product/roundhouse/infrastructure.app/ApplicationConfiguraton.cs +++ b/product/roundhouse/infrastructure.app/ApplicationConfiguraton.cs @@ -175,7 +175,7 @@ private static InversionContainer build_items_for_container(ConfigurationPropert ObjectFactory.Configure(cfg => { cfg.For().Singleton().Use(configuration_property_holder); - cfg.For().Singleton().Use(); + cfg.For().Singleton().Use(); cfg.For().Singleton().Use(context => DatabaseBuilder.build(context.GetInstance(), configuration_property_holder)); cfg.For().Singleton().Use(context => KnownFoldersBuilder.build(context.GetInstance(), configuration_property_holder)); cfg.For().Singleton().Use(); diff --git a/product/roundhouse/infrastructure.app/logging/log4net.config.xml b/product/roundhouse/infrastructure.app/logging/log4net.config.xml index 91c02048..c4a508cf 100644 --- a/product/roundhouse/infrastructure.app/logging/log4net.config.xml +++ b/product/roundhouse/infrastructure.app/logging/log4net.config.xml @@ -1,23 +1,23 @@  - + - + - + - + - + diff --git a/product/roundhouse/infrastructure/filesystem/WindowsFileSystemAccess.cs b/product/roundhouse/infrastructure/filesystem/DotNetFileSystemAccess.cs similarity index 91% rename from product/roundhouse/infrastructure/filesystem/WindowsFileSystemAccess.cs rename to product/roundhouse/infrastructure/filesystem/DotNetFileSystemAccess.cs index c46c3dbb..8a9ccbf1 100644 --- a/product/roundhouse/infrastructure/filesystem/WindowsFileSystemAccess.cs +++ b/product/roundhouse/infrastructure/filesystem/DotNetFileSystemAccess.cs @@ -13,8 +13,10 @@ namespace roundhouse.infrastructure.filesystem /// /// All file system access code comes through here /// - public sealed class WindowsFileSystemAccess : FileSystemAccess + public sealed class DotNetFileSystemAccess : FileSystemAccess { + private static readonly bool is_running_on_mono = Type.GetType("Mono.Runtime") != null; + #region File /// @@ -108,9 +110,13 @@ public void file_copy_unsafe(string source_file_name, string destination_file_na { Log.bound_to(this).log_a_debug_event_containing("Attempting to copy from \"{0}\" to \"{1}\".", source_file_name, destination_file_name); //Private Declare Function apiCopyFile Lib "kernel32" Alias "CopyFileA" _ - int success = CopyFileA(source_file_name, destination_file_name, overwrite_the_existing_file ? 0 : 1); - - //File.Copy(source_file_name, destination_file_name, overwrite_the_existing_file); + if (is_running_on_mono) + { + File.Copy(source_file_name, destination_file_name, overwrite_the_existing_file); + } + else { + int success = CopyFileA(source_file_name, destination_file_name, overwrite_the_existing_file ? 0 : 1); + } } [DllImport("kernel32")] @@ -357,20 +363,20 @@ public string[] get_all_file_name_strings_in(string directory) public string[] get_all_file_name_strings_in(string directory, string pattern) { string[] returnList = Directory.GetFiles(directory, pattern); - return returnList.OrderBy(get_file_name_from).ToArray(); + return returnList.OrderBy(get_file_name_from).ToArray(); } - /// - /// Gets a list of all files inside of an existing directory, includes files in subdirectories also - /// - /// Path to the directory - /// Pattern or extension - /// A list of files inside of an existing directory - public string[] get_all_file_name_strings_recurevly_in(string directory, string pattern) - { - string[] returnList = Directory.GetFiles(directory, pattern, SearchOption.AllDirectories); - return returnList.OrderBy(get_file_name_from).ToArray(); - } + /// + /// Gets a list of all files inside of an existing directory, includes files in subdirectories also + /// + /// Path to the directory + /// Pattern or extension + /// A list of files inside of an existing directory + public string[] get_all_file_name_strings_recurevly_in(string directory, string pattern) + { + string[] returnList = Directory.GetFiles(directory, pattern, SearchOption.AllDirectories); + return returnList.OrderBy(get_file_name_from).ToArray(); + } #endregion @@ -399,6 +405,5 @@ public string combine_paths(params string[] paths) return combined_path; } - } } \ No newline at end of file diff --git a/product/roundhouse/packages.config b/product/roundhouse/packages.config index 53aa4530..edb053b0 100644 --- a/product/roundhouse/packages.config +++ b/product/roundhouse/packages.config @@ -2,7 +2,7 @@ - + diff --git a/product/roundhouse/roundhouse.csproj b/product/roundhouse/roundhouse.csproj index 1398842b..7f22f654 100644 --- a/product/roundhouse/roundhouse.csproj +++ b/product/roundhouse/roundhouse.csproj @@ -75,9 +75,9 @@ ..\..\packages\Iesi.Collections.3.3.2.4000\lib\Net35\Iesi.Collections.dll - + False - ..\..\packages\log4net.2.0.0\lib\net35-full\log4net.dll + ..\..\packages\log4net.2.0.3\lib\net35-full\log4net.dll True @@ -171,7 +171,7 @@ - +