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:
Quentin Bray authored and GitHub committed 2026-06-22 19:52:06 +02:00
1 parent b9b0f7c8df
commit 6ffa63b923
236 files changed
+14194 -7278

No files matched your search

+10 -11
View File
@@ -23,8 +23,7 @@ namespace VocaluxeLib.Profile
{
public class CAvatar
{
public int ID;
private readonly string _FileName = "";
public int Id;
private CTextureRef _Texture;
private const int _MaxNameLen = 12;
@@ -32,28 +31,25 @@ namespace VocaluxeLib.Profile
{
get { return _Texture; }
}
public string FileName
{
get { return _FileName; }
}
public string FileName { get; } = "";
public static CAvatar GetAvatar(string fileName)
{
CTextureRef texture = CBase.Drawing.AddTexture(fileName);
var texture = CBase.Drawing.AddTexture(fileName);
return texture == null ? null : new CAvatar(texture, fileName);
}
private CAvatar(CTextureRef texture, string fileName, int id = -1)
{
_Texture = texture;
_FileName = fileName;
ID = id;
FileName = fileName;
Id = id;
}
public bool Reload()
{
Unload();
_Texture = CBase.Drawing.AddTexture(_FileName);
_Texture = CBase.Drawing.AddTexture(FileName);
return _Texture != null;
}
@@ -65,10 +61,13 @@ namespace VocaluxeLib.Profile
public string GetDisplayName()
{
string name = Path.GetFileNameWithoutExtension(_FileName);
var name = Path.GetFileNameWithoutExtension(FileName);
Debug.Assert(name != null);
if (name.Length > _MaxNameLen)
{
name = name.Substring(0, _MaxNameLen);
}
return name;
}
}