diff --git a/Service/Framework/ConsoleHarness.cs b/Service/Framework/ConsoleHarness.cs deleted file mode 100644 index b4d5111..0000000 --- a/Service/Framework/ConsoleHarness.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; - -namespace SystemTemperatureService.Framework -{ - public static class ConsoleHarness - { - // Run a service from the console given a service implementation - public static void Run(string[] args, IWindowsService service) - { - bool isRunning = true; - - // simulate starting the windows service - service.OnStart(args); - - // let it run as long as Q is not pressed - while (isRunning) - { - WriteToConsole(ConsoleColor.Yellow, "Enter either [Q]uit, [P]ause, [R]esume : "); - isRunning = HandleConsoleInput(service, Console.ReadLine()); - } - - // stop and shutdown - service.OnStop(); - service.OnShutdown(); - } - - // Private input handler for console commands. - private static bool HandleConsoleInput(IWindowsService service, string line) - { - bool canContinue = true; - - // check input - if (line != null) - { - switch (line.ToUpper()) - { - case "Q": - canContinue = false; - break; - - case "P": - service.OnPause(); - break; - - case "R": - service.OnContinue(); - break; - - default: - WriteToConsole(ConsoleColor.Red, "Did not understand that input, try again."); - break; - } - } - - return canContinue; - } - - // Helper method to write a message to the console at the given foreground color. - internal static void WriteToConsole(ConsoleColor foregroundColor, string format, params object[] formatArguments) - { - ConsoleColor originalColor = Console.ForegroundColor; - Console.ForegroundColor = foregroundColor; - - Console.WriteLine(format, formatArguments); - Console.Out.Flush(); - - Console.ForegroundColor = originalColor; - } - } -} diff --git a/Service/Framework/IWindowsService.cs b/Service/Framework/IWindowsService.cs deleted file mode 100644 index 92341fe..0000000 --- a/Service/Framework/IWindowsService.cs +++ /dev/null @@ -1,46 +0,0 @@ -using System; - -namespace SystemTemperatureService.Framework -{ - /// - /// The interface that any windows service should implement to be used - /// with the GenericWindowsService executable. - /// - public interface IWindowsService : IDisposable - { - /// - /// This method is called when the service gets a request to start. - /// - /// Any command line arguments - void OnStart(string[] args); - - /// - /// This method is called when the service gets a request to stop. - /// - void OnStop(); - - /// - /// This method is called when a service gets a request to pause, - /// but not stop completely. - /// - void OnPause(); - - /// - /// This method is called when a service gets a request to resume - /// after a pause is issued. - /// - void OnContinue(); - - /// - /// This method is called when the machine the service is running on - /// is being shutdown. - /// - void OnShutdown(); - - /// - /// This method is called when a custom command is issued to the service. - /// - /// The command identifier to execute. - void OnCustomCommand(int command); - } -} diff --git a/Service/Framework/TypeExtensions.cs b/Service/Framework/TypeExtensions.cs deleted file mode 100644 index 44d064a..0000000 --- a/Service/Framework/TypeExtensions.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace SystemTemperatureService.Framework -{ - /// - /// Extension methods for the Type class - /// - public static class TypeExtensions - { - /// - /// Loads the configuration from assembly attributes - /// - /// The type of the custom attribute to find. - /// The calling assembly to search. - /// The custom attribute of type T, if found. - public static T GetAttribute(this Type typeWithAttributes) - where T : Attribute - { - return GetAttributes(typeWithAttributes).FirstOrDefault(); - } - - /// - /// Loads the configuration from assembly attributes - /// - /// The type of the custom attribute to find. - /// The calling assembly to search. - /// An enumeration of attributes of type T that were found. - public static IEnumerable GetAttributes(this Type typeWithAttributes) - where T : Attribute - { - // Try to find the configuration attribute for the default logger if it exists - object[] configAttributes = Attribute.GetCustomAttributes(typeWithAttributes, - typeof(T), false); - - // get just the first one - if (configAttributes != null && configAttributes.Length > 0) - { - foreach (T attribute in configAttributes) - { - yield return attribute; - } - } - } - } -} \ No newline at end of file diff --git a/Service/Framework/WindowsServiceAttribute.cs b/Service/Framework/WindowsServiceAttribute.cs deleted file mode 100644 index 96ab732..0000000 --- a/Service/Framework/WindowsServiceAttribute.cs +++ /dev/null @@ -1,90 +0,0 @@ -using System; -using System.ServiceProcess; - -namespace SystemTemperatureService.Framework -{ - [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)] - public class WindowsServiceAttribute : Attribute - { - /// - /// The name of the service. - /// - public string Name { get; set; } - - /// - /// The displayable name that shows in service manager (defaults to Name). - /// - public string DisplayName { get; set; } - - /// - /// A textural description of the service name (defaults to Name). - /// - public string Description { get; set; } - - /// - /// The user to run the service under (defaults to null). A null or empty - /// UserName field causes the service to run as ServiceAccount.LocalService. - /// - public string UserName { get; set; } - - /// - /// The password to run the service under (defaults to null). Ignored - /// if the UserName is empty or null, this property is ignored. - /// - public string Password { get; set; } - - /// - /// Specifies the event log source to set the service's EventLog to. If this is - /// empty or null (the default) no event log source is set. If set, will auto-log - /// start and stop events. - /// - public string EventLogSource { get; set; } - - /// - /// The method to start the service when the machine reboots (defaults to Manual). - /// - public ServiceStartMode StartMode { get; set; } - - /// - /// True if service supports pause and continue (defaults to true). - /// - public bool CanPauseAndContinue { get; set; } - - /// - /// True if service supports shutdown event (defaults to true). - /// - public bool CanShutdown { get; set; } - - /// - /// True if service supports stop event (defaults to true). - /// - public bool CanStop { get; set; } - - /// - /// The service account to use if the UserName is not specified. - /// - public ServiceAccount ServiceAccount { get; set; } - - /// - /// Marks an IWindowsService with configuration and installation attributes. - /// - /// The name of the windows service. - public WindowsServiceAttribute(string name) - { - // set name and default description and display name to name. - Name = name; - Description = name; - DisplayName = name; - - // default all other attributes. - CanStop = true; - CanShutdown = true; - CanPauseAndContinue = true; - StartMode = ServiceStartMode.Manual; - EventLogSource = null; - Password = null; - UserName = null; - ServiceAccount = ServiceAccount.LocalService; - } - } -} \ No newline at end of file diff --git a/Service/Framework/WindowsServiceHarness.Designer.cs b/Service/Framework/WindowsServiceHarness.Designer.cs deleted file mode 100644 index efeee0a..0000000 --- a/Service/Framework/WindowsServiceHarness.Designer.cs +++ /dev/null @@ -1,37 +0,0 @@ -namespace SystemTemperatureService.Framework -{ - public partial class WindowsServiceHarness - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - this.ServiceName = "UsageService"; - } - - #endregion - } -} diff --git a/Service/Framework/WindowsServiceHarness.cs b/Service/Framework/WindowsServiceHarness.cs deleted file mode 100644 index fa9f1e1..0000000 --- a/Service/Framework/WindowsServiceHarness.cs +++ /dev/null @@ -1,129 +0,0 @@ -using System; -using System.ServiceProcess; - -namespace SystemTemperatureService.Framework -{ - /// - /// A generic Windows Service that can handle any assembly that - /// implements IWindowsService (including AbstractWindowsService) - /// - public partial class WindowsServiceHarness : ServiceBase - { - /// - /// Get the class implementing the windows service - /// - public IWindowsService ServiceImplementation { get; private set; } - - /// - /// Constructor a generic windows service from the given class - /// - /// Service implementation. - public WindowsServiceHarness(IWindowsService serviceImplementation) - { - // make sure service passed in is valid - if (serviceImplementation == null) - { - throw new ArgumentNullException("serviceImplementation", - "IWindowsService cannot be null in call to GenericWindowsService"); - } - - // set instance and backward instance - ServiceImplementation = serviceImplementation; - - // configure our service - ConfigureServiceFromAttributes(serviceImplementation); - } - - /// - /// Override service control on continue - /// - protected override void OnContinue() - { - // perform class specific behavior - ServiceImplementation.OnContinue(); - } - - /// - /// Called when service is paused - /// - protected override void OnPause() - { - // perform class specific behavior - ServiceImplementation.OnPause(); - } - - /// - /// Called when a custom command is requested - /// - /// Id of custom command - protected override void OnCustomCommand(int command) - { - // perform class specific behavior - ServiceImplementation.OnCustomCommand(command); - } - - /// - /// Called when the Operating System is shutting down - /// - protected override void OnShutdown() - { - // perform class specific behavior - ServiceImplementation.OnShutdown(); - } - - /// - /// Called when service is requested to start - /// - /// The startup arguments array. - protected override void OnStart(string[] args) - { - ServiceImplementation.OnStart(args); - } - - /// - /// Called when service is requested to stop - /// - protected override void OnStop() - { - ServiceImplementation.OnStop(); - } - - /// - /// Set configuration data - /// - /// The service with configuration settings. - private void ConfigureServiceFromAttributes(IWindowsService serviceImplementation) - { - var attribute = serviceImplementation.GetType().GetAttribute(); - - if (attribute != null) - { - // wire up the event log source, if provided - if (!string.IsNullOrWhiteSpace(attribute.EventLogSource)) - { - // assign to the base service's EventLog property for auto-log events. - EventLog.Source = attribute.EventLogSource; - } - - CanStop = attribute.CanStop; - CanPauseAndContinue = attribute.CanPauseAndContinue; - CanShutdown = attribute.CanShutdown; - - // we don't handle: laptop power change event - CanHandlePowerEvent = false; - - // we don't handle: Term Services session event - CanHandleSessionChangeEvent = false; - - // always auto-event-log - AutoLog = true; - } - else - { - throw new InvalidOperationException( - string.Format("IWindowsService implementer {0} must have a WindowsServiceAttribute.", - serviceImplementation.GetType().FullName)); - } - } - } -} diff --git a/Service/Framework/WindowsServiceInstaller.Designer.cs b/Service/Framework/WindowsServiceInstaller.Designer.cs deleted file mode 100644 index 475fa95..0000000 --- a/Service/Framework/WindowsServiceInstaller.Designer.cs +++ /dev/null @@ -1,36 +0,0 @@ -namespace SystemTemperatureService.Framework -{ - public partial class WindowsServiceInstaller - { - /// - /// Required designer variable. - /// - private System.ComponentModel.IContainer components = null; - - /// - /// Clean up any resources being used. - /// - /// true if managed resources should be disposed; otherwise, false. - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region Component Designer generated code - - /// - /// Required method for Designer support - do not modify - /// the contents of this method with the code editor. - /// - private void InitializeComponent() - { - components = new System.ComponentModel.Container(); - } - - #endregion - } -} \ No newline at end of file diff --git a/Service/Framework/WindowsServiceInstaller.cs b/Service/Framework/WindowsServiceInstaller.cs deleted file mode 100644 index b0e050e..0000000 --- a/Service/Framework/WindowsServiceInstaller.cs +++ /dev/null @@ -1,212 +0,0 @@ -using System; -using System.Collections; -using System.ComponentModel; -using System.Configuration.Install; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.ServiceProcess; - -namespace SystemTemperatureService.Framework -{ - /// - /// A generic windows service installer - /// - [RunInstaller(true)] - public partial class WindowsServiceInstaller : Installer - { - /// - /// Gets or sets the type of the windows service to install. - /// - public WindowsServiceAttribute Configuration { get; set; } - - - /// - /// Creates a blank windows service installer with configuration in ServiceImplementation - /// - public WindowsServiceInstaller() - : this(typeof(ServiceImplementation)) - { - } - - - /// - /// Creates a windows service installer using the type specified. - /// - /// The type of the windows service to install. - public WindowsServiceInstaller(Type windowsServiceType) - { - if (!windowsServiceType.GetInterfaces().Contains(typeof(IWindowsService))) - { - throw new ArgumentException("Type to install must implement IWindowsService.", - "windowsServiceType"); - } - - var attribute = windowsServiceType.GetAttribute(); - - if (attribute == null) - { - throw new ArgumentException("Type to install must be marked with a WindowsServiceAttribute.", - "windowsServiceType"); - } - - Configuration = attribute; - } - - - /// - /// Performs a transacted installation at run-time of the AutoCounterInstaller and any other listed installers. - /// - /// The IWindowsService implementer to install. - public static void RuntimeInstall() - where T : IWindowsService - { - string path = "/assemblypath=" + Assembly.GetEntryAssembly().Location; - - using (var ti = new TransactedInstaller()) - { - ti.Installers.Add(new WindowsServiceInstaller(typeof(T))); - ti.Context = new InstallContext(null, new[] { path }); - ti.Install(new Hashtable()); - } - } - - - /// - /// Performs a transacted un-installation at run-time of the AutoCounterInstaller and any other listed installers. - /// - /// The other installers to include in the transaction - /// The IWindowsService implementer to install. - public static void RuntimeUnInstall(params Installer[] otherInstallers) - where T : IWindowsService - { - string path = "/assemblypath=" + Assembly.GetEntryAssembly().Location; - - using (var ti = new TransactedInstaller()) - { - ti.Installers.Add(new WindowsServiceInstaller(typeof(T))); - ti.Context = new InstallContext(null, new[] { path }); - ti.Uninstall(null); - } - } - - - /// - /// Installer class, to use run InstallUtil against this .exe - /// - /// The saved state for the installation. - public override void Install(IDictionary savedState) - { - ConsoleHarness.WriteToConsole(ConsoleColor.White, "Installing service {0}.", Configuration.Name); - - // install the service - ConfigureInstallers(); - base.Install(savedState); - - // wire up the event log source, if provided - if (!string.IsNullOrWhiteSpace(Configuration.EventLogSource)) - { - // create the source if it doesn't exist - if (!EventLog.SourceExists(Configuration.EventLogSource)) - { - EventLog.CreateEventSource(Configuration.EventLogSource, "Application"); - } - } - } - - - /// - /// Removes the counters, then calls the base uninstall. - /// - /// The saved state for the installation. - public override void Uninstall(IDictionary savedState) - { - ConsoleHarness.WriteToConsole(ConsoleColor.White, "Un-Installing service {0}.", Configuration.Name); - - // load the assembly file name and the config - ConfigureInstallers(); - base.Uninstall(savedState); - - // wire up the event log source, if provided - if (!string.IsNullOrWhiteSpace(Configuration.EventLogSource)) - { - // create the source if it doesn't exist - if (EventLog.SourceExists(Configuration.EventLogSource)) - { - EventLog.DeleteEventSource(Configuration.EventLogSource); - } - } - } - - - /// - /// Rolls back to the state of the counter, and performs the normal rollback. - /// - /// The saved state for the installation. - public override void Rollback(IDictionary savedState) - { - ConsoleHarness.WriteToConsole(ConsoleColor.White, "Rolling back service {0}.", Configuration.Name); - - // load the assembly file name and the config - ConfigureInstallers(); - base.Rollback(savedState); - } - - - /// - /// Method to configure the installers - /// - private void ConfigureInstallers() - { - // load the assembly file name and the config - Installers.Add(ConfigureProcessInstaller()); - Installers.Add(ConfigureServiceInstaller()); - } - - - /// - /// Helper method to configure a process installer for this windows service - /// - /// Process installer for this service - private ServiceProcessInstaller ConfigureProcessInstaller() - { - var result = new ServiceProcessInstaller(); - - // if a user name is not provided, will run under local service acct - if (string.IsNullOrEmpty(Configuration.UserName)) - { - result.Account = Configuration.ServiceAccount; - result.Username = null; - result.Password = null; - } - else - { - // otherwise, runs under the specified user authority - result.Account = ServiceAccount.User; - result.Username = Configuration.UserName; - result.Password = Configuration.Password; - } - - return result; - } - - - /// - /// Helper method to configure a service installer for this windows service - /// - /// Process installer for this service - private ServiceInstaller ConfigureServiceInstaller() - { - // create and config a service installer - var result = new ServiceInstaller - { - ServiceName = Configuration.Name, - DisplayName = Configuration.DisplayName, - Description = Configuration.Description, - StartType = Configuration.StartMode, - }; - - return result; - } - } -} \ No newline at end of file diff --git a/Service/ISystemTemperatureService.cs b/Service/ISystemTemperatureService.cs index 4c85960..0f781b4 100644 --- a/Service/ISystemTemperatureService.cs +++ b/Service/ISystemTemperatureService.cs @@ -8,5 +8,8 @@ namespace SystemTemperatureService { [OperationContract] List GetDeviceList(); + + [OperationContract] + void Shutdown(); } } diff --git a/Service/Program.cs b/Service/Program.cs index 681ea71..032e520 100644 --- a/Service/Program.cs +++ b/Service/Program.cs @@ -1,17 +1,28 @@ -using Common.Debug; +using System.ServiceModel; +using Common.Debug; +using Microsoft.Win32.TaskScheduler; using System; using System.Diagnostics; using System.Globalization; using System.Linq; -using System.ServiceProcess; -using SystemTemperatureService.Framework; +using System.Reflection; +using System.Windows; +using System.Windows.Threading; namespace SystemTemperatureService { - class Program + public class Program { + private const string ScheduledTaskName = "SystemTemperatureService"; + + public static Dispatcher MainDispatcher { get; set; } + + private static ServiceHost _serviceHost; + static void Main(string[] args) { + MainDispatcher = Dispatcher.CurrentDispatcher; + Tracer.Initialize(null, null, Process.GetCurrentProcess().Id.ToString(CultureInfo.InvariantCulture), Environment.UserInteractive); if (args.Contains("-install", StringComparer.InvariantCultureIgnoreCase)) @@ -20,11 +31,28 @@ namespace SystemTemperatureService try { - WindowsServiceInstaller.RuntimeInstall(); + using (var taskService = new TaskService()) + { + var existingTask = taskService.FindTask(ScheduledTaskName); + + if (existingTask == null) + { + var taskDefinition = taskService.NewTask(); + taskDefinition.Principal.RunLevel = TaskRunLevel.Highest; + + taskDefinition.Triggers.Add(new LogonTrigger()); + taskDefinition.Actions.Add(new ExecAction(Assembly.GetExecutingAssembly().Location)); + + taskService.RootFolder.RegisterTaskDefinition(ScheduledTaskName, taskDefinition); + } + + existingTask = taskService.FindTask(ScheduledTaskName); + existingTask.Run(); + } } catch (Exception exception) { - Tracer.WriteException("Service install", exception); + Tracer.WriteException("Install", exception); } Tracer.WriteLine("Install complete"); @@ -35,27 +63,30 @@ namespace SystemTemperatureService try { - WindowsServiceInstaller.RuntimeUnInstall(); + using (var taskService = new TaskService()) + taskService.RootFolder.DeleteTask(ScheduledTaskName, false); } catch (Exception exception) { - Tracer.WriteException("Service uninstall", exception); + Tracer.WriteException("Uninstall", exception); } Tracer.WriteLine("Uninstall complete"); } else { - Tracer.WriteLine("Starting service"); + Tracer.WriteLine("Starting"); - var implementation = new ServiceImplementation(); + using (_serviceHost = new ServiceHost(typeof(SystemTemperatureService))) + { + _serviceHost.Open(); - if (Environment.UserInteractive) - ConsoleHarness.Run(args, implementation); - else - ServiceBase.Run(new WindowsServiceHarness(implementation)); + var application = new Application(); + application.Run(); + + _serviceHost.Close(); + } } - } } } diff --git a/Service/ServiceImplementation.cs b/Service/ServiceImplementation.cs deleted file mode 100644 index 2831e4a..0000000 --- a/Service/ServiceImplementation.cs +++ /dev/null @@ -1,57 +0,0 @@ -using Common.Debug; -using System; -using System.ServiceModel; -using System.ServiceProcess; -using SystemTemperatureService.Framework; - -namespace SystemTemperatureService -{ - [WindowsService("SystemTemperatureStatus", DisplayName = "System Temperature Status", Description = "", StartMode = ServiceStartMode.Automatic, ServiceAccount = ServiceAccount.LocalSystem)] - public class ServiceImplementation : IWindowsService - { - private ServiceHost _serviceHost; - - public void OnStart(string[] args) - { - using (new BeginEndTracer(GetType().Name)) - { - try - { - _serviceHost = new ServiceHost(typeof(SystemTemperatureService)); - _serviceHost.Open(); - } - catch (Exception exception) - { - Tracer.WriteException("ServiceImplementation.OnStart", exception); - throw; - } - } - } - - public void OnStop() - { - using (new BeginEndTracer(GetType().Name)) - { - try - { - _serviceHost.Close(); - } - catch (Exception exception) - { - Tracer.WriteException("ServiceImplementation.OnStop", exception); - throw; - } - } - } - - public void OnPause() { } - - public void OnContinue() { } - - public void OnShutdown() { } - - public void Dispose() { } - - public void OnCustomCommand(int command) { } - } -} diff --git a/Service/SystemTemperatureService.cs b/Service/SystemTemperatureService.cs index 8f2c9de..19321c3 100644 --- a/Service/SystemTemperatureService.cs +++ b/Service/SystemTemperatureService.cs @@ -1,6 +1,7 @@ using OpenHardwareMonitor.Hardware; using System.Collections.Generic; using System.Linq; +using System.Windows; namespace SystemTemperatureService { @@ -56,5 +57,10 @@ namespace SystemTemperatureService return deviceList; } + + public void Shutdown() + { + Program.MainDispatcher.Invoke(Application.Current.Shutdown); + } } } diff --git a/Service/SystemTemperatureService.csproj b/Service/SystemTemperatureService.csproj index cdea2cc..51bc1bd 100644 --- a/Service/SystemTemperatureService.csproj +++ b/Service/SystemTemperatureService.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {94DE06A9-4F37-487B-96E9-663B9A98F05D} - Exe + WinExe Properties SystemTemperatureService SystemTemperatureService @@ -34,42 +34,34 @@ app.manifest + + + + + ..\packages\TaskScheduler.2.2.0\lib\4\Microsoft.Win32.TaskScheduler.dll + + - - + + - - - - - - Component - - - WindowsServiceHarness.cs - - - Component - - - WindowsServiceInstaller.cs - - - + + Designer + diff --git a/Service/packages.config b/Service/packages.config index 25b6d61..52c62af 100644 --- a/Service/packages.config +++ b/Service/packages.config @@ -2,4 +2,5 @@ + \ No newline at end of file diff --git a/Window/Service References/SystemTemperatureService/Reference.cs b/Window/Service References/SystemTemperatureService/Reference.cs index 91da377..0f0aec9 100644 --- a/Window/Service References/SystemTemperatureService/Reference.cs +++ b/Window/Service References/SystemTemperatureService/Reference.cs @@ -113,6 +113,12 @@ namespace SystemTemperatureStatusWindow.SystemTemperatureService { [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ISystemTemperatureService/GetDeviceList", ReplyAction="http://tempuri.org/ISystemTemperatureService/GetDeviceListResponse")] System.Threading.Tasks.Task> GetDeviceListAsync(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ISystemTemperatureService/Shutdown", ReplyAction="http://tempuri.org/ISystemTemperatureService/ShutdownResponse")] + void Shutdown(); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ISystemTemperatureService/Shutdown", ReplyAction="http://tempuri.org/ISystemTemperatureService/ShutdownResponse")] + System.Threading.Tasks.Task ShutdownAsync(); } [System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "4.0.0.0")] @@ -149,5 +155,13 @@ namespace SystemTemperatureStatusWindow.SystemTemperatureService { public System.Threading.Tasks.Task> GetDeviceListAsync() { return base.Channel.GetDeviceListAsync(); } + + public void Shutdown() { + base.Channel.Shutdown(); + } + + public System.Threading.Tasks.Task ShutdownAsync() { + return base.Channel.ShutdownAsync(); + } } } diff --git a/Window/Service References/SystemTemperatureService/SystemTemperatureService1.wsdl b/Window/Service References/SystemTemperatureService/SystemTemperatureService1.wsdl index 328b2ed..6b0569f 100644 --- a/Window/Service References/SystemTemperatureService/SystemTemperatureService1.wsdl +++ b/Window/Service References/SystemTemperatureService/SystemTemperatureService1.wsdl @@ -134,6 +134,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -147,11 +185,21 @@ + + + + + + + + + + @@ -167,6 +215,17 @@ + + + + + + + + + + + diff --git a/Window/Service References/SystemTemperatureService/SystemTemperatureService31.xsd b/Window/Service References/SystemTemperatureService/SystemTemperatureService31.xsd index 5bf52ae..b25ab5a 100644 --- a/Window/Service References/SystemTemperatureService/SystemTemperatureService31.xsd +++ b/Window/Service References/SystemTemperatureService/SystemTemperatureService31.xsd @@ -13,4 +13,14 @@ + + + + + + + + + + \ No newline at end of file