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
@@ -17,13 +17,14 @@ namespace Artemis.Core.LayerBrushes
|
||||
protected LayerBrushProvider()
|
||||
{
|
||||
_layerBrushDescriptors = new List<LayerBrushDescriptor>();
|
||||
LayerBrushDescriptors = new(_layerBrushDescriptors);
|
||||
Disabled += OnDisabled;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A read-only collection of all layer brushes added with <see cref="RegisterLayerBrushDescriptor{T}" />
|
||||
/// </summary>
|
||||
public ReadOnlyCollection<LayerBrushDescriptor> LayerBrushDescriptors => _layerBrushDescriptors.AsReadOnly();
|
||||
public ReadOnlyCollection<LayerBrushDescriptor> LayerBrushDescriptors { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Registers a layer brush descriptor for a given layer brush, so that it appears in the UI.
|
||||
|
||||
Reference in new issue
Block a user