Tmds.DBus.SourceGenerator 0.0.7

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tmds.DBus.SourceGenerator --version 0.0.7
                    
NuGet\Install-Package Tmds.DBus.SourceGenerator -Version 0.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tmds.DBus.SourceGenerator" Version="0.0.7">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tmds.DBus.SourceGenerator" Version="0.0.7" />
                    
Directory.Packages.props
<PackageReference Include="Tmds.DBus.SourceGenerator">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Tmds.DBus.SourceGenerator --version 0.0.7
                    
#r "nuget: Tmds.DBus.SourceGenerator, 0.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Tmds.DBus.SourceGenerator@0.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Tmds.DBus.SourceGenerator&version=0.0.7
                    
Install as a Cake Addin
#tool nuget:?package=Tmds.DBus.SourceGenerator&version=0.0.7
                    
Install as a Cake Tool

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

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 AdditionalFiles 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.

There are no supported framework assets in this package.

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 (3)

Showing the top 3 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
AvaloniaUI/Avalonia.Labs
Experimental Controls for Avalonia
MATRIX-feather/LLin
从mfosu中分离出来的下载加速 & 游戏内音乐播放器
Version Downloads Last Updated
0.0.21 8,997 2/28/2025
0.0.20 4,480 10/9/2024
0.0.19 15,004 8/18/2024
0.0.18 57,139 7/18/2024
0.0.17 1,237 6/8/2024
0.0.16 844 4/18/2024
0.0.15 16,952 1/31/2024
0.0.14 252 1/28/2024
0.0.13 4,327 11/18/2023
0.0.12 222 11/15/2023
0.0.11 4,255 9/12/2023
0.0.10 7,947 8/31/2023
0.0.8 9,975 5/25/2023
0.0.7 2,349 5/5/2023
0.0.6 1,067 5/4/2023
0.0.5 4,591 3/28/2023
0.0.4 34,970 3/14/2023
0.0.3 334 3/13/2023
0.0.2 4,705 2/20/2023