Swapped System.RecycleBinContent string conversions

to use the `System.RecycleBinContentString` constant.

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

Since the `System.RecycleBinContentString` is `-20`, it didn't
need the culture invariant conversion.
This commit is contained in:
leekelleher
2019-03-29 12:14:27 +00:00
parent 13564c72ef
commit a4c96678e5
2 changed files with 2 additions and 2 deletions

View File

@@ -22,7 +22,7 @@ namespace Umbraco.Core.Compose
private static void ContentService_Moved(IContentService sender, MoveEventArgs<IContent> e)
{
foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Constants.System.RecycleBinContent.ToInvariantString())))
foreach (var item in e.MoveInfoCollection.Where(x => x.OriginalPath.Contains(Constants.System.RecycleBinContentString)))
{
var relationService = Current.Services.RelationService;
const string relationTypeAlias = Constants.Conventions.RelationTypes.RelateParentDocumentOnDeleteAlias;

View File

@@ -156,7 +156,7 @@ namespace Umbraco.Core.Models
internal static bool HasContentBinAccess(this IUser user, IEntityService entityService)
{
return ContentPermissionsHelper.HasPathAccess(Constants.System.RecycleBinContent.ToInvariantString(), user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
return ContentPermissionsHelper.HasPathAccess(Constants.System.RecycleBinContentString, user.CalculateContentStartNodeIds(entityService), Constants.System.RecycleBinContent);
}
internal static bool HasMediaRootAccess(this IUser user, IEntityService entityService)