Merge branch 'development'

This commit is contained in:
Robert committed 2021-09-11 21:13:53 +02:00
commit fa0f8b5a1a
37 files changed
+424 -262

No files matched your search

@@ -26,6 +26,9 @@ namespace Artemis.Core.Modules
// These are both set right after construction to keep the constructor of inherited classes clean
Module = null!;
DataModelDescription = null!;
ActivePaths = new(_activePaths);
DynamicChildren = new(_dynamicChildren);
}
/// <summary>
@@ -52,13 +55,13 @@ namespace Artemis.Core.Modules
/// Gets an read-only dictionary of all dynamic children
/// </summary>
[DataModelIgnore]
public ReadOnlyDictionary<string, DynamicChild> DynamicChildren => new(_dynamicChildren);
public ReadOnlyDictionary<string, DynamicChild> DynamicChildren { get; }
/// <summary>
/// Gets a read-only list of <see cref="DataModelPath" />s targeting this data model
/// </summary>
[DataModelIgnore]
public ReadOnlyCollection<DataModelPath> ActivePaths => _activePaths.AsReadOnly();
public ReadOnlyCollection<DataModelPath> ActivePaths { get; }
/// <summary>
/// Returns a read-only collection of all properties in this datamodel that are to be ignored
+8 -2
View File
@@ -114,6 +114,12 @@ namespace Artemis.Core.Modules
private readonly List<(DefaultCategoryName, string)> _defaultProfilePaths = new();
private readonly List<(DefaultCategoryName, string)> _pendingDefaultProfilePaths = new();
protected Module()
{
DefaultProfilePaths = new ReadOnlyCollection<(DefaultCategoryName, string)>(_defaultProfilePaths);
HiddenProperties = new(HiddenPropertiesList);
}
/// <summary>
/// Gets a list of all properties ignored at runtime using <c>IgnoreProperty(x => x.y)</c>
/// </summary>
@@ -122,7 +128,7 @@ namespace Artemis.Core.Modules
/// <summary>
/// Gets a read only collection of default profile paths
/// </summary>
public IReadOnlyCollection<(DefaultCategoryName, string)> DefaultProfilePaths => _defaultProfilePaths.AsReadOnly();
public IReadOnlyCollection<(DefaultCategoryName, string)> DefaultProfilePaths { get; }
/// <summary>
/// A list of activation requirements
@@ -176,7 +182,7 @@ namespace Artemis.Core.Modules
/// <summary>
/// Gets a list of all properties ignored at runtime using <c>IgnoreProperty(x => x.y)</c>
/// </summary>
public ReadOnlyCollection<PropertyInfo> HiddenProperties => HiddenPropertiesList.AsReadOnly();
public ReadOnlyCollection<PropertyInfo> HiddenProperties { get; }
internal DataModel? InternalDataModel { get; set; }