This commit is contained in:
CortexCore
2024-04-06 16:33:32 +08:00
parent 637bbef7d2
commit 37e7fcea51
42 changed files with 597 additions and 149 deletions

View File

@@ -119,11 +119,16 @@ namespace BITKit
}
public bool TryRemoveProperty<T>()
{
if(properties.TryGetValue(typeof(T).FullName, out var x))
foreach (var pair in properties.Where(x=>x.Value is T))
{
properties.Remove(typeof(T).Name);
properties.Remove(pair.Key);
return true;
}
// if(properties.TryGetValue(typeof(T).FullName, out var x))
// {
// properties.Remove(typeof(T).Name);
// return true;
// }
return false;
}
public bool TrySetProperty<T>(T value)