ReSharper 2016.1 Help

Predefined File Templates for Razor (C#)

ReSharper | Templates Explorer | File Templates | Razor (C#)

This topic lists all predefined file templates for Razor (C#) in ReSharper 2016.1.1. For more information about file templates, see Creating Files from Templates

TemplateDetails
Razor MVC Partial View

Razor MVC Partial View

Scope Razor (C#) projects

Body

@model $model$ $END$

Parameters

  • model - Guess type expected at this point (guessExpectedType)
  • END - The caret position after the template is applied.
Razor MVC View

Razor MVC View

Scope Razor (C#) projects

Body

@model $model$ @{ Layout = null; } <!DOCTYPE html> <html> <head> <title>$title$</title> </head> <body> <div> $END$ </div> </body> </html>

Parameters

  • model - Guess type expected at this point (guessExpectedType)
  • title - no macro
  • END - The caret position after the template is applied.
Razor MVC View with Layout

Razor MVC View with Layout

Scope Razor (C#) projects

Body

@model $model$ @{ ViewBag.Title = "$title$"; Layout = "$_Layout$"; } <h2>$title$</h2> $END$

Parameters

  • model - Guess type expected at this point (guessExpectedType)
  • title - no macro
  • _Layout - Show smart code completion list at the point where the variable is evaluated (completeSmart)
  • END - The caret position after the template is applied.
Last modified: 19 August 2016