Getting started (C#)
Supported Runtimes
- .NET Framework 4.7.2
- .NET Framework 4.8
- .NET Core 3.1
- .NET 5+
Install the Runtime
To install the Bebop .NET runtime you can use the following commands:
Package | NuGet Stable | Downloads |
---|---|---|
bebop |
Install the Compiler Tools
To install the Bebop Compiler tools you can use the following command:
Package | NuGet Stable | Downloads |
---|---|---|
bebop-tools |
Configuring the Compiler Tools
Inside of your project file add a new ItemGroup
When the <Bebop>
item group is present in your project all schemas that match the provided Include
path are compiled in accordance with the output parameters defined whenever you build your project (meaning that schema changes reflect immediately in your project.)
Any issues encountered while compiling your schemas can now also be inspected from the error list.
Using Bebop Mirroring
Mirroring is a Bebop feature supported by the .NET runtime implementation that allows for records to be access and handled dynamically. For instance, you can define a class as a RecordHandler
and bind it’s methods to be invoked whenever a record of a certain type is decoded.
It takes advantage of the opcode decorator to determine which method to invoke.
Arbitrary data can then be decoded dynamically by leveraging the records opcode, and the method bound to it is fired.