mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Replaced AsReadOnly property getters with regular properties
Should reduce allocations
This commit is contained in:
1 parent
7ad7eaad89
commit
0b370f261c
21 files changed
+84
-42
No files matched your search
@@ -37,6 +37,9 @@ namespace Artemis.Core
|
||||
|
||||
_layerProperties = new List<ILayerProperty>();
|
||||
_layerPropertyGroups = new List<LayerPropertyGroup>();
|
||||
|
||||
LayerProperties = new(_layerProperties);
|
||||
LayerPropertyGroups = new(_layerPropertyGroups);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -96,12 +99,12 @@ namespace Artemis.Core
|
||||
/// <summary>
|
||||
/// A list of all layer properties in this group
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<ILayerProperty> LayerProperties => _layerProperties.AsReadOnly();
|
||||
public ReadOnlyCollection<ILayerProperty> LayerProperties { get; }
|
||||
|
||||
/// <summary>
|
||||
/// A list of al child groups in this group
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<LayerPropertyGroup> LayerPropertyGroups => _layerPropertyGroups.AsReadOnly();
|
||||
public ReadOnlyCollection<LayerPropertyGroup> LayerPropertyGroups { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Recursively gets all layer properties on this group and any subgroups
|
||||
|
||||
Reference in new issue
Block a user