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
in keyboard shortcuts menu.
csharp-helper.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.create-class
- Create New Interface (C#)
csharp-helper.create-interface
- Create New Enum (C#)
csharp-helper.create-enum
- Create New Test Class (C#)
csharp-helper.create-test
csharp-helper.embed-code
Provides prompt to select template, surrounds selected text with template.
Available templates:
try { ... } catch(Exception ex) { ... }
if (...) { ... }
csharp-helper.fix-namespace
Corrects namespace in current file based on path to project.
csharp-helper.fix-filename
Renames file to match class name.
csharp-helper.toggle-method-sync
Changes method signature to async and vice versa