Removes booting.aspx and creates embedded html pages for booting and failed (if those are ever seen ), renames some classes and namespaces, removes old cdf bundle classes
This commit is contained in:
33
src/Umbraco.Web/JavaScript/ServerVariablesParser.cs
Normal file
33
src/Umbraco.Web/JavaScript/ServerVariablesParser.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Umbraco.Web.JavaScript
|
||||
{
|
||||
public sealed class ServerVariablesParser
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Allows developers to add custom variables on parsing
|
||||
/// </summary>
|
||||
public static event EventHandler<Dictionary<string, object>> Parsing;
|
||||
|
||||
internal const string Token = "##Variables##";
|
||||
|
||||
internal static string Parse(Dictionary<string, object> items)
|
||||
{
|
||||
var vars = Resources.ServerVariables;
|
||||
|
||||
//Raise event for developers to add custom variables
|
||||
if (Parsing != null)
|
||||
{
|
||||
Parsing(null, items);
|
||||
}
|
||||
|
||||
var json = JObject.FromObject(items);
|
||||
return vars.Replace(Token, json.ToString());
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user