Minor cleanup for improved backwards compatibility

This commit is contained in:
Ronald Barendse
2021-07-14 16:23:06 +02:00
parent 476685c9de
commit ade88757a7
4 changed files with 7 additions and 7 deletions

View File

@@ -178,16 +178,17 @@ namespace Umbraco.Core.Models
}
// TODO Remove this method in v9 (only needed for backwards compatibility with names)
public new bool Contains(string key) => IndexOfKey(key) != -1;
public new bool Contains(string groupName) => IndexOfKey(groupName) != -1;
public bool Contains(int id)
{
return this.Any(x => x.Id == id);
}
public void RemoveItem(string key)
[Obsolete("Use Remove(key) instead.")]
public void RemoveItem(string propertyGroupName)
{
var index = IndexOfKey(key);
var index = IndexOfKey(propertyGroupName);
// Only removes an item if the key was found
if (index != -1)