-
Notifications
You must be signed in to change notification settings - Fork 86
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
Asp net core support #79
Merged
Merged
Conversation
This file contains 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
Collaborator
bounav
commented
Apr 19, 2024
- New csproj that targets .net 8.0
- Moved precompilation bits from the SparkViewFactory class to its own class
- H() method replaced with OutputValue(object value, bool automaticEncoding) in the base classes all generated views inherit from, this simplified the HTML encoding of values.
…ependencies - Now using constructor injection instead of auto-initializing properties - Removed ISparkServiceInitialize and ISparkServiceContainer (and it's implementation) - New IBatchCompiler interface so that we can use different compilers - ~2x performance improvement when compiling views with Roslyn - CodeDom compilation can still be used at the moment (class marked as obsolete) - CastleMonoRail still using codedom (rosylin doesn't like the assembly name when compiling in that project)
…ewEngine/spark into microsoft-di-and-roslyn-compiler
- CodeDom complilation cannot target .net core - BatchCompiler.cs contains the code to complile with codedom and/or roslyn
- Improved readability of RemoveSuffix method
- Renamed ISparkSettings.PageBaseType to BaseClassTypeName - An instance of ISparkSettings is used instead of duplicated properties on the ViewCompiler base class - New ISparkSettings.ExcludeAssemblies property that can be used to the prevent the view compiler from loading .DLLs that would containt precompile views (and would might already be loaded)
- Replaced by a callback in the IoC configuration - See ServiceCollectionExtensions.cs
- InMemoryCacheService cache can be used in any .net standard project - CacheExpires class not longer has depenency on System.Web.Caching.Cache - Renamed DefaultCacheService to WebCacheService - Moved NullCacheService to Castle.MonoRail.Views project (it's the only place using it) - Moved some classes back to Spark project when possible - Moved markdown dependency back to spark
- Use of a new SparkRouteData class - Avoids having a dependency on Microsoft.AspNet.Mvc
- New OutputValue(value, automaticEncoding) on SparkViewBase - Removed H() method (replaced by OutputValue - GeneratedCodeVisitor calls new OutputValue() method instead of Output.Write() - This method gives simplifies the HTML encoding logic - This method handles MvcHtmlString for MVC 5 - This method handles IHtmlContent for aspnetcore - HtmlHelperResultFilter to help get funnel the IHtmlHelper from the controllers to the view - Can now set base class for views with new SparkSettings<TBaseClass>() shortcut
RobertTheGrey
requested changes
Apr 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, but there seems to be a merge conflict?
# Conflicts: # src/Spark.Web.Mvc/SparkViewFactory.cs
My bad. I fixed the conflict. |
…re compilation - Can now use name, full name or absolute path to an assembly
RobertTheGrey
approved these changes
Apr 24, 2024
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.