Documenting the (object) cast to avoid dynamic invocation.

--HG--
branch : dev
This commit is contained in:
Andre Rodrigues
2010-11-19 17:42:30 -08:00
parent 1838c131c3
commit a987f02af6
12 changed files with 35 additions and 5 deletions

View File

@@ -35,7 +35,7 @@ namespace Orchard.Core.Settings.Controllers {
return new HttpUnauthorizedResult();
dynamic model = Services.ContentManager.BuildEditor(_siteService.GetSiteSettings());
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
return View((object)model);
}
@@ -49,6 +49,7 @@ namespace Orchard.Core.Settings.Controllers {
if (!ModelState.IsValid) {
Services.TransactionManager.Cancel();
// Casting to avoid invalid (under medium trust) reflection over the protected View method and force a static invocation.
return View((object)model);
}