Recommended Extensions and Command Updates #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Renamed commands with a suffix of Command. Added another test command for xUnit tests. Renamed the previous MSTest-related test to MSTest in all of it's references. Created an Extensions Folder in the Standards.Logic project, added several new extensions.
Updated RefreshEFRepositoryCommand, where new config was added that gives the developer an option to create the CRUD operations. By Default, this is set to true, so it will always generate full CRUD operations on the initial repo contracts. When set to false, it will not.
ANGULAR SUPPORT
Added a new local model and service builder. These will generate a local typescript model from a csharp model, implementing a default constructor with default values. (this is currently being used, but several changes were made in this last revision - not fully tested, proceed with caution.
Additional Typescript converters were created. Still in an early stage.
TESTING
Support for MSTest, Bunit, xUnit, and nUnit have been implemented. More love has been provided for generation of xUnit Tests. Still in testing, proceed with caution.
EXTENSIONS
Several new extensions were added, existing extensions were renamed and added to the new Extensions folder.
Calling this one out specifically: I added several String extension methods that do various different things. You can now TrimStart, TrimEnd, TrimStartEnd, Pluralize, Prettify (breaks up a propercased string into string with spaces), and provided conversion from proper casing to kebab-case and snake_case.
TrimStartEndLines()
I did not implement this everywhere, but in the current state of code generation, you get source files with extra blank lines at the beginning and end. When you generate POCO models, there are a lot of extra blank lines within the class body, before and after each property. In another version of this code, every time I see .ReturnSource() I append .ReturnSource().TrimStartEndLines(). You can see this in the RefreshEFRepositoryCommand and in the RepositoryBuilder. The long-term solution here should be that the SDK automatically trims extra lines when the source formatter is returning the source.
ENUMS
I wrote additional extension methods to differentiate a VsDocument (so any file) with IsMarkupCode. This will let you know if the file you are dealing with is a view/presentation layer (html, cshtml, razor, xaml, etc). There are other VSDocument extensions that tell you what UI Frameworks are being used, based on project references, and what file types you're dealing with.
So in the inverse, enums were created to let you dictate/manage your list of UI Frameworks
I added several enums