Code cleanup

This commit is contained in:
Robert committed 2020-01-14 19:18:24 +01:00
1 parent 0c245ba83d
commit ae330c3769
73 files changed
+372 -364

No files matched your search

@@ -1,21 +1,18 @@
using System;
using System.Xml.Serialization;
using Newtonsoft.Json;
using Stylet;
namespace Artemis.Core.Plugins.LayerBrush
{
public abstract class LayerBrushSettings : PropertyChangedBase
{
private Action<Action> _propertyChangedDispatcher = Execute.DefaultPropertyChangedDispatcher;
/// <summary>
/// Gets or sets the dispatcher to use to dispatch PropertyChanged events. Defaults to Execute.DefaultPropertyChangedDispatcher
/// Gets or sets the dispatcher to use to dispatch PropertyChanged events. Defaults to
/// Execute.DefaultPropertyChangedDispatcher
/// </summary>
[System.Xml.Serialization.XmlIgnore]
[Newtonsoft.Json.JsonIgnore]
public override Action<Action> PropertyChangedDispatcher
{
get { return this._propertyChangedDispatcher; }
set { this._propertyChangedDispatcher = value; }
}
[XmlIgnore]
[JsonIgnore]
public override Action<Action> PropertyChangedDispatcher { get; set; } = Execute.DefaultPropertyChangedDispatcher;
}
}
@@ -26,7 +26,7 @@ namespace Artemis.Core.Plugins.Models
}
catch (JsonReaderException)
{
Value = default(T);
Value = default;
}
}
@@ -29,7 +29,7 @@ namespace Artemis.Core.Plugins.Models
/// <param name="name">The name of the setting</param>
/// <param name="defaultValue">The default value to use if the setting does not exist yet</param>
/// <returns></returns>
public PluginSetting<T> GetSetting<T>(string name, T defaultValue = default(T))
public PluginSetting<T> GetSetting<T>(string name, T defaultValue = default)
{
lock (_settingEntities)
{