Changeset 372 for binary-improvements/MapRendering/Web/WebPermissions.cs
- Timestamp:
- Jul 27, 2022, 7:17:17 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/MapRendering/Web/WebPermissions.cs
r369 r372 18 18 private readonly Dictionary<string, WebModulePermission> modules = new CaseInsensitiveStringDictionary<WebModulePermission> (); 19 19 20 p ublicWebPermissions () {20 private WebPermissions () { 21 21 allModulesList = new List<WebModulePermission> (); 22 22 allModulesListRO = new ReadOnlyCollection<WebModulePermission> (allModulesList); … … 29 29 get { 30 30 lock (typeof (WebPermissions)) { 31 if (instance == null) { 32 instance = new WebPermissions (); 33 } 34 35 return instance; 31 return instance ?? (instance = new WebPermissions ()); 36 32 } 37 33 } … … 52 48 53 49 public WebModulePermission GetModulePermission (string _module) { 54 WebModulePermission result; 55 if (modules.TryGetValue (_module, out result)) { 50 if (modules.TryGetValue (_module, out WebModulePermission result)) { 56 51 return result; 57 52 } … … 192 187 193 188 if (!File.Exists (GetFullPath ())) { 194 Log.Out ( string.Format ("Permissions file '{0}' not found, creating.", GetFileName ()));189 Log.Out ($"Permissions file '{GetFileName ()}' not found, creating."); 195 190 Save (); 196 191 return; 197 192 } 198 193 199 Log.Out ( string.Format ("Loading permissions file at '{0}'", GetFullPath ()));194 Log.Out ($"Loading permissions file at '{GetFullPath ()}'"); 200 195 201 196 XmlDocument xmlDoc = new XmlDocument ();
Note:
See TracChangeset
for help on using the changeset viewer.