Tmds.DBus.SourceGenerator
0.0.8
See the version list below for details.
dotnet add package Tmds.DBus.SourceGenerator --version 0.0.8
NuGet\Install-Package Tmds.DBus.SourceGenerator -Version 0.0.8
<PackageReference Include="Tmds.DBus.SourceGenerator" Version="0.0.8"> <PrivateAssets>all</PrivateAssets> <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets> </PackageReference>
paket add Tmds.DBus.SourceGenerator --version 0.0.8
#r "nuget: Tmds.DBus.SourceGenerator, 0.0.8"
// Install Tmds.DBus.SourceGenerator as a Cake Addin #addin nuget:?package=Tmds.DBus.SourceGenerator&version=0.0.8 // Install Tmds.DBus.SourceGenerator as a Cake Tool #tool nuget:?package=Tmds.DBus.SourceGenerator&version=0.0.8
Tmds.DBus.SourceGenerator
A roslyn source generator targeting the Tmds.DBus.Protocol API
Introduction
This source generator completely eliminates the usage of reflection in order to be trimmer- and AOT-friendly. For further documentation of Tmds.DBus and DBus in general, see https://github.com/tmds/Tmds.DBus#readme.
Usage
Note
This Source Generator targets the
Tmds.DBus.Protocol
API, which means you have to explicitly install said package.
Either install the NuGet package Tmds.DBus.SourceGenerator
or clone the git repository and add a project reference to the source generator in your .csproj
<ItemGroup>
<ProjectReference Include="./Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>
<Import Project="./Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.props" />
Then add the xml definitions as AdditionalFile
s to your project.
Depending on whether you want to generate a Proxy or a handler, set the DBusGeneratorMode
to either Proxy
or Handler
, respectively.
<ItemGroup>
<AdditionalFiles Include="DBusXml/DBus.xml" DBusGeneratorMode="Proxy" />
<AdditionalFiles Include="DBusXml/StatusNotifierItem.xml" DBusGeneratorMode="Handler" />
</ItemGroup>
Now you can instantiate the generated proxy class and use it like with the traditional Tmds.DBus. For handlers, create a new class and inherit from the generated one and implement its abstract methods.
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on Tmds.DBus.SourceGenerator:
Repository | Stars |
---|---|
AvaloniaUI/Avalonia
Develop Desktop, Embedded, Mobile and WebAssembly apps with C# and XAML. The most popular .NET UI client technology
|
Version | Downloads | Last updated |
---|---|---|
0.0.20 | 146 | 10/9/2024 |
0.0.19 | 6,591 | 8/18/2024 |
0.0.18 | 16,606 | 7/18/2024 |
0.0.17 | 888 | 6/8/2024 |
0.0.16 | 663 | 4/18/2024 |
0.0.15 | 13,796 | 1/31/2024 |
0.0.14 | 209 | 1/28/2024 |
0.0.13 | 3,954 | 11/18/2023 |
0.0.12 | 188 | 11/15/2023 |
0.0.11 | 4,059 | 9/12/2023 |
0.0.10 | 7,644 | 8/31/2023 |
0.0.8 | 9,880 | 5/25/2023 |
0.0.7 | 2,292 | 5/5/2023 |
0.0.6 | 1,007 | 5/4/2023 |
0.0.5 | 4,518 | 3/28/2023 |
0.0.4 | 34,379 | 3/14/2023 |
0.0.3 | 269 | 3/13/2023 |
0.0.2 | 4,635 | 2/20/2023 |