Replaces placeholder with full csharp@0.1.0 plugin. Adds helper/ package (locate, process, client, protocol) for JSON-RPC over stdio to ctx-roslyn-helper. project.go finds .sln (fallback: single .csproj), loads it, retrieves projectSummary, formats dense markdown with project details, reference graph, and multi-targeting section. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
32 lines
919 B
Go
32 lines
919 B
Go
// Package csharp implements the ctx csharp plugin — .NET solution analysis via Roslyn helper.
|
|
package csharp
|
|
|
|
import (
|
|
"github.com/ricarneiro/ctx/internal/core"
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
func init() {
|
|
core.Register(&csharpPlugin{})
|
|
}
|
|
|
|
type csharpPlugin struct{}
|
|
|
|
func (c *csharpPlugin) Name() string { return "csharp" }
|
|
func (c *csharpPlugin) Version() string { return "0.1.0" }
|
|
func (c *csharpPlugin) ShortDescription() string { return "C# / .NET project analysis via Roslyn" }
|
|
|
|
func (c *csharpPlugin) Command(ctx *core.Context) *cobra.Command {
|
|
cmd := &cobra.Command{
|
|
Use: "csharp",
|
|
Short: c.ShortDescription(),
|
|
Long: `Analyze C# / .NET projects and emit compact markdown summaries
|
|
optimized for Claude Code consumption.
|
|
|
|
Requires the Roslyn helper (ctx-roslyn-helper) to be built.
|
|
See 'ctx csharp project --help' for details.`,
|
|
}
|
|
cmd.AddCommand(projectCmd(ctx))
|
|
return cmd
|
|
}
|