1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-26 11:38:02 +02:00

DeleteDictionaryAndKeysAndItems to DeleteDictionaryAndKeysAndValues

This commit is contained in:
Brian Fiete 2021-01-04 04:56:44 -08:00
parent d78cb3182a
commit f9b9b15214
15 changed files with 38 additions and 23 deletions

View file

@ -153,7 +153,7 @@ static
}
[NoShow]
[Obsolete("This mixin has been replaced by ClearAndDeleteItems", false)]
[Obsolete("Replaced by ClearAndDeleteItems", false)]
public static mixin DeleteAndClearItems(var container)
{
for (var value in container)
@ -187,7 +187,7 @@ static
}
}
public static mixin DeleteDictionaryAndItems(var container)
public static mixin DeleteDictionaryAndValues(var container)
{
if (container != null)
{
@ -199,6 +199,8 @@ static
}
}
[NoShow]
[Obsolete("Replaced by DeleteDictionaryAndKeysAndValues", false)]
public static mixin DeleteDictionaryAndKeysAndItems(var container)
{
if (container != null)
@ -212,6 +214,19 @@ static
}
}
public static mixin DeleteDictionaryAndKeysAndValues(var container)
{
if (container != null)
{
for (var value in container)
{
delete value.key;
delete value.value;
}
delete container;
}
}
public static mixin DeleteAndNullify(var val)
{
delete val;