diff options
author | Kenneth Hsu <kennethhsu@gmail.com> | 2018-05-24 07:18:01 +0300 |
---|---|---|
committer | Kenneth Hsu <kennethhsu@gmail.com> | 2018-05-25 20:04:52 +0300 |
commit | f12858e6a5ac7b849eaf6ffb43633a014fc53e9a (patch) | |
tree | 52373632eb5f8956698ffd970959a6e5e8ad698d /Duplicati/License | |
parent | a7575d6bda695205297eb98120799267b10a4d93 (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.cs | 8 |
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>
|