Core - Added XML comments to all remaining public members/methods

Core - Refactored a lot of code for nullable reference types
This commit is contained in:
Robert committed 2020-11-16 20:16:06 +01:00
1 parent 61fc96742d
commit a3cd32f6c4
107 files changed
+1150 -649

No files matched your search

@@ -9,8 +9,8 @@ namespace Artemis.Core.LayerBrushes
public abstract class BaseLayerBrush : CorePropertyChanged, IDisposable
{
private LayerBrushType _brushType;
private ILayerBrushConfigurationDialog _configurationDialog;
private LayerBrushDescriptor _descriptor;
private ILayerBrushConfigurationDialog? _configurationDialog;
private LayerBrushDescriptor? _descriptor;
private Layer _layer;
private bool _supportsTransformation = true;
@@ -26,7 +26,7 @@ namespace Artemis.Core.LayerBrushes
/// <summary>
/// Gets the descriptor of this brush
/// </summary>
public LayerBrushDescriptor Descriptor
public LayerBrushDescriptor? Descriptor
{
get => _descriptor;
internal set => SetAndNotify(ref _descriptor, value);
@@ -35,7 +35,7 @@ namespace Artemis.Core.LayerBrushes
/// <summary>
/// Gets or sets a configuration dialog complementing the regular properties
/// </summary>
public ILayerBrushConfigurationDialog ConfigurationDialog
public ILayerBrushConfigurationDialog? ConfigurationDialog
{
get => _configurationDialog;
protected set => SetAndNotify(ref _configurationDialog, value);
@@ -53,12 +53,12 @@ namespace Artemis.Core.LayerBrushes
/// <summary>
/// Gets the ID of the <see cref="LayerBrushProvider" /> that provided this effect
/// </summary>
public string ProviderId => Descriptor?.Provider?.Id;
public string? ProviderId => Descriptor?.Provider.Id;
/// <summary>
/// Gets a reference to the layer property group without knowing it's type
/// </summary>
public virtual LayerPropertyGroup BaseProperties => null;
public virtual LayerPropertyGroup? BaseProperties => null;
/// <summary>
/// Gets or sets whether the brush supports transformations
@@ -70,7 +70,7 @@ namespace Artemis.Core.LayerBrushes
protected set
{
if (value && BrushType == LayerBrushType.RgbNet)
throw new ArtemisPluginFeatureException(Descriptor.Provider, "An RGB.NET brush cannot support transformation");
throw new ArtemisPluginFeatureException(Descriptor?.Provider!, "An RGB.NET brush cannot support transformation");
_supportsTransformation = value;
}
}
@@ -105,7 +105,7 @@ namespace Artemis.Core.LayerBrushes
public void Dispose()
{
DisableLayerBrush();
BaseProperties.Dispose();
BaseProperties?.Dispose();
Dispose(true);
GC.SuppressFinalize(this);
@@ -46,7 +46,7 @@ namespace Artemis.Core.LayerBrushes
/// <summary>
/// Determines whether the provided <paramref name="reference" /> references to a brush provided by this descriptor
/// </summary>
public bool MatchesLayerBrushReference(LayerBrushReference reference)
public bool MatchesLayerBrushReference(LayerBrushReference? reference)
{
if (reference == null)
return false;