Implemented C# 6.0 features, fixed most of resharper's code quality suggestions.

This commit is contained in:
Ben Wallis
2015-12-13 20:17:15 +00:00
parent 9a117d118f
commit 2dc56799fd
70 changed files with 409 additions and 1259 deletions

View File

@@ -2,7 +2,6 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows.Media;
using System.Xml.Serialization;
using Filtration.ObjectModel.Annotations;
using Filtration.ObjectModel.Enums;
@@ -66,10 +65,7 @@ namespace Filtration.ObjectModel.ThemeEditor
{
_color = value;
OnPropertyChanged();
if (_themeComponentUpdatedEventHandler != null)
{
_themeComponentUpdatedEventHandler.Invoke(this, EventArgs.Empty);
}
_themeComponentUpdatedEventHandler?.Invoke(this, EventArgs.Empty);
}
}
@@ -88,10 +84,7 @@ namespace Filtration.ObjectModel.ThemeEditor
public void TerminateComponent()
{
if (ThemeComponentDeleted != null)
{
ThemeComponentDeleted.Invoke(this, EventArgs.Empty);
}
ThemeComponentDeleted?.Invoke(this, EventArgs.Empty);
}
public event PropertyChangedEventHandler PropertyChanged;
@@ -100,7 +93,7 @@ namespace Filtration.ObjectModel.ThemeEditor
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
var handler = PropertyChanged;
if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
handler?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}