mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Made AddDynamicChild return the datamodel added
This commit is contained in:
1 parent
8f552d0f71
commit
36571471cf
1 file changed
+3
-1
@@ -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="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="name">An optional name, if not provided the key will be used in a humanized form</param>
|
||||||
/// <param name="description">An optional description</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)
|
if (dynamicDataModel == null)
|
||||||
throw new ArgumentNullException(nameof(dynamicDataModel));
|
throw new ArgumentNullException(nameof(dynamicDataModel));
|
||||||
@@ -91,6 +91,8 @@ namespace Artemis.Core.DataModelExpansions
|
|||||||
Description = description
|
Description = description
|
||||||
};
|
};
|
||||||
_dynamicDataModels.Add(key, dynamicDataModel);
|
_dynamicDataModels.Add(key, dynamicDataModel);
|
||||||
|
|
||||||
|
return dynamicDataModel;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in new issue
Block a user