Welcome to a collection of samples for Stl.Fusion!
All project updates are published on our Discord Server; it's also the best place for Q/A.
The simplest way:
- Install Docker and Docker Compose
- To run Hello World:
docker-compose run sample_hello_world dotnet Samples.HelloWorld.dll
- To run Blazor Samples:
- Run
docker-compose up --build sample_blazor
in the root folder of this repository - Open http://localhost:5005/.
- Run
- To run Tutorial:
- Run
docker-compose up --build tutorial
in the root folder of this repository - Open https://localhost:50005/README.md.
- Run
And if you'd rather run everything locally:
- Install the latest .NET Core SDK 3.1
- To run Hello World:
dotnet run -p src/HelloWorld/HelloWorld.csproj
- To run Blazor Samples:
- Run
dotnet run --project src/Blazor/Server/Samples.Blazor.Server.csproj
- Open http://localhost:5005/.
- Run
- To run Tutorial:
- Install Try .NET. Its release version may fail to run the code, so we recommend to install the preview version of this tool.
- Run
dotnet try --port 50005 docs/tutorial
in the root folder of this repository - Open https://localhost:50005/README.md.
It's interactive – you can simply browse it, but to modify and run the C# code presented there, you need Try .NET or Docker.
It's a dual-mode Blazor SPA hosted by ASP.NET Core website, which also serves its API. The application includes:
- "Server Time" and "Server Screen" pages showing the simplest timeout-based invalidation
- "Chat" - a tiny chat relying on event-based invalidation
- "Composition" shows Fusion's ability to use both local
IComputed<T>
instances and client-side replicas of similar server-side instances to compute a new value that properly tracks both local and remote dependencies.
The app supports both (!) Server-Side Blazor and Blazor WebAssembly modes – you can switch the mode on "Home" page.
Moreover, it also exposes a regular RESTful API – try invoking any of endpoints there right from embedded Swagger console.
HelloWorld
is a basic sample showing how to create a [ComputedServiceMethod]
that depends on output of another method (i.e. how to create a dependency chain),
invoke such methods from code, and react to changes in concurrent thread.
Check out its source code.
- Check out Stl.Fusion repository
- Read the Documentation
- Join our Discord Server to ask questions and track project updates.