1
DotNet / SFML.NET 2.4 Update
« on: October 03, 2016, 10:58:56 pm »
Branch: https://github.com/dabbertorres/SFML.NET/tree/2.4
I made a few architecture/style changes that I wanted to make sure were discussed and accepted/not-accepted before submitting a PR.
The major things:
Comments, questions, concerns?
I made a few architecture/style changes that I wanted to make sure were discussed and accepted/not-accepted before submitting a PR.
The major things:
- When updating and debugging to make sure all is well, I realized that only the release CSFML dlls were being used, making debugging a little more annoying. I fixed this by adding a (internal) CSFML class to each module (ie: SFML.Graphics.CSFML, etc) that contains an internal const string with the name of the CSFML dll to be used. It's value is determined by an #if !DEBUG switch. This allows the CSFML debug dlls to be loaded in debug mode, and vice versa in release mode.
- I moved the Context class to the Window module, to match up with SFML and CSFML (it was in Graphics). Side-Effects: had to be made public, which I felt was okay, due to Context being publically available in both SFML and CSFML. More uniform APIs, essentially.
- Null-Conditional operator usage. This feature is tied to the C# 6.0 compiler, not to a .NET version. So it works when compiling SFML.NET for .NET 3.5 (with VS 2015, at least). I wasn't sure if the targeted support version was for Visual Studio (C# compiler) or .NET, hence my question on this.
- Style-wise, SFML.NET used two different namespace styles:
namespace SFML
{
namespace Graphics
{
....
vs{
namespace Graphics
{
....
namespace SFML.Graphics
{
....
{
....
- I normalized it all to the second, as I find it to be a nice feature (I'd like C++17 to get it).
Comments, questions, concerns?