Data models - Added ClearDynamicChildren method

Plugins - Added async support for timed updates
Plugins - Added dialog host to plugin settings window
Data model visualization - Fixed some null references
Data model visualization - Added check to ensure parameterless getters are present
This commit is contained in:
SpoinkyNL committed 2020-10-11 22:37:39 +02:00
1 parent c095f329c4
commit 17d41647b6
8 files changed
+96 -26

No files matched your search

@@ -67,10 +67,8 @@ namespace Artemis.Core.DataModelExpansions
if (key.Contains('.'))
throw new ArtemisCoreException("The provided key contains an illegal character (.)");
if (_dynamicDataModels.ContainsKey(key))
{
throw new ArtemisCoreException($"Cannot add a dynamic data model with key '{key}' " +
"because the key is already in use on by another dynamic property this data model.");
}
if (_dynamicDataModels.ContainsValue(dynamicDataModel))
{
@@ -80,10 +78,8 @@ namespace Artemis.Core.DataModelExpansions
}
if (GetType().GetProperty(key) != null)
{
throw new ArtemisCoreException($"Cannot add a dynamic data model with key '{key}' " +
"because the key is already in use by a static property on this data model.");
}
dynamicDataModel.PluginInfo = PluginInfo;
dynamicDataModel.DataModelDescription = new DataModelPropertyAttribute
@@ -125,6 +121,15 @@ namespace Artemis.Core.DataModelExpansions
}
}
/// <summary>
/// Removes all dynamic data models from this data model
/// </summary>
public void ClearDynamicChildren()
{
while (_dynamicDataModels.Any())
RemoveDynamicChildByKey(_dynamicDataModels.First().Key);
}
/// <summary>
/// Gets a dynamic data model of type <typeparamref name="T" /> by its key
/// </summary>