public TextFileContents Load(string relativePath) { if (string.IsNullOrWhiteSpace(relativePath)) { throw new ArgumentException("Null/blank relativePath specified"); } var content = _contentLoader.Load(relativePath); _callback(content); return(content); }
/// <summary> /// This will never return null, it will throw an exception for a null or empty filename - it is up to the particular implementation whether or not to throw an /// exception for invalid / inaccessible filenames (if no exception is thrown, the issue should be logged). It is up the the implementation to handle mapping /// the relative path to a full file path. /// </summary> public TextFileContents Load(string relativePath) { if (string.IsNullOrWhiteSpace(relativePath)) { throw new ArgumentException("Null/blank relativePath specified"); } var unprocessedContent = _fileLoader.Load(relativePath); return(new TextFileContents( unprocessedContent.RelativePath, unprocessedContent.LastModified, Process(unprocessedContent.Content) )); }
/// <summary> /// This will never return null. It will throw an exception for a null or blank relativePath. /// </summary> public TextFileContents Load(string relativePath) { if (string.IsNullOrWhiteSpace(relativePath)) { throw new ArgumentException("Null/blank relativePath specified"); } var content = _contentLoader.Load(relativePath); return(new TextFileContents( content.RelativePath, content.LastModified, MinifyCSS(content.Content) )); }