Skip to content
This repository has been archived by the owner on Apr 16, 2023. It is now read-only.

C# 6 features/clean up #104

Merged
merged 2 commits into from Nov 24, 2015
Merged

C# 6 features/clean up #104

merged 2 commits into from Nov 24, 2015

Conversation

ArcticEcho
Copy link
Contributor

To summarise, I've:

  • Used certain features (namely, string interpolation and expression-bodied properties/methods) of C# 6.0 where I feel it brings an improvement (to readability).
  • Removed ChatbotAction's GetRegexMatchingPattern and GetRegexMatchingObject methods, as I feel they are redundant and can be optimised by using a single new property (RegexMatchingObject) which returns a compiled Regex object instead.
  • Removed unused using directives.
  • Reorganised all command/trigger classes' members in the following order (as there previously wasn't any order, that I'm aware of anyway): private fields, public properties (sub-ordered alphabetically) and then public methods.
  • Changed all command/trigger methods to properties (besides RunAction) and removed the prefix "Get" (I'm still not sure why we were using methods to return simple strings in the first place).

ArcticEcho added a commit that referenced this pull request Nov 24, 2015
@ArcticEcho ArcticEcho merged commit f312be9 into master Nov 24, 2015
@ArcticEcho ArcticEcho deleted the C#6 branch November 24, 2015 21:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

None yet

1 participant