Skip to content

VSCode helper functions to speed up C# development.

License

Notifications You must be signed in to change notification settings

Evgeniy-Polyak/CSharp.HelperPlus

 
 

Repository files navigation

C# Helper Plus

Current version: 0.2.3

What changed

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.

Inject Dependency (C#)

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.

alt text

Create C# files

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

alt text

Embed selected text into a code block (C#)

csharp-helper-plus.embed-code

Provides prompt to select template, surrounds selected text with template.

Available templates:

try { ... } catch(Exception ex) { ... }

if (...) { ... }

alt text

Fix namespace (C#)

csharp-helper-plus.fix-namespace

Corrects namespace in current file based on path to project.

alt text

Fix filename (C#)

csharp-helper-plus.fix-filename

Renames file to match class name.

alt text

Toggle Method Sync (C#)

csharp-helper-plus.toggle-method-sync

Changes method signature to async and vice versa

alt text

About

VSCode helper functions to speed up C# development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%