Swapped all System.Root string conversions

to use the `System.RootString` constant.

This saves on integer parsing and reduces the number of
new strings being created.

Since the `System.Root` is `-1`, it didn't need the culture invariant
conversion.
This commit is contained in:
leekelleher
2019-03-29 12:06:23 +00:00
parent 853087a750
commit f4bd0cd1f5
21 changed files with 38 additions and 38 deletions

View File

@@ -29,7 +29,7 @@ namespace Umbraco.Web.Trees
{
var nodes = new TreeNodeCollection();
if (id == Constants.System.Root.ToInvariantString())
if (id == Constants.System.RootString)
{
foreach (var macro in Services.MacroService.GetAll())
{
@@ -50,7 +50,7 @@ namespace Umbraco.Web.Trees
{
var menu = new MenuItemCollection();
if (id == Constants.System.Root.ToInvariantString())
if (id == Constants.System.RootString)
{
//Create the normal create action
menu.Items.Add<ActionNew>(Services.TextService);