mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Made AddDynamicChild return the datamodel added
This commit is contained in:
parent
8f552d0f71
commit
36571471cf
@ -58,7 +58,7 @@ namespace Artemis.Core.DataModelExpansions
|
||||
/// <param name="key">The key of the child, must be unique to this data model</param>
|
||||
/// <param name="name">An optional name, if not provided the key will be used in a humanized form</param>
|
||||
/// <param name="description">An optional description</param>
|
||||
public void AddDynamicChild(DataModel dynamicDataModel, string key, string name = null, string description = null)
|
||||
public DataModel AddDynamicChild(DataModel dynamicDataModel, string key, string name = null, string description = null)
|
||||
{
|
||||
if (dynamicDataModel == null)
|
||||
throw new ArgumentNullException(nameof(dynamicDataModel));
|
||||
@ -91,6 +91,8 @@ namespace Artemis.Core.DataModelExpansions
|
||||
Description = description
|
||||
};
|
||||
_dynamicDataModels.Add(key, dynamicDataModel);
|
||||
|
||||
return dynamicDataModel;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user