public void Write(AssetPath path) { //_output.AppendHeader(HttpResponseHeader.ETag, "random"); if (!_writer.Write(path, files => processAssetFiles(path, files))) { _output.Write("Cannot find asset " + path.ToFullName()); _output.WriteResponseCode(HttpStatusCode.NotFound); } }
public void Write(AssetPath path) { var files = _writer.Write(path); if (files.Any()) { processAssetFiles(path, files); } else { _output.WriteResponseCode(HttpStatusCode.NotFound); _output.Write("Cannot find asset " + path.ToFullName()); } }
public void WriteContent(IEnumerable<string> routeParts) { var path = new AssetPath(routeParts); if (path.IsImage()) { _images.WriteImageToOutput(path.ToFullName()); } else { // TODO -- have to deal with the [package]:scripts/ // think it'll just be testing _executor.Execute(path, (contents, files) => { _caching.CacheRequestAgainstFileChanges(files.Select(x => x.FullPath)); _writer.Write(files.First().MimeType, contents); }); } }