Apply R# clean-up for reliability (#877)
* Apply R# clean-up for reliability - Migrate to NUnit4 Assert.That - Update dependencise versions - Fix LangVersion to 9.0 (until net core migration) - Reformat code - Apply 'var' style (easier for refactoring) - Remove redundant parentheses - Add braces on every condition blocks (1 line) - Uses new null checking patterns - Uses AutoProperties when possible - Uses string scalar type instead of class - Clean usings - Add .orig files in git ignore - Rename some properties to respect defined conventions and US format definition - ID -> Id - BPM -> Bpm - Finish -> End * Update R# settings according to the clean-up made
This commit is contained in:
1 parent
b9b0f7c8df
commit
6ffa63b923
236 files changed
+14194
-7278
No files matched your search
@@ -16,15 +16,14 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using VocaluxeLib.Draw;
|
||||
using System.Linq;
|
||||
using VocaluxeLib.Draw;
|
||||
|
||||
namespace VocaluxeLib.Songs
|
||||
{
|
||||
public class CCategory
|
||||
{
|
||||
public readonly string Name;
|
||||
private CTextureRef _CoverTextureSmall;
|
||||
private CTextureRef _CoverTextureBig;
|
||||
public readonly List<CSongPointer> Songs = new List<CSongPointer>();
|
||||
|
||||
@@ -33,20 +32,18 @@ namespace VocaluxeLib.Songs
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public CTextureRef CoverTextureSmall
|
||||
{
|
||||
get { return _CoverTextureSmall; }
|
||||
|
||||
set { _CoverTextureSmall = value; }
|
||||
}
|
||||
public CTextureRef CoverTextureSmall { get; set; }
|
||||
|
||||
public CTextureRef CoverTextureBig
|
||||
{
|
||||
get { return _CoverTextureBig ?? _CoverTextureSmall; }
|
||||
get { return _CoverTextureBig ?? CoverTextureSmall; }
|
||||
set
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
_CoverTextureBig = value;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +56,10 @@ namespace VocaluxeLib.Songs
|
||||
public CSong GetSong(int numInCategory)
|
||||
{
|
||||
if (numInCategory >= 0 && numInCategory < Songs.Count)
|
||||
return CBase.Songs.GetSongByID(Songs[numInCategory].SongID);
|
||||
{
|
||||
return CBase.Songs.GetSongById(Songs[numInCategory].SongId);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user