Reporter | Daniel Degtyarev (daniel.degtyarev) |
---|---|
Created | Apr 20, 2018 12:42:09 PM |
Updated | Apr 20, 2018 12:42:09 PM |
Subsystem | Context Actions |
Assignee | Andrey Dyatlov (Andrey.Dyatlov) |
Priority | Show-stopper |
State | Submitted |
Type | Feature |
Fix version | 2018.2 |
Affected versions | No Affected versions |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
R# at least should:
- Preserve existing
using static
directive, very important and really annoying. Any cleanup, refactoring and so on, just remove them all - Has context actions to invoke with
using static
directive and do not invoke withusing static
Context action propose
Lets take a sample code:
using System;
class Program
{
public static void Main()
{
Console.WriteLine("Foo1");
Console.WriteLine("Foo2");
Console.ReadKey();
}
}
Appying the action should produce:
using static System.Console;
class Program
{
public static void Main()
{
WriteLine("Foo1");
WriteLine("Foo2");
ReadKey();
}
}
Plus, the opposed action, Do not invoke as 'using static'
.