1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +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

@ -19,7 +19,7 @@ namespace System.Diagnostics
String mDirectory = new String() ~ delete _;
String mVerb = new String("Open") ~ delete _;
public Dictionary<String, String> mEnvironmentVariables ~ DeleteDictionaryAndKeysAndItems!(_);
public Dictionary<String, String> mEnvironmentVariables ~ DeleteDictionaryAndKeysAndValues!(_);
public bool UseShellExecute { get { return mUseShellExecute; } set { mUseShellExecute = value; } };
public bool RedirectStandardInput { get { return mRedirectStandardInput; } set { mRedirectStandardInput = value; } };

View file

@ -4,7 +4,7 @@ namespace System
{
class PropertyBag
{
public Dictionary<String, Object> mProperties ~ DeleteDictionaryAndKeysAndItems!(_);
public Dictionary<String, Object> mProperties ~ DeleteDictionaryAndKeysAndValues!(_);
public void Add<T>(String key, T value) where T : struct
{

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;

View file

@ -224,7 +224,7 @@ namespace System {
}
#if FEATURE_WIN32_REGISTRY
public Dictionary<String, TimeZoneInfo> m_systemTimeZones ~ DeleteDictionaryAndKeysAndItems!(_);
public Dictionary<String, TimeZoneInfo> m_systemTimeZones ~ DeleteDictionaryAndKeysAndValues!(_);
//public ReadOnlyCollection<TimeZoneInfo> m_readOnlySystemTimeZones;
public bool m_allSystemTimeZonesRead;