JetBrains Rider 2019.2 Help

Predefined Live Templates for Global Usage

This topic lists all predefined live templates for Global in JetBrains Rider 2019.2. For more information about live templates, see Creating Source Code Using Live Templates

Template

Details

ctx

Current file context

Scope everywhere

Body

$CTX$

Parameters

  • CTX - Provides list of items describing current context. This includes file name, containing type name, namespace name, etc.

This could be useful:

  • In string literals that contain references to the current context, that is Logger.LogError("Cannot find action ActionNameDerivedFromContext");

  • As an alternative to code completion where IntelliSense doesn't work properly - for example, in comments when documenting a member with a long name (see example below).

Before expansion

JetBrains Rider: Live templates
Expansion options
JetBrains Rider: Live templates

nguid

Insert new GUID

Scope everywhere

Body

$GUID$

Parameters

  • GUID - Generates new Globally Unique Identifier (GUID)

Before expansion

JetBrains Rider: Live templates
After expansion
JetBrains Rider: Live templates

Last modified: 18 October 2019