ReSharper 2016.1 Help

Predefined Live Templates for Global Usage

ReSharper | Templates Explorer | Live Templates | Global Usage

This topic lists all predefined live templates for Global Usage in ReSharper 2016.1.1. For more information about live templates, see Creating Source Code Using Live Templates

TemplateDetails
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. (context)

This could be useful:

  • In string literals that contain references to the current context, i.e. 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

Reference__Options__Templates__Live_Templates__Predefined__No_Language__ctx__before

Expansion options
Reference__Options__Templates__Live_Templates__Predefined__No_Language__ctx__expansion

nguid

Insert new GUID

Scope everywhere

Body

$GUID$

Parameters

  • GUID - Generates new Globally Unique Identifier (GUID) (guid)

Before expansion

Reference__Options__Templates__Live_Templates__Predefined__No_Language__nguid__before

After expansion
Reference__Options__Templates__Live_Templates__Predefined__No_Language__nguid__after

Last modified: 19 August 2016