Example #1
0
        public string Render(ScriptBundle unusedParameter)
        {
            if (isDebuggingEnabled && Assets.Any())
            {
                return(FallbackRenderer.Render(this));
            }

            var conditionalRenderer = new ConditionalRenderer();

            return(conditionalRenderer.Render(Condition, html =>
            {
                if (Assets.Any())
                {
                    RenderScriptHtmlWithFallback(html);
                }
                else
                {
                    RenderScriptHtml(html);
                }
            }));
        }
Example #2
0
        string CreateFallbackScripts()
        {
            var scripts = FallbackRenderer.Render(this);

            return(ConvertToDocumentWriteCalls(scripts));
        }