Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Hsu <kennethhsu@gmail.com>2019-10-19 20:56:21 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2019-10-19 23:59:22 +0300
commit2aa76881a51ce91762f7caabcc114434647532c2 (patch)
tree19f18239244918e0314b8282f7efa89c72acb2c6 /Duplicati/WindowsService
parent91505e62238a68f020d99bd9a7c1a2be8e3b25cf (diff)
Mark fields that don't need to be reassigned as readonly.
This makes it explicit at compile-time that these fields should not be reassigned outside the constructor.
Diffstat (limited to 'Duplicati/WindowsService')
-rw-r--r--Duplicati/WindowsService/ServiceControl.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Duplicati/WindowsService/ServiceControl.cs b/Duplicati/WindowsService/ServiceControl.cs
index 281bc7306..b4d36f032 100644
--- a/Duplicati/WindowsService/ServiceControl.cs
+++ b/Duplicati/WindowsService/ServiceControl.cs
@@ -145,12 +145,12 @@ namespace Duplicati.WindowsService
[StructLayout(LayoutKind.Sequential)]
private struct ServiceStatus
{
- public uint dwServiceType;
+ public readonly uint dwServiceType;
public ServiceState dwCurrentState;
- public uint dwControlsAccepted;
- public uint dwWin32ExitCode;
- public uint dwServiceSpecificExitCode;
- public uint dwCheckPoint;
+ public readonly uint dwControlsAccepted;
+ public readonly uint dwWin32ExitCode;
+ public readonly uint dwServiceSpecificExitCode;
+ public readonly uint dwCheckPoint;
public uint dwWaitHint;
};