Improved service restart experience

master v0.1.7
Inga 🏳‍🌈 4 years ago
parent 62c12bd600
commit dcff47ce27
  1. 3
      RadeonResetBugFixService/RadeonResetBugFixService.csproj
  2. 15
      RadeonResetBugFixService/Tasks/BasicTasks/StartAudioServiceTask.cs
  3. 1
      RadeonResetBugFixService/Tasks/ComplexTasks/ShutdownTask.cs

@ -87,7 +87,6 @@
<DependentUpon>RadeonResetBugFixService.cs</DependentUpon>
</Compile>
<Compile Include="RegistryHelper.cs" />
<Compile Include="Tasks\ITask.cs" />
<Compile Include="Tasks\BasicTasks\AbstractDevicesTask.cs" />
<Compile Include="Tasks\BasicTasks\AbstractServiceTask.cs" />
<Compile Include="Tasks\BasicTasks\DisableAmdVideoTask.cs" />
@ -100,11 +99,13 @@
<Compile Include="Tasks\BasicTasks\LastResortDevicesRestoreTask.cs" />
<Compile Include="Tasks\BasicTasks\ListDevicesTask.cs" />
<Compile Include="Tasks\BasicTasks\SleepTask.cs" />
<Compile Include="Tasks\BasicTasks\StartAudioServiceTask.cs" />
<Compile Include="Tasks\BasicTasks\StopAudioServiceTask.cs" />
<Compile Include="Tasks\ComplexTasks\AbstractSequentialTask.cs" />
<Compile Include="Tasks\ComplexTasks\DiagnoseTask.cs" />
<Compile Include="Tasks\ComplexTasks\ShutdownTask.cs" />
<Compile Include="Tasks\ComplexTasks\StartupTask.cs" />
<Compile Include="Tasks\ITask.cs" />
<Compile Include="TasksProcessor.cs" />
<Compile Include="ThirdParty\DisableDevice.cs" />
<Compile Include="ThirdParty\MonitorChanger.cs" />

@ -0,0 +1,15 @@
namespace RadeonResetBugFixService.Tasks.BasicTasks
{
using System;
using System.ServiceProcess;
class StartAudioServiceTask : AbstractServiceTask
{
public override string TaskName => "Stopping audio service";
protected override bool ShouldStart(ServiceController serviceInfo)
{
return serviceInfo.ServiceName.Equals("audiosrv", StringComparison.OrdinalIgnoreCase);
}
}
}

@ -22,6 +22,7 @@
new DisableAmdVideoTask(this.Context.ShutdownDevicesStatus),
new LastResortDevicesRestoreTask(this.Context.StartupDevicesStatus),
new LastResortDevicesRestoreTask(this.Context.StartupDevicesStatus), // just in case
new StartAudioServiceTask(),
new DisableBasicDisplayStartupTask(this.Context.StartupDevicesStatus),
};
}

Loading…
Cancel
Save