-
Notifications
You must be signed in to change notification settings - Fork 7
Continue work from #7: Split responsibilities and prepare for merge #8
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Separated the concepts and responsibilities of the Code Generators to avoid the confusion caused by partial classes. I applied RawString to format the unit manager code. This makes the code more readable and eliminates the use of AppendLineLF. I reorganized the namespaces to focus efforts on the code generators and avoid the distractions of utility classes. All the business logic is now under Generators. Utilities and satellite classes are under Tools. Extension methods under Extensions. Diagnostics have been grouped under the Rules class. I added a new one to track fatal errors and list it in the output. I also added various extensions to streamline the code. Reworking the code, I noticed that by not using the CodeGeneration option. The different classes don't go through the CurrentUICulture (which is problematic if you're using the tool in a Roslyn project). Now that the class responsibilities are clearly defined, I could add a new Generator to the IStringLocalization model. This interface is used in WinUI and Blazor projects, among others.
Using heritage pattern over the generators to clarify witch every class do. To clarify and simplify concept, separation of concepts. Unification of all Diagnostics in a class Analyzer to respect the Analyzer contract from MS RoslynAnalyser. Rebrand the SourceGenerator class to switch over a new option GenerationType : - ResourceManager (Default) - CodeGeneration (In addidition to GenerateCode, to maintenability of existing code) - StringLocaliser (new generator includes registration classes to simplifing adding resources to the CollectionService) I added a demo project to demonstrate the new feature. I optimized the uses of IncrementalProviders to avoid to apply the same filter over and over. Now we have thee bloc of generation - ResourcesManager - CodeGeneration - ComboGeneration - StringLocaliser - NamespaceRegistrator - GlobalRegistrator
Replace the Tab in .editorconfig readjust files to <tab> instead of spaces readjust unit tests
Add comment to enum GenerationType
Correction of typo in documentation
Report the README to XML comment on code to Intellisense purpose
In C#, the * and ^ operators have the same precedence, and evaluation is performed from left to right. So it's not strictly necessary, but I'll add it for clarity.In C#, the * and ^ operators have the same precedence, and evaluation is performed from left to right. So it's not strictly necessary, but I'll add it for clarity.
Also reverted the original comportment on Test2.resx
The global registration class generated even if no StringLocalizer was present Pass the message of exception instead of exception in case of fatal error Environement.NewLine not recommended for Analyser and Generator. I changed for a constant Adjust the Unshipped.md Add a QUICKSTART.md to have a global view of possibilities the option and simplify configuration for new and current users.
Splitting concepts responsibility
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Continued from #7.