Skip to content

Releases: RickStrahl/Westwind.RazorHosting

3.3

08 Jun 07:32
Compare
Choose a tag to compare
  • Support for latest CSharp Features
    You can now provide the CSharpCodeProvider that is used to compile Razor templates. This requires adding the Microsoft.CodeDom.Providers.DotNetCompilerPlatform and adding a <codeDom> section to the host project. We don't provide this in-box due to the large size of the compiler, so you get the lightweight CSharp 5.0 implementation out of box, and you can add Roslyn based compilation (~17meg package!) explicitly to your own application.

  • Host Container ThrowExceptions Option
    You can now have the Razor Host Containers throw exceptions when an error occurs rather than returning error information on the error message property. A custom exception is thrown that provides more information about the current request and engine.

  • StringHostContainer to match constructor format
    Add overload to generic type overload of the StringHostContainer in the same way you can overload FolderHostContainer. Makes it easier to create application level hosts derived from a specific template.

  • RawString Default and Empty Property
    Added RawString.Empty property which returns a new empty RawString instance. Default instance now also returns string.Empty (rather than null before).

Version 3.1

06 Sep 05:16
Compare
Choose a tag to compare
  • Support for Layout Pages with RazorFolderHostContainer
    You can now use the Layout property in your templates when using the RazorFolderHostContainer class to render Razor Views using @{ Layout = " ~\_Layout.cshtml" } relative to the folder root.

  • Add inferModelType option for string RenderTemplate() methods
    Added option to allow inferring the model type if no @model or @inherits
    tags are provided in the template. If set this flag adds the model type
    to the template to force a strongly typed model. Note that this feature
    only works for string template rendering in RazorEngine.RenderTemplate()
    and StringHostContainer.RenderTemplate(). Stream and file based renderers
    do not have this feature and must explicitly specify the model type.

  • Updated Documentation Site
    Updated the documentation site to use the latest Help Builder templates from old very outdated old MSDN style templates. Yikes! 😄 Updated content for version 3.0 improvements and added latest generated class documentation.

Version 3.0

08 Jul 23:28
Compare
Choose a tag to compare
  • Update to Razor Version 3
    Updated to the latest version of the Razor Engine distributed
    with MVC 5. Fix various issues that are a result of the
    new rendering engine.

  • Require .NET 4.5 to run
    The Razor Libraries version 3 requires .NET 4.5 so this library
    is updating to the same .NET version.

  • Support for @Helper
    You can now use Razor Helpers using the @Helper syntax supported
    in core Razor. Helpers allow you to create small function like
    Razor snippets that can either act as functions or execute razor
    templates to provide reusability.

  • Version numbers in Sync with Razor Version
    Decided to keep the library version in sync with Razor version.

  • RazorHostContainerBase now implements IDisposable
    Container hosts are now IDisposable which makes it easier to stop them when
    they are released. Default Dispose() behavior stops the engine and releases
    all cached assemblies