• Stars
    star
    145
  • Rank 254,144 (Top 6 %)
  • Language
    C#
  • License
    MIT License
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The C# Source Generator Playground

"bulb by Luca Ska from the Noun Project" Source Generator Playground

License: MIT Main build status Join the Discord

Source Generator Playground is a simple Blazor app that lets you experiment with a C# 9 source generator. It allows you to write a simple console application, and a source generator, and observe the generated output and the program output.

Try it live: https://wengier.com/SourceGeneratorPlayground

Multiple generators can be supplied, though they all need to live in the same text box, and the generator(s) can add any number of syntax trees to the compilation. All care is taken to capture meaningful errors from compilation of the generator, the program, and the running of the program.

You can browse through the in built samples to try out generators, and start modifying things to see what happens. If you want to run your own, use the Load buttons. At the moment the only references available that can be leveraged is whatever is necessary for the app itself.

Feel free to log issues for feedback, or PRs for new samples etc.

More Repositories

1

Trains.NET

A simple 2D game written in C# with .NET Core. Development is streamed live on https://twitch.tv/davidwengier and past streams available on YouTube at http://bit.ly/trains-net-videos
C#
241
star
2

SourceGeneratorTemplate

A basic template for writing a C# source generator
C#
178
star
3

DecompilationDiffer

Compiles and Decompiles your code for fun and that's it.
HTML
14
star
4

EnumValidatorGenerator

C#
10
star
5

LinkableDiff

A diff editor you can type in, and perma-link to
HTML
9
star
6

AllGlobalUsingsGenerator

I don't recommend using this
C#
3
star
7

Xunit.SerializedTheoryData

A simple replacement for TheoryData that automatically serializes and deserializes in order to show more fidelity in test cases.
C#
2
star
8

PostAdaptiveCard

A GitHub Action that posts issue and pr details to any adaptive card webhook (eg, Teams)
C#
2
star
9

trains2

Trains v2
TypeScript
2
star
10

dbupgrader

An all purpose database upgrader that doesn't rely on you writing your own scripts, and lets you care about the definition of the entire database rather than the steps taken to get it there.
C#
2
star
11

Net48Generator

Sample for https://twitter.com/knifecore/status/1355964092469620737
C#
1
star
12

Buffer

A buffer
C#
1
star
13

DDDByNightTimer

A timer for DDD by Night, bastardized from https://github.com/fraggerfox/countdown-timer/
JavaScript
1
star
14

ThreePM

A music library and player
C#
1
star
15

AdventOfCode2018

A lazy C# coders answers to https://adventofcode.com/2018
C#
1
star
16

davidwengier.github.io

SCSS
1
star
17

SQLike

Playing around with creating a real parser and lexer for an SQL-like language.
C#
1
star
18

Benchmark

Simple benchmarks for Melbourne Alt.Net talk on 29th Aug 2017
C#
1
star