Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Release 3.0 pull request #36

Merged
merged 3 commits into from
+2,602 −3,640

4 participants

Scott Nickel Alexey Barbashin Jeff Lewis Matthew Abbott
Scott Nickel

Hi Matt.

Please pull the changes for issue #26 and issue #27.

They are tagged under 20120313_Issue26_Issue27 or you can just get current from my fork.

I will not push anything further until I hear from you.

Let me know.

Thanks,

Scott

Matthew Abbott
Owner

Looking good, can you create a Pull request, and I can see about merging that into the core release-3.0 branch :-)

Owner

Think we'll leave it as is for now. The majority of users don't actually use a TemplateService directly, rather they use the static Razor type instead. Rather try and minimise impact. After I've merged the pull request, I'll push it out as v3.0.9beta and see what happens basically!

It appears 2 Unit Tests are failing from this commit.

Issue21_SubclassModelShouldBeSupportedInLayout : Failed
System.NullReferenceException : Object reference not set to an instance of an object.
at CompiledRazorTemplates.Dynamic.dbdfedadfffee.Execute()
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in TemplateBase.cs: line 120
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in TemplateBase.cs: line 133
at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in TemplateService.cs: line 559
at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in TemplateService.cs: line 424
at RazorEngine.Tests.TestTypes.Issues.Release_3_0_TestFixture.Issue21_SubclassModelShouldBeSupportedInLayout() in Release_3_0_TestFixture.cs: line 232

Issue6_ModelShouldBePassedToLayout : Failed
System.NullReferenceException : Object reference not set to an instance of an object.
at System.Object.GetType()
at RazorEngine.Compilation.RazorDynamicObject.TryGetMember(GetMemberBinder binder, ref Object result) in RazorDynamicObject.cs: line 36
at CallSite.Target(Closure, CallSite, Object)
at System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0)
at CompiledRazorTemplates.Dynamic.eebeaaacbc.Execute()
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in TemplateBase.cs: line 120
at RazorEngine.Templating.TemplateBase.RazorEngine.Templating.ITemplate.Run(ExecuteContext context) in TemplateBase.cs: line 133
at RazorEngine.Templating.TemplateService.Run(ITemplate template, DynamicViewBag viewBag) in TemplateService.cs: line 559
at RazorEngine.Templating.TemplateService.Parse(String razorTemplate, Object model, DynamicViewBag viewBag, String cacheName) in TemplateService.cs: line 424
at RazorEngine.Tests.TestTypes.Issues.Release_3_0_TestFixture.Issue6_ModelShouldBePassedToLayout() in Release_3_0_TestFixture.cs: line 42

Matt,

I was not involved in this change...but I can look into it.

Let me know if someone else is already looking at it.

Thanks,

Scott

I've fixed that issue: #74

Matthew Abbott Antaris merged commit 1a3f70f into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 13, 2012
  1. Scott Nickel

    Issue 26 - ViewBag

    scottnickel authored
    Issue 27 - Streamlining the ITemplateService API
  2. Scott Nickel
  3. Scott Nickel

    Added overloads for Razor.Parse(), Razor.ParseMany() and Razor.Run() …

    scottnickel authored
    …to pass in DynamicViewBag contents.
Something went wrong with that request. Please try again.