diff --git a/service/FileMover.sln b/service/FileMover.sln new file mode 100644 index 0000000..1a37892 --- /dev/null +++ b/service/FileMover.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.572 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileMover", "FileMover\FileMover.csproj", "{50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {23E144B8-FD76-4EA6-AA94-E7804D34438D} + EndGlobalSection +EndGlobal diff --git a/service/FileMover/App.config b/service/FileMover/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/service/FileMover/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/service/FileMover/Check.cs b/service/FileMover/Check.cs new file mode 100644 index 0000000..e29e174 --- /dev/null +++ b/service/FileMover/Check.cs @@ -0,0 +1,69 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using Topshelf; + +namespace DirCheck +{ + class Check + { + private FileSystemWatcher watcher; + private string sourceFolder; + private string destinationFolder; + + // custom constructor + public Check(string sourceFolder, string destinationFolder) + { + this.sourceFolder = sourceFolder; + this.destinationFolder = destinationFolder; + + watcher = new FileSystemWatcher(sourceFolder); + watcher.NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite; + } + + public void Start() + { + watcher.Created += OnChanged; + watcher.Changed += OnChanged; + watcher.Renamed += OnChanged; + + watcher.EnableRaisingEvents = true; + watcher.IncludeSubdirectories = true; + + Console.WriteLine("The service Check Directory started"); + } + + private void OnChanged(object sender, FileSystemEventArgs e) + { + Console.WriteLine("OnChangeEvent has is called"); + + string[] files = Directory.GetFiles(sourceFolder, "*.*", SearchOption.AllDirectories); + int count = files.Length; + + if (count > 100) + { + foreach (string file in Directory.GetFiles(sourceFolder, "*.*", SearchOption.AllDirectories)) + { + FileInfo fi = new FileInfo(file); + + if (fi.LastAccessTime < DateTime.Now.AddMinutes(-60)) + { + Console.WriteLine(file + " should move to: " + Path.Combine(destinationFolder, Path.GetFileName(file))); + File.Move(file, Path.Combine(destinationFolder, Path.GetFileName(file))); + } + } + } + } + + public void Stop() + { + Console.WriteLine("The Service Check Directory stopped"); + watcher.EnableRaisingEvents = false; + } + } +} \ No newline at end of file diff --git a/service/FileMover/FileGenerator.cs b/service/FileMover/FileGenerator.cs new file mode 100644 index 0000000..e09c2ed --- /dev/null +++ b/service/FileMover/FileGenerator.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Timers; +using DirCheck; +using Timer = System.Timers.Timer; + +namespace FileMover +{ + + /// + /// + /// + class FileGenerator + { + public void Run() + { + var timer = new System.Threading.Timer( + e => MyMethod(), + null, + TimeSpan.Zero, + TimeSpan.FromMinutes(0.1)); + } + + static void MyMethod() + { + int width = 40, height = 20; + + //bitmap + Bitmap bmp = new Bitmap(width, height); + + //random number + Random rand = new Random(); + + //create random pixels + for (int y = 0; y < height; y++) + { + for (int x = 0; x < width; x++) + { + //generate random ARGB value + int a = rand.Next(256); + int r = rand.Next(256); + int g = rand.Next(256); + int b = rand.Next(256); + + //set ARGB value + bmp.SetPixel(x, y, Color.FromArgb(a, r, g, b)); + } + } + + //save (write) random pixel image + bmp.Save(Program.sourceFolder + "\\RandomImage"+ DateTime.Now.Millisecond + ".bmp"); + Console.WriteLine("image saved! at " + DateTime.Now); + } + } +} diff --git a/service/FileMover/FileMover.csproj b/service/FileMover/FileMover.csproj new file mode 100644 index 0000000..52f94d8 --- /dev/null +++ b/service/FileMover/FileMover.csproj @@ -0,0 +1,62 @@ + + + + + Debug + AnyCPU + {50D3C54E-C8DD-46AB-AE35-CFCB1FE07ED5} + Exe + FileMover + FileMover + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + ..\packages\Topshelf.4.2.0\lib\net452\Topshelf.dll + + + + + + + + + + + + + + \ No newline at end of file diff --git a/service/FileMover/Program.cs b/service/FileMover/Program.cs new file mode 100644 index 0000000..e066a01 --- /dev/null +++ b/service/FileMover/Program.cs @@ -0,0 +1,53 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using FileMover; +using Topshelf; + +namespace DirCheck +{ + class Program + { + //public static string sourceFolder = @"C:\Users\Richard\Desktop\source"; + // fore tests: public static string sourceFolder = @"C:\Users\Hermeler\Desktop\source"; + public static string sourceFolder = @"C:\ATS\Images"; + // public static string destinationFolder = @"C:\Users\Richard\Desktop\destination"; + // public static string destinationFolder = @"C:\Users\Hermeler\Desktop\destination"; + public static string destinationFolder = @"E:\ATS\Images"; + + + + static void Main(string[] args) + { + // FileGenerator fileGenerator = new FileGenerator(); + // fileGenerator.Run(); + + var exitCode = HostFactory.Run(x => + { + x.Service(s => + { + s.ConstructUsing(check => new Check(sourceFolder, destinationFolder)); + s.WhenStarted(check => check.Start()); + s.WhenStopped(check => check.Stop()); + }); + + x.StartAutomatically(); // Start the service automatically + + // TODO: + // x.AddCommandLineDefinition("path", v => path = v); + // x.AddCommandLineDefinition("fileAmount", v => fileAmount = Int32.Parse(v)); + + x.RunAsLocalSystem(); + x.SetServiceName("DirCheck"); + x.SetDisplayName("Directory Check"); + x.SetDescription("Check directory and move files \nMAKE SURE 'E:/ATS/Images' IS AVAILABLE"); + }); + + + int exitCodeValue = (int)Convert.ChangeType(exitCode, exitCode.GetTypeCode()); + Environment.ExitCode = exitCodeValue; + } + } +} diff --git a/service/FileMover/Properties/AssemblyInfo.cs b/service/FileMover/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..955dcea --- /dev/null +++ b/service/FileMover/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +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("FileMover")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("FileMover")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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("50d3c54e-c8dd-46ab-ae35-cfcb1fe07ed5")] + +// 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")] diff --git a/service/FileMover/bin/Debug/FileMover.exe b/service/FileMover/bin/Debug/FileMover.exe new file mode 100644 index 0000000..27d7cd9 Binary files /dev/null and b/service/FileMover/bin/Debug/FileMover.exe differ diff --git a/service/FileMover/bin/Debug/FileMover.exe.config b/service/FileMover/bin/Debug/FileMover.exe.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/service/FileMover/bin/Debug/FileMover.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/service/FileMover/bin/Debug/FileMover.pdb b/service/FileMover/bin/Debug/FileMover.pdb new file mode 100644 index 0000000..161b903 Binary files /dev/null and b/service/FileMover/bin/Debug/FileMover.pdb differ diff --git a/service/FileMover/bin/Debug/Topshelf.dll b/service/FileMover/bin/Debug/Topshelf.dll new file mode 100644 index 0000000..0582f13 Binary files /dev/null and b/service/FileMover/bin/Debug/Topshelf.dll differ diff --git a/service/FileMover/bin/Debug/Topshelf.xml b/service/FileMover/bin/Debug/Topshelf.xml new file mode 100644 index 0000000..bb28fdd --- /dev/null +++ b/service/FileMover/bin/Debug/Topshelf.xml @@ -0,0 +1,1578 @@ + + + + Topshelf + + + + + A cache implementation that extends the capability of most dictionary style classes to + have a more complete set of methods commonly used in a dictionary scenario. + + The key type of the cache + The value type of the cache + + + + Sets the missing value provider used by the cache to create requested values that do not exist in the cache + + + + + Sets the callback that is called when a new value is added to the cache + + + + + Sets the callback that is called when a value is removed or replaced from the cache + + + + + Sets the callback that is called when a duplicate value is added to the cache + + + + + Specifies a selector that returns the key from a value which is used when a value is added to the cache + + + + + References a value in the cache, returning a newly created or existing value for the specified key, and + adding a new or replacing an existing value in the cache + + The key references the value + The value from the cache + + + + Get the value for the specified key + + The key referencing the value in the cache + The matching value if the key exists in the cache, otherwise an exception is thrown + + + + Get the value for the specified key, overriding the default missing value provider + + The key referencing the value in the cache + An overloaded missing value provider to create the value if it is not found in the cache + The matching value if the key exists in the cache, otherwise an exception is thrown + + + + Get a value for the specified key, if not found returns the specified default value + + The key referencing the value in the cache + The default value to return if the key is not found in the cache + The matching value if it exists in the cache, otherwise the default value + + + + Get a value for the specified key, if not found returns the specified default value + + The key referencing the value in the cache + The default value to return if the key is not found in the cache + The matching value if it exists in the cache, otherwise the default value + + + + Gets a value for the specified key if it exists + + The key referencing the value in the cache + The value if it exists in the cache, otherwise the default value + True if the item was in the cache, otherwise false + + + + Adds a value to the cache using the specified key. If the key already exists in the cache, an exception is thrown. + + The key referencing the value + The value + + + + Adds a value to the cache using the KeySelector to extract the key from the value. If the key already exists + in the cache, an exception is thrown. + + The value + + + + Remove an existing value from the cache + + The key referencing the value + + + + Remove an existing value from the cache, using the KeySelector to extract the key to find the value + + The value to remove + + + + Removes all items from the cache + + + + + Fills the cache from a list of values, using the KeySelector to extract the key for each value. + + + + + + Calls the callback with the value matching the specified key + + The key referencing the value + The callback to call + True if the value exists and the callback was called + + + + Calls the function with the value matching the specified key, returning the result of that function + + The result type of the function + The key references the value + The function to call + The default return value if the item does not exist in the cache + The return value of the function, or the defaultValue specified if the item does not exist in the cache + + + + Calls the function with the value matching the specified key, returning the result of that function + + The result type of the function + The key references the value + The function to call + The default return value if the item does not exist in the cache + The return value of the function, or the defaultValue specified if the item does not exist in the cache + + + + Constructs a cache for the specified generic type + + The generic type to close + + + + Constructs a cache for the specified generic type. + + The generic type to close + The implementation provider, which must close the generic type with the passed type + + + + A read-only view of a cache. Methods that are able to modify the cache contents are not + available in this reduced interface. Methods on this interface will NOT invoke a missing + item provider. + + + + + + + The number of items in the cache + + + + + Checks if the key exists in the cache + + The key to check + True if the key exists, otherwise false + + + + Checks if a value exists in the cache + + The value to check + True if the value exists, otherwise false + + + + Calls the specified callback with each value in the cache + + A callback that accepts the value for each item in the cache + + + + Calls the specified callback with each item in the cache + + A callback that accepts the key and value for each item in the cache + + + + Uses a predicate to scan the cache for a matching value + + The predicate to run against each value + True if a matching value exists, otherwise false + + + + Uses a predicate to scan the cache for a matching value + + The predicate to run against each value + The matching value + True if a matching value was found, otherwise false + + + + Gets all keys that are stored in the cache + + An array of every key in the dictionary + + + + Gets all values that are stored in the cache + + An array of every value in the dictionary + + + + Using the service configuration, the host builder will create the host + that will be ran by the service console. + + + + + Tools for parsing the command line + + + + + Gets the command line from the Environment.CommandLine, removing the application name if present + + The complete, unparsed command line that was specified when the program was executed + + + + Parses the command line + + The command line to parse + The command line elements that were found + + + + Parses the command line and matches any specified patterns + + The output type of the parser + The command line text + Used by the caller to add patterns and object generators + The elements that were found on the command line + + + + Used to configure the command line element parser + + The type of object returned as a result of the parse + + + + Adds a new pattern to the parser + + The pattern to match and return the resulting object + + + + Reports information about the configuration before configuring + so that corrections can be made without allocating resources, etc. + + + + + The disposition of the result, any Failure items will prevent + the configuration from completing. + + + + + The message associated with the result + + + + + The key associated with the result (chained if configurators are nested) + + + + + The value associated with the result + + + + + A selection of commonly-used Windows services. + + + + + The Microsoft Message Queue service. + + + + + The Microsoft SQL Server service. + + + + + The Internet Information Server service. + + + + + The Event Log service. + + + + + Sets additional text to be displayed before the built-in help text is displayed + + + + + + + Specifies a text resource to be loaded and displayed before the built-in system help text is displayed + + + The assembly containing the text resource + The name of the embedded resource + + + + Adds a dependency to the InstallBuilder (ignored otherwise) + + + + + Can configure/replace the input , returning the original + or a new . + + + + + Configures the host builder. + + The host builder. + The configured host builder. + + + + Specifies the name of the service as it should be displayed in the service control manager + + + + + + Specifies the name of the service as it is registered in the service control manager + + + + + + Specifies the description of the service that is displayed in the service control manager + + + + + + Specifies the service instance name that should be used when the service is registered + + + + + + Sets the amount of time to wait for the service to start before timing out. Default is 10 seconds. + + + + + + Sets the amount of time to wait for the service to stop before timing out. Default is 10 seconds. + + + + + + Enable pause and continue support for the service (default is disabled) + + + + + Enable support for service shutdown (signaled by the host OS) + + + + + Enabled support for the session changed event + + + + + Specifies the builder factory to use when the service is invoked + + + + + + Sets the service builder to use for creating the service + + + + + + Sets the environment builder to use for creating the service (defaults to Windows) + + + + + + Adds a a configurator for the host builder to the configurator + + + + + + Parses the command line options and applies them to the host configurator + + + + + Parses the command line options from the specified command line and applies them to the host configurator + + + + + + Adds a command line switch (--name) that can be either true or false. Switches are CASE SeNsITiVe + + The name of the switch, as it will appear on the command line + + + + + Adds a command line definition (-name:value) that can be specified. the name is case sensitive. If the + definition + + + + + + + Specifies a callback to be run when Topshelf encounters an exception while starting, running + or stopping. This callback does not replace Topshelf's default handling of any exceptions, and + is intended to allow for local cleanup, logging, etc. This is not required, and is only invoked + if a callback is provided. + + The action to run when an exception occurs. + + + + The policy that will be used when Topself detects an UnhandledException in the + application. The default policy is to log an error and to stop the service. + + + + + Implements a service recovery configurator and host builder configurator. + + + + + + + Configures the host builder. + + The host builder. + The configured host builder. + builder + + + + Adds a restart service recovery action with the specified delay. + + The delay. + The service recovery configurator. + + + + Adds a restart service recovery action with the specified delay in minutes. + + The delay in minutes. + The service recovery configurator. + + + + Adds a restart computer recovery action with the specified delay. + + The delay. + The message. + ServiceRecoveryConfigurator. + + + + Adds a restart computer recovery action with the specified delay in minutes. + + The delay in minutes. + The message. + The service recovery configurator. + + + + Adds a run program recovery action with the specified delay. + + The delay. + The command to run. + The service recovery configurator. + + + + Adds a run program recovery action with the specified delay in minutes. + + The delay in minutes. + The command. + The service recovery configurator. + + + + Adds a take no action recovery action. + + The service recovery configurator. + + + + Sets the recovery reset period in days. + + The reset period in days. + + + + Specifies that the recovery actions should only be taken on a service crash. If the service exits + with a non-zero exit code, it will not be restarted. + + + + + Represents an option to set a service dependency. + + + + + + The dependency name + + + + + Initializes a new instance of the class. + + Name of the dependency. + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service recovery options. + + + + + + Initializes a new instance of the class. + + The service recovery options. + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service start timeout (in seconds). + + + + + + The start timeout (in seconds). + + + + + Initializes a new instance of the class. + + The start timeout (in seconds). + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service stop timeout (in seconds). + + + + + + The stop timeout (in seconds). + + + + + Initializes a new instance of the class. + + The stop timeout (in seconds). + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Registers a callback invoked before the service Start method is called. + + + + + Registers a callback invoked after the service Start method is called. + + + + + Registers a callback invoked before the service Stop method is called. + + + + + Registers a callback invoked after the service Stop method is called. + + + + + Registers a callback invoked before the service Start method is called. + + + + + Registers a callback invoked after the service Start method is called. + + + + + Registers a callback invoked before the service Stop method is called. + + + + + Registers a callback invoked after the service Stop method is called. + + + + + Defines a service recovery configurator. + + + + + Restart the service after waiting the delay period specified + + The delay. + The service recovery configurator. + + + + Restart the service after waiting the delay period in minutes + + The delay in minutes. + The service recovery configurator. + + + + Restart the computer after waiting the delay period specified + + The delay. + + The service recovery configurator. + + + + Restart the computer after waiting the delay period in minutes + + The delay in minutes. + + The service recovery configurator. + + + + Run the command specified + + The delay. + The command to run. + The service recovery configurator. + + + + Run the command specified + + The delay in minutes. + The command to run. + The service recovery configurator. + + + + Take no action + + The service recovery configurator. + + + + Specifies the reset period for the restart options + + The reset period in days. + + + + Specifies that the recovery actions should only be taken on a service crash. If the service exits + with a non-zero exit code, it will not be restarted. + + + + + Configures the test host, which simply starts and stops the service. Meant to be used + to verify the service can be created, started, stopped, and disposed without issues. + + + + + A Host can be a number of configured service hosts, from installers to service runners + + + + + Runs the configured host + + + + + Allows the service to control the host while running + + + + + Tells the Host that the service is still starting, which resets the + timeout. + + + + + Stops the Host + + + + + Stops the Host, returning the specified exit code + + + + + Configure and run a service host using the HostFactory + + + + + Configures a new service host + + Configuration method to call + A Topshelf service host, ready to run + + + + Configures and runs a new service host, handling any exceptions and writing them to the log. + + Configuration method to call + Returns the exit code of the process that should be returned by your application's main method + + + + If called, prevents the service from starting + + + + + Displays the Topshelf command line reference + + + + + True if the service handles power change events + + + + + Implementers handle logging and filtering based on logging levels. + + + + + Delegate to provide the log output if the log level is enabled + + + + + + Logs a debug message. + + + The message to log + + + + Logs a debug message. + + + The exception to log + The message to log + + + + Logs a debug message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The message to log + + + + Logs an info message. + + + The exception to log + The message to log + + + + Logs an info message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The message to log + + + + Logs a warn message. + + + The exception to log + The message to log + + + + Logs a warn message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The message to log + + + + Logs an error message. + + + The exception to log + The message to log + + + + Logs an error message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The message to log + + + + Logs a fatal message. + + + The exception to log + The message to log + + + + Logs a fatal message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + The system has requested permission to suspend the computer. An application that grants permission should carry out preparations for the suspension before returning. + Not supported by + + + + + The system was denied permission to suspend the computer. This status is broadcast if any application or driver denied a previous status. + Not supported by + + + + + The computer is about to enter a suspended state. This event is typically broadcast when all applications and installable drivers have returned true to a previous QuerySuspend state. + + + + + The system has resumed operation after a critical suspension caused by a failing battery. + Not supported by + + + + + The system has resumed operation after being suspended. + Not supported by + + + + + Battery power is low. + Not supported by + + + + + A change in the power status of the computer is detected, such as a switch from battery power to A/C. The system also broadcasts this event when remaining battery power slips below the threshold specified by the user or if the battery power changes by a specified percentage. + + + + + An Advanced Power Management (APM) BIOS signaled an APM OEM event. + Not supported by + + + + + The computer has woken up automatically to handle an event. + + + + + Abstracts the environment in which the host in running (different OS versions, platforms, + bitness, etc.) + + + + + Determines if the service is running as an administrator + + + + + Determines if the process is running as a service + + + + + Determines if the service is installed + + The name of the service as it is registered + True if the service is installed, otherwise false + + + + Determines if the service is stopped, to prevent a debug instance from being started + + + + + + + Start the service using operating system controls + + The name of the service + Waits for the service to reach the running status in the specified time. + + + + Stop the service using operating system controls + + The name of the service + Waits for the service to reach the stopeed status in the specified time. + + + + Install the service using the settings provided + + + + + + + + + + Uninstall the service using the settings provided + + + + + + + + Restarts the service as an administrator which has permission to modify the service configuration + + True if the child process was executed, otherwise false + + + + Create a service host appropriate for the host environment + + + + + + + + Send a command to a service to make it do something + + The service name + The command value + + + + The settings that have been configured for the operating system service + + + + + The name of the service + + + + + The name of the service as it should be displayed in the service control manager + + + + + The description of the service that is displayed in the service control manager + + + + + The service instance name that should be used when the service is registered + + + + + Returns the Windows service name, including the instance name, which is registered with the SCM Example: myservice$bob + + + + + + True if the service supports pause and continue + + + + + True if the service can handle the shutdown event + + + + + True if the service handles session change events + + + + + True if the service handles power change events + + + + + The amount of time to wait for the service to start before timing out. Default is 10 seconds. + + + + + The amount of time to wait for the service to stop before timing out. Default is 10 seconds. + + + + + A callback to provide visibility into exceptions while Topshelf is performing its + own handling. + + + + + The policy that will be used when Topself detects an UnhandledException in the + application. The default policy is to log an error and to stop the service. + + + + + A handle to a service being hosted by the Host + + + + + Start the service + + + True if the service was started, otherwise false + + + + Pause the service + + + True if the service was paused, otherwise false + + + + Continue the service from a paused state + + + True if the service was able to continue, otherwise false + + + + Stop the service + + + True if the service was stopped, or false if the service cannot be stopped at this time + + + + Handle the shutdown event + + + + + + Handle the session change event + + + + + + + Handle the power change event + + + + + + + Handle the custom command + + + + + + + If an UnhandledException occurs, Topshelf will log an error and + stop the service + + + + + If an UnhandledException occurs, Topshelf will log an error and + continue without stopping the service + + + + + If an UnhandledException occurs, Topshelf will take no action. + It is assumed that the application will handle the UnhandledException itself. + + + + + Required to connect to the service control manager. + + + + + Required to call the CreateService function to create a service + object and add it to the database. + + + + + Required to call the EnumServicesStatusEx function to list the + services that are in the database. + + + + + Required to call the LockServiceDatabase function to acquire a + lock on the database. + + + + + Required to call the QueryServiceLockStatus function to retrieve + the lock status information for the database. + + + + + Required to call the NotifyBootConfigStatus function. + + + + + Includes STANDARD_RIGHTS_REQUIRED, in addition to all access + rights in this table. + + + + + The action to be performed. This member can be one of the following values from the enumeration type. + + + + + The time to wait before performing the specified action, in milliseconds. + + + + + Represents a restart service service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + + + + Gets the service recovery configuration action. + + A representing the restart service service recovery configuration action. + + + + Represents a restart system service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + The restart message. + + + + Gets the system restart message. + + The system restart message. + + + + Gets the service recovery configuration action. + + A representing the restart system service recovery configuration action. + + + + Represents a run command service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + The command. + + + + Gets the command to run. + + The command. to run + + + + Gets the service recovery configuration action. + + A representing the run command service recovery configuration action. + + + + Represents a service recovery action. + + + + + Initializes a new instance of the class. + + The delay. + + + + Gets the delay in milliseconds. + + The delay in milliseconds. + + + + Gets the service recovery configuration action. + + A representing the service recovery configuration action. + + + + Represents a take no action recovery action. + + + + + Initializes a new instance of the class. + + + + + Gets the service recovery configuration action. + + A representing the take no action service recovery configuration action. + + + + Creates a new WindowsServiceDescription using empty strings for the properties. The class is required to have names by the consumers. + + + + + Creates a new WindowsServiceDescription instance using the passed parameters. + + + + + + + Implemented by services that support custom command events + + + + + Implemented by services that support power change events + + + + + Implemented by services that support session change events + + + + + Implemented by services that support service shutdown + + + + + Called when the operating system invokes the service shutdown method. There is little + time to react here, but the application try to use RequestAdditionalTime if necessary, + but this is really a shut down quick and bail method. + + + + + + If implemented by a service, used to pause/continue the service + + + + diff --git a/service/FileMover/bin/Release/FileMover.exe b/service/FileMover/bin/Release/FileMover.exe new file mode 100644 index 0000000..b597e44 Binary files /dev/null and b/service/FileMover/bin/Release/FileMover.exe differ diff --git a/service/FileMover/bin/Release/FileMover.exe.config b/service/FileMover/bin/Release/FileMover.exe.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/service/FileMover/bin/Release/FileMover.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/service/FileMover/bin/Release/FileMover.pdb b/service/FileMover/bin/Release/FileMover.pdb new file mode 100644 index 0000000..d22a56e Binary files /dev/null and b/service/FileMover/bin/Release/FileMover.pdb differ diff --git a/service/FileMover/bin/Release/Topshelf.dll b/service/FileMover/bin/Release/Topshelf.dll new file mode 100644 index 0000000..0582f13 Binary files /dev/null and b/service/FileMover/bin/Release/Topshelf.dll differ diff --git a/service/FileMover/bin/Release/Topshelf.xml b/service/FileMover/bin/Release/Topshelf.xml new file mode 100644 index 0000000..bb28fdd --- /dev/null +++ b/service/FileMover/bin/Release/Topshelf.xml @@ -0,0 +1,1578 @@ + + + + Topshelf + + + + + A cache implementation that extends the capability of most dictionary style classes to + have a more complete set of methods commonly used in a dictionary scenario. + + The key type of the cache + The value type of the cache + + + + Sets the missing value provider used by the cache to create requested values that do not exist in the cache + + + + + Sets the callback that is called when a new value is added to the cache + + + + + Sets the callback that is called when a value is removed or replaced from the cache + + + + + Sets the callback that is called when a duplicate value is added to the cache + + + + + Specifies a selector that returns the key from a value which is used when a value is added to the cache + + + + + References a value in the cache, returning a newly created or existing value for the specified key, and + adding a new or replacing an existing value in the cache + + The key references the value + The value from the cache + + + + Get the value for the specified key + + The key referencing the value in the cache + The matching value if the key exists in the cache, otherwise an exception is thrown + + + + Get the value for the specified key, overriding the default missing value provider + + The key referencing the value in the cache + An overloaded missing value provider to create the value if it is not found in the cache + The matching value if the key exists in the cache, otherwise an exception is thrown + + + + Get a value for the specified key, if not found returns the specified default value + + The key referencing the value in the cache + The default value to return if the key is not found in the cache + The matching value if it exists in the cache, otherwise the default value + + + + Get a value for the specified key, if not found returns the specified default value + + The key referencing the value in the cache + The default value to return if the key is not found in the cache + The matching value if it exists in the cache, otherwise the default value + + + + Gets a value for the specified key if it exists + + The key referencing the value in the cache + The value if it exists in the cache, otherwise the default value + True if the item was in the cache, otherwise false + + + + Adds a value to the cache using the specified key. If the key already exists in the cache, an exception is thrown. + + The key referencing the value + The value + + + + Adds a value to the cache using the KeySelector to extract the key from the value. If the key already exists + in the cache, an exception is thrown. + + The value + + + + Remove an existing value from the cache + + The key referencing the value + + + + Remove an existing value from the cache, using the KeySelector to extract the key to find the value + + The value to remove + + + + Removes all items from the cache + + + + + Fills the cache from a list of values, using the KeySelector to extract the key for each value. + + + + + + Calls the callback with the value matching the specified key + + The key referencing the value + The callback to call + True if the value exists and the callback was called + + + + Calls the function with the value matching the specified key, returning the result of that function + + The result type of the function + The key references the value + The function to call + The default return value if the item does not exist in the cache + The return value of the function, or the defaultValue specified if the item does not exist in the cache + + + + Calls the function with the value matching the specified key, returning the result of that function + + The result type of the function + The key references the value + The function to call + The default return value if the item does not exist in the cache + The return value of the function, or the defaultValue specified if the item does not exist in the cache + + + + Constructs a cache for the specified generic type + + The generic type to close + + + + Constructs a cache for the specified generic type. + + The generic type to close + The implementation provider, which must close the generic type with the passed type + + + + A read-only view of a cache. Methods that are able to modify the cache contents are not + available in this reduced interface. Methods on this interface will NOT invoke a missing + item provider. + + + + + + + The number of items in the cache + + + + + Checks if the key exists in the cache + + The key to check + True if the key exists, otherwise false + + + + Checks if a value exists in the cache + + The value to check + True if the value exists, otherwise false + + + + Calls the specified callback with each value in the cache + + A callback that accepts the value for each item in the cache + + + + Calls the specified callback with each item in the cache + + A callback that accepts the key and value for each item in the cache + + + + Uses a predicate to scan the cache for a matching value + + The predicate to run against each value + True if a matching value exists, otherwise false + + + + Uses a predicate to scan the cache for a matching value + + The predicate to run against each value + The matching value + True if a matching value was found, otherwise false + + + + Gets all keys that are stored in the cache + + An array of every key in the dictionary + + + + Gets all values that are stored in the cache + + An array of every value in the dictionary + + + + Using the service configuration, the host builder will create the host + that will be ran by the service console. + + + + + Tools for parsing the command line + + + + + Gets the command line from the Environment.CommandLine, removing the application name if present + + The complete, unparsed command line that was specified when the program was executed + + + + Parses the command line + + The command line to parse + The command line elements that were found + + + + Parses the command line and matches any specified patterns + + The output type of the parser + The command line text + Used by the caller to add patterns and object generators + The elements that were found on the command line + + + + Used to configure the command line element parser + + The type of object returned as a result of the parse + + + + Adds a new pattern to the parser + + The pattern to match and return the resulting object + + + + Reports information about the configuration before configuring + so that corrections can be made without allocating resources, etc. + + + + + The disposition of the result, any Failure items will prevent + the configuration from completing. + + + + + The message associated with the result + + + + + The key associated with the result (chained if configurators are nested) + + + + + The value associated with the result + + + + + A selection of commonly-used Windows services. + + + + + The Microsoft Message Queue service. + + + + + The Microsoft SQL Server service. + + + + + The Internet Information Server service. + + + + + The Event Log service. + + + + + Sets additional text to be displayed before the built-in help text is displayed + + + + + + + Specifies a text resource to be loaded and displayed before the built-in system help text is displayed + + + The assembly containing the text resource + The name of the embedded resource + + + + Adds a dependency to the InstallBuilder (ignored otherwise) + + + + + Can configure/replace the input , returning the original + or a new . + + + + + Configures the host builder. + + The host builder. + The configured host builder. + + + + Specifies the name of the service as it should be displayed in the service control manager + + + + + + Specifies the name of the service as it is registered in the service control manager + + + + + + Specifies the description of the service that is displayed in the service control manager + + + + + + Specifies the service instance name that should be used when the service is registered + + + + + + Sets the amount of time to wait for the service to start before timing out. Default is 10 seconds. + + + + + + Sets the amount of time to wait for the service to stop before timing out. Default is 10 seconds. + + + + + + Enable pause and continue support for the service (default is disabled) + + + + + Enable support for service shutdown (signaled by the host OS) + + + + + Enabled support for the session changed event + + + + + Specifies the builder factory to use when the service is invoked + + + + + + Sets the service builder to use for creating the service + + + + + + Sets the environment builder to use for creating the service (defaults to Windows) + + + + + + Adds a a configurator for the host builder to the configurator + + + + + + Parses the command line options and applies them to the host configurator + + + + + Parses the command line options from the specified command line and applies them to the host configurator + + + + + + Adds a command line switch (--name) that can be either true or false. Switches are CASE SeNsITiVe + + The name of the switch, as it will appear on the command line + + + + + Adds a command line definition (-name:value) that can be specified. the name is case sensitive. If the + definition + + + + + + + Specifies a callback to be run when Topshelf encounters an exception while starting, running + or stopping. This callback does not replace Topshelf's default handling of any exceptions, and + is intended to allow for local cleanup, logging, etc. This is not required, and is only invoked + if a callback is provided. + + The action to run when an exception occurs. + + + + The policy that will be used when Topself detects an UnhandledException in the + application. The default policy is to log an error and to stop the service. + + + + + Implements a service recovery configurator and host builder configurator. + + + + + + + Configures the host builder. + + The host builder. + The configured host builder. + builder + + + + Adds a restart service recovery action with the specified delay. + + The delay. + The service recovery configurator. + + + + Adds a restart service recovery action with the specified delay in minutes. + + The delay in minutes. + The service recovery configurator. + + + + Adds a restart computer recovery action with the specified delay. + + The delay. + The message. + ServiceRecoveryConfigurator. + + + + Adds a restart computer recovery action with the specified delay in minutes. + + The delay in minutes. + The message. + The service recovery configurator. + + + + Adds a run program recovery action with the specified delay. + + The delay. + The command to run. + The service recovery configurator. + + + + Adds a run program recovery action with the specified delay in minutes. + + The delay in minutes. + The command. + The service recovery configurator. + + + + Adds a take no action recovery action. + + The service recovery configurator. + + + + Sets the recovery reset period in days. + + The reset period in days. + + + + Specifies that the recovery actions should only be taken on a service crash. If the service exits + with a non-zero exit code, it will not be restarted. + + + + + Represents an option to set a service dependency. + + + + + + The dependency name + + + + + Initializes a new instance of the class. + + Name of the dependency. + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service recovery options. + + + + + + Initializes a new instance of the class. + + The service recovery options. + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service start timeout (in seconds). + + + + + + The start timeout (in seconds). + + + + + Initializes a new instance of the class. + + The start timeout (in seconds). + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Represents an option to set a service stop timeout (in seconds). + + + + + + The stop timeout (in seconds). + + + + + Initializes a new instance of the class. + + The stop timeout (in seconds). + + + + Applies the option to the specified host configurator. + + The host configurator. + + + + Registers a callback invoked before the service Start method is called. + + + + + Registers a callback invoked after the service Start method is called. + + + + + Registers a callback invoked before the service Stop method is called. + + + + + Registers a callback invoked after the service Stop method is called. + + + + + Registers a callback invoked before the service Start method is called. + + + + + Registers a callback invoked after the service Start method is called. + + + + + Registers a callback invoked before the service Stop method is called. + + + + + Registers a callback invoked after the service Stop method is called. + + + + + Defines a service recovery configurator. + + + + + Restart the service after waiting the delay period specified + + The delay. + The service recovery configurator. + + + + Restart the service after waiting the delay period in minutes + + The delay in minutes. + The service recovery configurator. + + + + Restart the computer after waiting the delay period specified + + The delay. + + The service recovery configurator. + + + + Restart the computer after waiting the delay period in minutes + + The delay in minutes. + + The service recovery configurator. + + + + Run the command specified + + The delay. + The command to run. + The service recovery configurator. + + + + Run the command specified + + The delay in minutes. + The command to run. + The service recovery configurator. + + + + Take no action + + The service recovery configurator. + + + + Specifies the reset period for the restart options + + The reset period in days. + + + + Specifies that the recovery actions should only be taken on a service crash. If the service exits + with a non-zero exit code, it will not be restarted. + + + + + Configures the test host, which simply starts and stops the service. Meant to be used + to verify the service can be created, started, stopped, and disposed without issues. + + + + + A Host can be a number of configured service hosts, from installers to service runners + + + + + Runs the configured host + + + + + Allows the service to control the host while running + + + + + Tells the Host that the service is still starting, which resets the + timeout. + + + + + Stops the Host + + + + + Stops the Host, returning the specified exit code + + + + + Configure and run a service host using the HostFactory + + + + + Configures a new service host + + Configuration method to call + A Topshelf service host, ready to run + + + + Configures and runs a new service host, handling any exceptions and writing them to the log. + + Configuration method to call + Returns the exit code of the process that should be returned by your application's main method + + + + If called, prevents the service from starting + + + + + Displays the Topshelf command line reference + + + + + True if the service handles power change events + + + + + Implementers handle logging and filtering based on logging levels. + + + + + Delegate to provide the log output if the log level is enabled + + + + + + Logs a debug message. + + + The message to log + + + + Logs a debug message. + + + The exception to log + The message to log + + + + Logs a debug message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The message to log + + + + Logs an info message. + + + The exception to log + The message to log + + + + Logs an info message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The message to log + + + + Logs a warn message. + + + The exception to log + The message to log + + + + Logs a warn message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The message to log + + + + Logs an error message. + + + The exception to log + The message to log + + + + Logs an error message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The message to log + + + + Logs a fatal message. + + + The exception to log + The message to log + + + + Logs a fatal message. + + + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a debug message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an info message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a warn message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs an error message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The exception to log + Format string for the message to log + Format arguments for the message to log + + + + Logs a fatal message. + + + The exception to log + The format provider to use + Format string for the message to log + Format arguments for the message to log + + + + The system has requested permission to suspend the computer. An application that grants permission should carry out preparations for the suspension before returning. + Not supported by + + + + + The system was denied permission to suspend the computer. This status is broadcast if any application or driver denied a previous status. + Not supported by + + + + + The computer is about to enter a suspended state. This event is typically broadcast when all applications and installable drivers have returned true to a previous QuerySuspend state. + + + + + The system has resumed operation after a critical suspension caused by a failing battery. + Not supported by + + + + + The system has resumed operation after being suspended. + Not supported by + + + + + Battery power is low. + Not supported by + + + + + A change in the power status of the computer is detected, such as a switch from battery power to A/C. The system also broadcasts this event when remaining battery power slips below the threshold specified by the user or if the battery power changes by a specified percentage. + + + + + An Advanced Power Management (APM) BIOS signaled an APM OEM event. + Not supported by + + + + + The computer has woken up automatically to handle an event. + + + + + Abstracts the environment in which the host in running (different OS versions, platforms, + bitness, etc.) + + + + + Determines if the service is running as an administrator + + + + + Determines if the process is running as a service + + + + + Determines if the service is installed + + The name of the service as it is registered + True if the service is installed, otherwise false + + + + Determines if the service is stopped, to prevent a debug instance from being started + + + + + + + Start the service using operating system controls + + The name of the service + Waits for the service to reach the running status in the specified time. + + + + Stop the service using operating system controls + + The name of the service + Waits for the service to reach the stopeed status in the specified time. + + + + Install the service using the settings provided + + + + + + + + + + Uninstall the service using the settings provided + + + + + + + + Restarts the service as an administrator which has permission to modify the service configuration + + True if the child process was executed, otherwise false + + + + Create a service host appropriate for the host environment + + + + + + + + Send a command to a service to make it do something + + The service name + The command value + + + + The settings that have been configured for the operating system service + + + + + The name of the service + + + + + The name of the service as it should be displayed in the service control manager + + + + + The description of the service that is displayed in the service control manager + + + + + The service instance name that should be used when the service is registered + + + + + Returns the Windows service name, including the instance name, which is registered with the SCM Example: myservice$bob + + + + + + True if the service supports pause and continue + + + + + True if the service can handle the shutdown event + + + + + True if the service handles session change events + + + + + True if the service handles power change events + + + + + The amount of time to wait for the service to start before timing out. Default is 10 seconds. + + + + + The amount of time to wait for the service to stop before timing out. Default is 10 seconds. + + + + + A callback to provide visibility into exceptions while Topshelf is performing its + own handling. + + + + + The policy that will be used when Topself detects an UnhandledException in the + application. The default policy is to log an error and to stop the service. + + + + + A handle to a service being hosted by the Host + + + + + Start the service + + + True if the service was started, otherwise false + + + + Pause the service + + + True if the service was paused, otherwise false + + + + Continue the service from a paused state + + + True if the service was able to continue, otherwise false + + + + Stop the service + + + True if the service was stopped, or false if the service cannot be stopped at this time + + + + Handle the shutdown event + + + + + + Handle the session change event + + + + + + + Handle the power change event + + + + + + + Handle the custom command + + + + + + + If an UnhandledException occurs, Topshelf will log an error and + stop the service + + + + + If an UnhandledException occurs, Topshelf will log an error and + continue without stopping the service + + + + + If an UnhandledException occurs, Topshelf will take no action. + It is assumed that the application will handle the UnhandledException itself. + + + + + Required to connect to the service control manager. + + + + + Required to call the CreateService function to create a service + object and add it to the database. + + + + + Required to call the EnumServicesStatusEx function to list the + services that are in the database. + + + + + Required to call the LockServiceDatabase function to acquire a + lock on the database. + + + + + Required to call the QueryServiceLockStatus function to retrieve + the lock status information for the database. + + + + + Required to call the NotifyBootConfigStatus function. + + + + + Includes STANDARD_RIGHTS_REQUIRED, in addition to all access + rights in this table. + + + + + The action to be performed. This member can be one of the following values from the enumeration type. + + + + + The time to wait before performing the specified action, in milliseconds. + + + + + Represents a restart service service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + + + + Gets the service recovery configuration action. + + A representing the restart service service recovery configuration action. + + + + Represents a restart system service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + The restart message. + + + + Gets the system restart message. + + The system restart message. + + + + Gets the service recovery configuration action. + + A representing the restart system service recovery configuration action. + + + + Represents a run command service recovery action. + + + + + + Initializes a new instance of the class. + + The delay. + The command. + + + + Gets the command to run. + + The command. to run + + + + Gets the service recovery configuration action. + + A representing the run command service recovery configuration action. + + + + Represents a service recovery action. + + + + + Initializes a new instance of the class. + + The delay. + + + + Gets the delay in milliseconds. + + The delay in milliseconds. + + + + Gets the service recovery configuration action. + + A representing the service recovery configuration action. + + + + Represents a take no action recovery action. + + + + + Initializes a new instance of the class. + + + + + Gets the service recovery configuration action. + + A representing the take no action service recovery configuration action. + + + + Creates a new WindowsServiceDescription using empty strings for the properties. The class is required to have names by the consumers. + + + + + Creates a new WindowsServiceDescription instance using the passed parameters. + + + + + + + Implemented by services that support custom command events + + + + + Implemented by services that support power change events + + + + + Implemented by services that support session change events + + + + + Implemented by services that support service shutdown + + + + + Called when the operating system invokes the service shutdown method. There is little + time to react here, but the application try to use RequestAdditionalTime if necessary, + but this is really a shut down quick and bail method. + + + + + + If implemented by a service, used to pause/continue the service + + + + diff --git a/service/FileMover/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/service/FileMover/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..5c73243 Binary files /dev/null and b/service/FileMover/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/service/FileMover/obj/Debug/FileMover.csproj.CopyComplete b/service/FileMover/obj/Debug/FileMover.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/service/FileMover/obj/Debug/FileMover.csproj.CoreCompileInputs.cache b/service/FileMover/obj/Debug/FileMover.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..fd2834d --- /dev/null +++ b/service/FileMover/obj/Debug/FileMover.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +c3463ef6b322a76106115d47f4964a4dd3a70ae0 diff --git a/service/FileMover/obj/Debug/FileMover.csproj.FileListAbsolute.txt b/service/FileMover/obj/Debug/FileMover.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..b2898e3 --- /dev/null +++ b/service/FileMover/obj/Debug/FileMover.csproj.FileListAbsolute.txt @@ -0,0 +1,20 @@ +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Debug\FileMover.exe.config +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Debug\FileMover.exe +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Debug\FileMover.pdb +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Debug\Topshelf.dll +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Debug\Topshelf.xml +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Debug\FileMover.csprojAssemblyReference.cache +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Debug\FileMover.csproj.CoreCompileInputs.cache +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Debug\FileMover.csproj.CopyComplete +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Debug\FileMover.exe +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Debug\FileMover.pdb +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Debug\FileMover.exe.config +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Debug\FileMover.exe +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Debug\FileMover.pdb +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Debug\Topshelf.dll +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Debug\Topshelf.xml +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Debug\FileMover.csprojAssemblyReference.cache +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Debug\FileMover.csproj.CoreCompileInputs.cache +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Debug\FileMover.csproj.CopyComplete +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Debug\FileMover.exe +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Debug\FileMover.pdb diff --git a/service/FileMover/obj/Debug/FileMover.csprojAssemblyReference.cache b/service/FileMover/obj/Debug/FileMover.csprojAssemblyReference.cache new file mode 100644 index 0000000..67d9933 Binary files /dev/null and b/service/FileMover/obj/Debug/FileMover.csprojAssemblyReference.cache differ diff --git a/service/FileMover/obj/Debug/FileMover.exe b/service/FileMover/obj/Debug/FileMover.exe new file mode 100644 index 0000000..27d7cd9 Binary files /dev/null and b/service/FileMover/obj/Debug/FileMover.exe differ diff --git a/service/FileMover/obj/Debug/FileMover.pdb b/service/FileMover/obj/Debug/FileMover.pdb new file mode 100644 index 0000000..161b903 Binary files /dev/null and b/service/FileMover/obj/Debug/FileMover.pdb differ diff --git a/service/FileMover/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/service/FileMover/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..bfe2f48 Binary files /dev/null and b/service/FileMover/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/service/FileMover/obj/Release/FileMover.csproj.CopyComplete b/service/FileMover/obj/Release/FileMover.csproj.CopyComplete new file mode 100644 index 0000000..e69de29 diff --git a/service/FileMover/obj/Release/FileMover.csproj.CoreCompileInputs.cache b/service/FileMover/obj/Release/FileMover.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..1c51905 --- /dev/null +++ b/service/FileMover/obj/Release/FileMover.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +3aba2e1faecc5132027b7ff6a5a7ccb70460c811 diff --git a/service/FileMover/obj/Release/FileMover.csproj.FileListAbsolute.txt b/service/FileMover/obj/Release/FileMover.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..8ba40b0 --- /dev/null +++ b/service/FileMover/obj/Release/FileMover.csproj.FileListAbsolute.txt @@ -0,0 +1,20 @@ +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Release\FileMover.exe.config +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Release\FileMover.exe +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Release\FileMover.pdb +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Release\Topshelf.dll +C:\Users\Richard\source\repos\FileMover\FileMover\bin\Release\Topshelf.xml +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Release\FileMover.csprojAssemblyReference.cache +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Release\FileMover.csproj.CoreCompileInputs.cache +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Release\FileMover.csproj.CopyComplete +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Release\FileMover.exe +C:\Users\Richard\source\repos\FileMover\FileMover\obj\Release\FileMover.pdb +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Release\FileMover.exe.config +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Release\FileMover.exe +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Release\FileMover.pdb +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Release\Topshelf.dll +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\bin\Release\Topshelf.xml +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Release\FileMover.csprojAssemblyReference.cache +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Release\FileMover.csproj.CoreCompileInputs.cache +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Release\FileMover.csproj.CopyComplete +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Release\FileMover.exe +C:\Users\Richard\Documents\UOS\Spagelmafia\asparagus\FileMover\obj\Release\FileMover.pdb diff --git a/service/FileMover/obj/Release/FileMover.csprojAssemblyReference.cache b/service/FileMover/obj/Release/FileMover.csprojAssemblyReference.cache new file mode 100644 index 0000000..5f1b334 Binary files /dev/null and b/service/FileMover/obj/Release/FileMover.csprojAssemblyReference.cache differ diff --git a/service/FileMover/obj/Release/FileMover.exe b/service/FileMover/obj/Release/FileMover.exe new file mode 100644 index 0000000..b597e44 Binary files /dev/null and b/service/FileMover/obj/Release/FileMover.exe differ diff --git a/service/FileMover/obj/Release/FileMover.pdb b/service/FileMover/obj/Release/FileMover.pdb new file mode 100644 index 0000000..d22a56e Binary files /dev/null and b/service/FileMover/obj/Release/FileMover.pdb differ diff --git a/service/FileMover/packages.config b/service/FileMover/packages.config new file mode 100644 index 0000000..35b34a2 --- /dev/null +++ b/service/FileMover/packages.config @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/service/packages/Topshelf.4.2.0/.signature.p7s b/service/packages/Topshelf.4.2.0/.signature.p7s new file mode 100644 index 0000000..374060e Binary files /dev/null and b/service/packages/Topshelf.4.2.0/.signature.p7s differ diff --git a/service/packages/Topshelf.4.2.0/Topshelf.4.2.0.nupkg b/service/packages/Topshelf.4.2.0/Topshelf.4.2.0.nupkg new file mode 100644 index 0000000..c900162 Binary files /dev/null and b/service/packages/Topshelf.4.2.0/Topshelf.4.2.0.nupkg differ