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>2018-05-24 07:18:01 +0300
committerKenneth Hsu <kennethhsu@gmail.com>2018-05-25 20:04:52 +0300
commitf12858e6a5ac7b849eaf6ffb43633a014fc53e9a (patch)
tree52373632eb5f8956698ffd970959a6e5e8ad698d /Duplicati/License
parenta7575d6bda695205297eb98120799267b10a4d93 (diff)
Mark fields that shouldn't 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/License')
-rw-r--r--Duplicati/License/LicenseReader.cs8
1 files changed, 4 insertions, 4 deletions
diff --git a/Duplicati/License/LicenseReader.cs b/Duplicati/License/LicenseReader.cs
index bd2d6ca6f..01ad385bf 100644
--- a/Duplicati/License/LicenseReader.cs
+++ b/Duplicati/License/LicenseReader.cs
@@ -31,16 +31,16 @@ namespace Duplicati.License
/// <summary>
/// The regular expression used to find url files
/// </summary>
- private static System.Text.RegularExpressions.Regex URL_FILENAME = new System.Text.RegularExpressions.Regex("(homepage.txt)|(download.txt)", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+ private static readonly System.Text.RegularExpressions.Regex URL_FILENAME = new System.Text.RegularExpressions.Regex("(homepage.txt)|(download.txt)", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
/// <summary>
/// The regular expression used to find license files
/// </summary>
- private static System.Text.RegularExpressions.Regex LICENSE_FILENAME = new System.Text.RegularExpressions.Regex("license.txt", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+ private static readonly System.Text.RegularExpressions.Regex LICENSE_FILENAME = new System.Text.RegularExpressions.Regex("license.txt", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
/// <summary>
/// The regular expression used to find licensedata files
/// </summary>
- private static System.Text.RegularExpressions.Regex LICENSEDATA_FILENAME = new System.Text.RegularExpressions.Regex("licensedata.json", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
-
+ private static readonly System.Text.RegularExpressions.Regex LICENSEDATA_FILENAME = new System.Text.RegularExpressions.Regex("licensedata.json", System.Text.RegularExpressions.RegexOptions.IgnoreCase);
+
/// <summary>
/// Reads all license files in the given base folder
/// </summary>