public void Add(string key, string value) { if (key == null) throw new ArgumentNullException(key); if (value == null) throw new ArgumentNullException(value); FileCacheModel fm; if (!_cache.TryGetValue(key, out fm)) { fm = new FileCacheModel(); _cache[key] = fm; } fm.Content = value; }
public void Add(string key, string value) { if (key == null) { throw new ArgumentNullException(key); } var content = value ?? throw new ArgumentNullException(value); if (!_cache.TryGetValue(key, out FileCacheModel fm)) { fm = new FileCacheModel(); _cache[key] = fm; } fm.Content = content; }