Using Roslyn Workspaces for one-off automation (as opposed to analyzers) and as a stepping stone in learning Roslyn.

This page summarizes the projects mentioned and recommended in the original post on /r/csharp

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • Buildalyzer

    A utility to perform design-time builds of .NET projects without having to think too hard about it.

  • Agreed, Roslyn Workspaces can be helpful. I use them for some code-gen of TypeScript types based on my C# model. There's also Buildalyzer which can help simplify working with Workspaces.

  • Roslyn

    The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.

  • We do support rewrapping arguments like you're trying to do as a Roslyn code action, so you could take a look at how we do it. The core bit (I think) that matches what you're doing is in https://github.com/dotnet/roslyn/blob/ef242b10242389eb00feb2114a50fe746bc8435e/src/Features/Core/Portable/Wrapping/SeparatedSyntaxList/SeparatedSyntaxListCodeActionComputer.cs, which is where we are doing whitespace editing between the tokens. Some of that is using internal helpers to Roslyn so you'll have to dig a bit to see fully how it works.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts