resharper-postfix
resharper-postfix copied to clipboard
ReSharper Postfix Templates plugin
For library code, ConfigureAwait(false) is used everywhere; would be nice to have a postfix template like `.await` but including that, too: MethodAsync().cawait -> await MethodAsync().ConfigureAwait(false) Thanks.
Сделайте, пожалуйста, .nameof(expr) postfix Пример: FieldName = IssueAndReturnAnalyticDto.Date.nameof превращалось в FieldName = nameof(IssueAndReturnAnalyticDto.Date)
It seems there is no nice usages of postfix templates over conditional access expressions (like "`expr?.postfix`"), so it's better to disable context creation from such expressions.
``` c# string.cast| ``` => ``` c# (string) | ```
``` c# switch (e) { SomeEnum.SomeCase.case } ``` => ``` c# switch (e) { case SomeEnum.SomeCase: } ```
``` c# WebException.catch ``` => ``` c# try { // $END$ } catch (WebException $name$) { } ```
When `.foreach` template is completed with `.` suffix, do not populate `foreach` statement iteration variable name hotspot, but produce it's usage inside `foreach` body and populate next code completion: ```...
``` c# int.seq GetItems() { // ... } ``` => ``` c# IEnumerable GetItems() { // ... } ```
``` c# CancellationToken.default // => default(CancellationToken); ```
Enable only on simple int expressions - for example, only allow reference access chains without invocations.