Je hebt een klacht over de onderstaande posting:
@ anoniem van 20:44 Een manier om het probleem dat je noemt te tackelen: 1 } 2 } 3 namespace fbs.Filesystem 4 { 5 /// <summary> 6 /// Provides cached read access to small, frequently used files. Use carefully! 7 //// Uses HostingEnvironment.Cache (same as app cache). 8 /// </summary> 9 public static class CachedFileAccess 10 { 11 /// <summary> 12 /// Retrieves the file from the cache, or from disk if neccessary. Exceptions from IO.File.ReadAllText are not caught. 13 /// Make sure the file exists and can be accessed before attempting this function. 14 /// </summary> 15 /// <param name="file">Standard pathname (C:\..</param> 16 /// <param name="encoding"></param> 17 /// <returns></returns> 18 public static string ReadAllText(string file, Encoding encoding) 19 { 20 21 if (HostingEnvironment.Cache == null) throw new InvalidOperationException("HostingEnvironment.Cache is null"); 22 string key = "cached_file(" + ...
Beschrijf je klacht (Optioneel):