Current version: 0.2.3
For all files - Class, Enum, Interface and Test class a new namespace has been added, as in C# 10.
For example template for a class:
namespace MyNamespace;
public class MyClass
{
}
Functions are intended to be called using keyboard shortcuts (or command search dropdown), hence no mouse menus.
There are no default keyboard shortcuts, you can set them yourself searching for csharp-helper-plus
in keyboard shortcuts menu.
csharp-helper-plus.inject-dependency
Provides search input for finding *.cs files, adds selected file name to constructor, creates private readonly field, formats constructor on separate lines if it has more than one parameter.
Constructor will be created if it doesn't exist.
Provides prompt to select path, creates files from template. Files are created with correct namespace.
- Create New Class (C#)
csharp-helper-plus.create-class
- Create New Interface (C#)
csharp-helper-plus.create-interface
- Create New Enum (C#)
csharp-helper-plus.create-enum
- Create New Test Class (C#)
csharp-helper-plus.create-test
csharp-helper-plus.embed-code
Provides prompt to select template, surrounds selected text with template.
Available templates:
try { ... } catch(Exception ex) { ... }
if (...) { ... }
csharp-helper-plus.fix-namespace
Corrects namespace in current file based on path to project.
csharp-helper-plus.fix-filename
Renames file to match class name.
csharp-helper-plus.toggle-method-sync
Changes method signature to async and vice versa