Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced code by means of C# 6 #44

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Enhanced code by means of C# 6 #44

wants to merge 6 commits into from

Conversation

AlexArchive
Copy link
Contributor

I manually went through each class in the main project and judiciously applied the following features of C# 6:

  • Expression-bodied members
  • Readonly auto-properties
  • String interpolation

We can apply the other new features of C# 6 opportunistically.


In order to build the solution you will need to use Visual Studio 2015.

In order to run the tests, you may need to install the NUnit Test Adapter and run the tests using the Visual Studio test runner - they all pass 😄


I tried to be judicious but I suspect that I might have impaired readability in some cases due to my keenness to apply the new features. A fresh pair of eyes would be greatly appreciated - I am totally open to constructive criticism.

If you want to hold off from merging this into the main branch for a while, I do not mind one bit. I appreciate that this is a little bit premature. I am just happy to have had the opportunity to apply some of the new features.

I am so thankful for regression tests right about now 🍺

Resharper does not work with Visual Studio 2015 Preview on Windows 10 at
the moment. This is the best I can do on my machine. You should still be
able to use other test runners.

We can delete this commit later on.
@AlexArchive
Copy link
Contributor Author

Hold the phone.

The string interpolation syntax is reportedly going to change soon. Expression-bodied members
and readonly auto-properties seem stable though.

@AlexArchive
Copy link
Contributor Author

Preliminary implementation of #43

(Linking issues and pull request.)

@robdmoore
Copy link
Member

Sorry for late reply.

It's cool to see this. Definitely think it's too early to merge I'm afraid - it would stop most people from contributing since most people don't have VS 2015 installed. We need to install the right compiler on the CI server too (although that's easy enough).

@AlexArchive
Copy link
Contributor Author

No worries man - I totally agree!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants