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

Allow caller to provide RazorLightEngine #240

Closed
wants to merge 2 commits into from

Conversation

VictorioBerra
Copy link

Today we provide a bunch of convenience methods to build out an engine, but we never allow the user to provide their own.

There are a lot of options being added to the RazorLightEngineBuilder and instead of trying to add an extension for every possible scenario, it will be helpful to allow the caller to provide their own.

@VictorioBerra
Copy link
Author

Pushed a quick fix to some tabs/spaces issues in FluentEmailRazorBuilderExtensions.cs, this file is a weird mix of tabs and spaces. let me know if I should just convert that whole file to spaces while I am in there.

@VictorioBerra
Copy link
Author

Hold off on accepting this for now. We need to support more than just CompileRenderStringAsync in the ITemplateRenderer. We should allow rendering from a RazorLight Embedded Resource, or a RazorLight file.

For example, FluentEmail's UsingTemplateFromEmbedded circumvents the Razor Engine for its own assembly-hunting process.

@VictorioBerra
Copy link
Author

This might not be needed since someone can call .UseTemplateEngine when composing the email.

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.

None yet

1 participant