https://github.com/asklar/csx
CSX Compiler
https://github.com/asklar/csx
csharp csx react react-native reactive reactive-programming uap windows xaml xaml-winrt
Last synced: about 2 months ago
JSON representation
CSX Compiler
- Host: GitHub
- URL: https://github.com/asklar/csx
- Owner: asklar
- Created: 2019-07-26T18:22:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-07T17:14:34.000Z (about 6 years ago)
- Last Synced: 2025-03-28T03:42:52.048Z (6 months ago)
- Topics: csharp, csx, react, react-native, reactive, reactive-programming, uap, windows, xaml, xaml-winrt
- Language: C#
- Size: 4.34 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# CSX Compiler
### Background
React JS allows embedding html markup in JS (JSX).### Goal
Can we offer something similar: _embed **XAML** markup inside of **C#**_* I built a compiler frontend that translates the mix of C#+XAML markup into pure C#
* It’s type-safe and reflects on the types of properties/events/… to emit the right kind of code.
* For example if you say `` it knows that the 24 needs to be interpreted as an `int`, not a `string`.
* It allows repeater-type scenarios inside a container and allows naming objects so that they can later be referenced:
```xml{
return person.Tasks.Select(todo => CreateToDoItem(todo));
}```
I have a test .netcore3 app using WinForms-hosting-XAML and I’ve integrated the CSX compiler as an MSBuild target rule to convert the CSX into CS.With this you can modify the CSX file, F5 to rebuild & launch 😊