This commit is contained in:
CortexCore
2025-08-05 23:34:10 +08:00
parent c3f0a8e840
commit 2554487fa4
23 changed files with 652 additions and 67 deletions

View File

@@ -139,6 +139,17 @@ namespace BITKit
/// </summary>
// ReSharper disable once EventNeverInvoked.Global
event Action<IRuntimeItem> OnRuntimePropertiesChanged;
public bool TryGetRuntimeProperty<T>(out T value)
{
if (RuntimeProperties.TryGetValue(typeof(T), out var o) && o is T t)
{
value = t;
return true;
}
value = default;
return false;
}
}
#endregion