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:
@@ -44,7 +44,7 @@ namespace Umbraco.Web.Trees
|
||||
var entities = Services.EntityService.GetChildren(Constants.System.Root, UmbracoObjectTypes.DocumentBlueprint).ToArray();
|
||||
|
||||
//check if we're rendering the root in which case we'll render the content types that have blueprints
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
if (id == Constants.System.RootString)
|
||||
{
|
||||
//get all blueprint content types
|
||||
var contentTypeAliases = entities.Select(x => ((ContentEntitySlim) x).ContentTypeAlias).Distinct();
|
||||
@@ -91,7 +91,7 @@ namespace Umbraco.Web.Trees
|
||||
{
|
||||
var menu = new MenuItemCollection();
|
||||
|
||||
if (id == Constants.System.Root.ToInvariantString())
|
||||
if (id == Constants.System.RootString)
|
||||
{
|
||||
// root actions
|
||||
menu.Items.Add<ActionNew>(Services.TextService, opensDialog: true);
|
||||
|
||||
Reference in New Issue
Block a user