Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Mar 18, 2025. It is now read-only.
/VeilPublic archive

A template renderer / view engine for .NET

License

NotificationsYou must be signed in to change notification settings

csainty/Veil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Veil is a .NET template renderer / view engine. It is designed to support many syntax parsers which sit on top of a single optimized compiler.SeeVeil.SuperSimple andVeil.Handlebars for examples of supported syntax.

Design Goals

  • Easy to install, configure and use in any project
  • Fastest view engine available
  • Support for explicit flush to aid in browser performance
  • Cross-platform support

Not supported

Unlike Razor, Veil templates are not compiled with the full .NET compilers. This is part of what makes Veil so much easier to integrate and work with. The cost of this approach is that arbitrary code blocks are not supported.A purist may argue this is actually a good thing :)

Getting Started

You have a few options for using Veil :-

  1. If you are usingNancy then install theNancy.ViewEngines.Veil package and your preferred syntax parsers e.g.Veil.Handlebars orVeil.SuperSimple
  2. Alternatively you can install and use any Veil syntax parser directly in any application. E.g.
Install-Package Veil.Handlebars// Compile your template once with the chosen parservar template = "Hello {{ Name }}";var compiledTemplate = new VeilEngine().Compile<ViewModel>("handlebars", new StringReader(template));--// Execute your template as neededusing (var writer = new StringWriter()) {    compiledTemplate(writer, new ViewModel { Name = "Bob" });}

Further Information

Builds

Build status

Pre-built binaries of the latest commit are always available athttps://ci.appveyor.com/project/csainty/veil/build/artifacts

Alternatively you can grab them from the AppVeyor nuget feed -

<packageSources>    <add key="veil.appveyor" value="https://ci.appveyor.com/nuget/veil" protocolVersion="2" /></packageSources>

[8]ページ先頭

©2009-2025 Movatter.jp