Closed YoussefWaelMohamedLotfy closed 3 years ago
Seems like a good idea. But it changes the current default. Personally, I think it is a good change, but it would be nice to have an option for it. Could you add that? It should be something like this (should be enough):
package.json - configuration
"csharpextensions.includeNamespaces": {
"type": "boolean",
"default": true,
"description": "If created classes should include default namespaces"
}
extension.ts - openTemplateAndSaveNewFile, after let text =
etc:
const includeNamespaces = vscode.workspace.getConfiguration().get('csharpextensions.includeNamespaces', true);
if (includeNamespaces) {
text = text.replace('${namespaces}', `using System;${EOL}using System.Collections.Generic;${EOL}using System.Linq;${EOL}using System.Threading.Tasks;`)
}
And then replace the added namespaces in the templates with ${namespaces}
.
Kindly check the new additions as you requested. I hope all is correct.
So, Is the new release ready after these changes?
If the issues are resolved and the pull-request is merged, I will create a new release. That just takes me a few minutes. I can merge it if it is a working version, with the option for users to switch back to the current way it works.
Resolved via #38
Added in APIController, Class, and Interface for simplifing the coding task.