Example #1
0
 private string Render(string renderTo, string key, bool isNamed = false)
 {
     if (debugStatusReader.IsDebuggingEnabled())
     {
         return(RenderDebug(isNamed ? key : null));
     }
     return(RenderRelease(key, renderTo, new FileRenderer(fileWriterFactory)));
 }
Example #2
0
 protected IRenderer GetFileRenderer()
 {
     return(debugStatusReader.IsDebuggingEnabled() ? new FileRenderer(fileWriterFactory) :
            bundleState.ReleaseFileRenderer ??
            Configuration.Instance.DefaultReleaseRenderer() ??
            new FileRenderer(fileWriterFactory));
 }
Example #3
0
        private Input GetInputFile(Asset asset)
        {
            if (!asset.IsEmbeddedResource)
            {
                if (debugStatusReader.IsDebuggingEnabled())
                {
                    return(GetFileSystemPath(asset.LocalPath));
                }

                if (asset.IsRemoteDownload)
                {
                    return(GetHttpPath(asset.RemotePath));
                }
                else
                {
                    return(GetFileSystemPath(asset.LocalPath));
                }
            }
            else
            {
                return(GetEmbeddedResourcePath(asset.RemotePath));
            }
        }
Example #4
0
        private string GetResolvedSystemPath(Asset asset)
        {
            string path;

            if (asset.RemotePath == null)
            {
                path = GetFileSystemPath(asset.LocalPath);
            }
            else
            {
                if (asset.IsEmbeddedResource)
                {
                    path = GetEmbeddedResourcePath(asset.RemotePath);
                }
                else
                {
                    //Remote files do not need to be resolved as they cannot be a cache dependency
                    path = debugStatusReader.IsDebuggingEnabled() ? GetFileSystemPath(asset.LocalPath) : null;
                }
            }

            return(path);
        }
Example #5
0
 protected bool IsDebuggingEnabled()
 {
     return(debugStatusReader.IsDebuggingEnabled(bundleState.DebugPredicate));
 }