mirror of
https://github.com/S7NetPlus/s7netplus.git
synced 2026-02-17 14:28:25 +08:00
Fixes a problem that prevented to run unit tests on a pc without Step7 installed.
Signed-off-by: Michele Cattafesta <michele.cattafesta@mesta-automation.com>
This commit is contained in:
@@ -193,13 +193,17 @@ namespace S7.Net.UnitTest
|
||||
|
||||
private static void ShutDownServiceS7oiehsx64()
|
||||
{
|
||||
ServiceController sc = new ServiceController("s7oiehsx64");
|
||||
switch (sc.Status)
|
||||
try
|
||||
{
|
||||
case ServiceControllerStatus.Running:
|
||||
sc.Stop();
|
||||
break;
|
||||
ServiceController sc = new ServiceController("s7oiehsx64");
|
||||
switch (sc.Status)
|
||||
{
|
||||
case ServiceControllerStatus.Running:
|
||||
sc.Stop();
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch { } // service not found
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user