bard83 / csharpextensions Goto Github PK
View Code? Open in Web Editor NEWThis project forked from kreativjos/csharpextensions
C# Extensions for Visual Studio Code
License: MIT License
This project forked from kreativjos/csharpextensions
C# Extensions for Visual Studio Code
License: MIT License
Remove deprecated dependencies:
Update
Upgrade
Describe the bug
Expected Behaviour
Actual Behaviour
Context
Extension Version: v1.7.3
VSCode Version: 1.90.0
OS Version: MacOS Sonoma 14.2.1
Create a github action which bumps the minor version after a release gets published.
Create a github action which bumps the patch version number after the PR gets merged.
Describe the bug
Tried to create any component and extension shows the below error:
Weird, but the extension you are currently using could not be found
Context
Expected behavior
Extension should create component as expected
Some templates require add some attributes to class definition with placeholders
For example database migration template:
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
namespace TestProject.Migrations;
[DbContext(typeof(AppDbContext))]
[Migration("m231108_204500_CreateTestTable")]
public class m231108_204500_CreateTestTable: Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Test",
columns: t => new
{
Id = t.Column<int>(type: "serial"),
}
).PrimaryKey("PK-Test", c => c.Id);
}
}
I need option to add attributes DbContext
and Migration
to class definition.
Also attribute Migration
must contain class name as his parameter.
Implementation example:
Add new parameter attribute
(or other name) to template definition with placeholder replacer.
Example:
"csharpextensions.templates": {
"items": [
{
...
"construct": "class",
"attribute": "[DbContext(typeof(AppDbContext))]\n[Migration(\"{{ ClassName }}\")]"
}
]
},
Introduce two specific sections which covers generics:
genericsDefinition: "I,J,K"
. The keys should be enclosed automatically between <
and >
.genericsWhereClauses: ["where I : class", "where J : struct", "where K : IMyInterface"]
. The clauses will be joined by EOL and applied to the custom template.When a tag it's pushed a draft release should be created. Also create the artifact and attach it to the draft release.
Based on this request, the extension should be able to support custom templates.
The user should be able to define the sections which wants to customize, then using the menu item will be able to choose the template - from a list of templates - and then insert the name.
Tasks
Struct could be readonly
, record
or readonly record
.
Since the template covers the base case of struct, it would be nice to easily convert a struct into one of the above cases.
Introducing the custom templates has shown how templates files are not needed and they can be specified in a more generic structure: Preset. Preset has a base content template which can be shared over the actual templates.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.