Skip to content

Commit

Permalink
Don't use AppDomain codepath for CurrentDomain
Browse files Browse the repository at this point in the history
Template hosts should return null from ProvideTemplatingAppDomain if they
don't want to use an AppDomain, but check for AppDomain.CurrentDomain
and shortcircuit that as well.

Improves usability issue discovered in #170
  • Loading branch information
mhutch committed Dec 6, 2023
1 parent d5fb8e6 commit 9fb6cc2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ internal void SetTemplateContentForAppDomain (string content)
TemplateProcessor CreateTemplateProcessor ()
{
var domain = host.ProvideTemplatingAppDomain (templateContentForAppDomain);
if (domain == null) {
if (domain == null || domain == AppDomain.CurrentDomain) {
return new TemplateProcessor ();
}

Expand Down

0 comments on commit 9fb6cc2

Please sign in to comment.