mirror of
https://github.com/ckaczor/FeedCenter.git
synced 2026-06-15 08:35:11 -04:00
Bunch of ReSharper suggestions
This commit is contained in:
@@ -9,14 +9,9 @@ namespace FeedCenter
|
||||
return new Category { ID = Guid.NewGuid() };
|
||||
}
|
||||
|
||||
public bool IsDefault
|
||||
{
|
||||
get { return Name == "< default >"; }
|
||||
}
|
||||
public bool IsDefault => Name == "< default >";
|
||||
|
||||
public int SortKey
|
||||
{
|
||||
get { return IsDefault ? 0 : 1; }
|
||||
}
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public int SortKey => IsDefault ? 0 : 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -58,12 +58,6 @@ namespace FeedCenter
|
||||
return new Feed { ID = Guid.NewGuid(), CategoryID = database.DefaultCategory.ID };
|
||||
}
|
||||
|
||||
#region Event delegates
|
||||
|
||||
public delegate void ErrorEventHandler(WebException webException);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Reading
|
||||
|
||||
public FeedReadResult Read(FeedCenterEntities database, bool forceRead = false)
|
||||
@@ -317,6 +311,7 @@ namespace FeedCenter
|
||||
|
||||
#endregion
|
||||
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public string LastReadResultDescription
|
||||
{
|
||||
get
|
||||
@@ -325,7 +320,7 @@ namespace FeedCenter
|
||||
var lastReadResult = LastReadResult;
|
||||
|
||||
// Build the name of the resource using the enum name and the value
|
||||
var resourceName = string.Format("{0}_{1}", typeof(FeedReadResult).Name, lastReadResult);
|
||||
var resourceName = $"{typeof (FeedReadResult).Name}_{lastReadResult}";
|
||||
|
||||
// Try to get the value from the resources
|
||||
var resourceValue = Properties.Resources.ResourceManager.GetString(resourceName);
|
||||
|
||||
Reference in New Issue
Block a user