public string GetContent(IContentPipeline pipeline) { var transformer = pipeline.GetTransformer <T>(); var innerContents = _inner.GetContent(pipeline); return(transformer.Transform(innerContents, Files)); }
protected override void beforeEach() { theInners = Services.CreateMockArrayFor <IContentSource>(4); files1 = new AssetFile[] { new AssetFile("a.js"), new AssetFile("b.js") }; files2 = new AssetFile[] { new AssetFile("c.js"), new AssetFile("d.js") }; files3 = new AssetFile[] { new AssetFile("e.js"), new AssetFile("f.js") }; files4 = new AssetFile[] { new AssetFile("g.js"), new AssetFile("h.js") }; allFiles = files1.Union(files2).Union(files3).Union(files4).ToArray(); theInners[0].Stub(x => x.Files).Return(files1); theInners[1].Stub(x => x.Files).Return(files2); theInners[2].Stub(x => x.Files).Return(files3); theInners[3].Stub(x => x.Files).Return(files4); theInnerContent = new string[] { "1", "2", "3", "4" }; thePipeline = MockFor <IContentPipeline>(); for (int i = 0; i < theInners.Length; i++) { theInners[i].Stub(x => x.GetContent(thePipeline)).Return(theInnerContent[i]); } }
public ContentWriter(IAssetFileGraph fileGraph, IContentPlanCache cache, IContentPipeline contentPipeline, IOutputWriter writer) { _fileGraph = fileGraph; _cache = cache; _contentPipeline = contentPipeline; _writer = writer; }
public ContentWriter(IAssetPipeline pipeline, IContentPlanCache cache, IContentPipeline contentPipeline, IOutputWriter writer) { _pipeline = pipeline; _cache = cache; _contentPipeline = contentPipeline; _writer = writer; }
public PipelineHandler(IContentPipeline pipeline) { _pipeline = pipeline; var settings = WebConfigurationManager.GetWebApplicationSection( "system.web/caching/outputCacheSettings") as OutputCacheSettingsSection; _cacheProfile = settings.OutputCacheProfiles[CacheProfileName] ?? CreateDefaultCacheProfile(); }
public string GetContent(IContentPipeline pipeline) { var builder = new StringBuilder(); _innerSources.Select(x => x.GetContent(pipeline)).Each(content => { builder.AppendLine(content); builder.AppendLine(); }); return builder.ToString().TrimEnd(); }
/// <summary> /// Releases unmanaged and - optionally - managed resources /// </summary> /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> /// to release only unmanaged resources.</param> protected virtual void Dispose(bool disposing) { if (disposing) { if (_pipeline != null) { _pipeline.Dispose(); _pipeline = null; } } }
public string GetContent(IContentPipeline pipeline) { var builder = new StringBuilder(); _innerSources.Select(x => x.GetContent(pipeline)).Each(content => { builder.AppendLine(content); builder.AppendLine(); }); return(builder.ToString().TrimEnd()); }
public string GetContent(IContentPipeline pipeline) { bool isJavascript = _innerSources.SelectMany(x => x.Files).Any(x => x.MimeType == MimeType.Javascript); var builder = new StringBuilder(); _innerSources.Select(x => x.GetContent(pipeline)).Each(content => { builder.AppendLine(content); builder.AppendLine(); if (isJavascript) { builder.AppendLine(";;"); builder.AppendLine(); } }); return builder.ToString().TrimEnd(); }
public string GetContent(IContentPipeline pipeline) { bool isJavascript = _innerSources.SelectMany(x => x.Files).Any(x => x.MimeType == MimeType.Javascript); var builder = new StringBuilder(); _innerSources.Select(x => x.GetContent(pipeline)).Each(content => { builder.AppendLine(content); builder.AppendLine(); if (isJavascript) { builder.AppendLine(";;"); builder.AppendLine(); } }); return(builder.ToString().TrimEnd()); }
public ContentPlanExecutor(IContentPlanCache cache, IContentPipeline pipeline) { _cache = cache; _pipeline = pipeline; }
public PipelineHandler(IContentPipeline pipeline) { _pipeline = pipeline; }
public ContentTransformState(IContentPipeline pipeline, string physicalPath) { Pipeline = pipeline; RemapPath(physicalPath); }
string IContentSource.GetContent(IContentPipeline pipeline) { return(Top().GetContent(pipeline)); }
protected SassAndCoffeeHandler(IContentPipeline pipeline) { this.pipeline = pipeline; }
public string GetContent(IContentPipeline pipeline) { return(pipeline.ReadContentsFrom(_file.FullPath)); }
/// <summary> /// Initializes a new instance of the <see cref="PathBasedHandlerRemapper"/> class. /// </summary> /// <param name="handledExtension">The handled extension. Include the '.': ".css"</param> /// <param name="transformations">The transformations to apply in the content pipeline.</param> public PathBasedHandlerRemapper(string handledExtension, params IContentTransform[] transformations) { _handledExtension = handledExtension; _pipeline = new ContentPipeline(transformations); _handler = new PipelineHandler(_pipeline); }
string IContentSource.GetContent(IContentPipeline pipeline) { return Top().GetContent(pipeline); }