protected virtual string GenerateCache() { var result = new StringBuilder(); result.AppendLine(); result.AppendLine("CACHE:"); CacheAssets.ToList().ForEach(a => result.AppendLine(a)); return(result.ToString()); }
public AppCacheResult( IEnumerable <string> cacheAssets, IEnumerable <string> networkAssets = null, IDictionary <string, string> fallbackAssets = null, string fingerprint = null) { if (cacheAssets == null) { throw new ArgumentNullException("cacheAssets"); } CacheAssets = cacheAssets.ToList(); if (!CacheAssets.Any()) { throw new ArgumentException( "Cached url cannot be empty.", "cacheAssets"); } NetworkAssets = networkAssets ?? new List <string>(); FallbackAssets = fallbackAssets ?? new Dictionary <string, string>(); Fingerprint = fingerprint; }