The extension add the correct namespace, calculating the folder's path up to the .csproj
file.
Whit this extension you can
- Add new class on existing file
- Add new interface on existing file
- Add new custom template, selected from a custom folder, on existing file
Create new file press F1 and select
-
CS: Add Class
for add new class -
CS: Add Interface
for add new interface -
CS: Add Custom Template
for add a custom template.The engine load the selected file and replace the
$namespace$
with calculated namespace and$name
with the file name. Template content examplenamespace $namespace$ { private class $name$ { } }
You must configure the
dotNetCoreAdd.templateFolderPath
where engine search for the templates
The command grab the file name as the class/interface name
This extension contributes the following settings:
dotNetCoreAdd.alwaysCapitalizeFirstLetter
: enable/disable the capitalization of first letterdotNetCoreAdd.templateFolderPath
: the templates folder path whereAdd Custom Template
command read for template filesdotNetCoreAdd.useScopedNamespaces
: enable/disable the use of scoped namespace feature on csharp 10
The file MUST be saved before use the extension commands
See CHANGELOG