From 639c106d70fbd640e0e20e7b9cdb7927e699d6e6 Mon Sep 17 00:00:00 2001 From: Tom Deseyn Date: Sun, 28 Dec 2025 09:30:57 +0100 Subject: [PATCH] Generate code that uses the IPathMethodHandler that was added in Tmds.DBus 0.23.0. --- DebugSourceGenerator/DebugSourceGenerator.csproj | 2 +- .../DBusSourceGenerator.Classes.cs | 12 +++++------- .../Tmds.DBus.SourceGenerator.csproj | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/DebugSourceGenerator/DebugSourceGenerator.csproj b/DebugSourceGenerator/DebugSourceGenerator.csproj index 8ef292f..da50791 100644 --- a/DebugSourceGenerator/DebugSourceGenerator.csproj +++ b/DebugSourceGenerator/DebugSourceGenerator.csproj @@ -39,7 +39,7 @@ - + diff --git a/Tmds.DBus.SourceGenerator/DBusSourceGenerator.Classes.cs b/Tmds.DBus.SourceGenerator/DBusSourceGenerator.Classes.cs index 4e9113e..32f2acf 100644 --- a/Tmds.DBus.SourceGenerator/DBusSourceGenerator.Classes.cs +++ b/Tmds.DBus.SourceGenerator/DBusSourceGenerator.Classes.cs @@ -106,21 +106,22 @@ internal interface IDBusInterfaceHandler #nullable enable namespace Tmds.DBus.SourceGenerator { - internal class PathHandler : IMethodHandler + internal class PathHandler : IPathMethodHandler { - private readonly bool _runMethodHandlerSynchronously; private readonly ICollection _dbusInterfaces; - public PathHandler(string path, bool runMethodHandlerSynchronously = true) + public PathHandler(string path) { Path = path; - _runMethodHandlerSynchronously = runMethodHandlerSynchronously; _dbusInterfaces = new List(); } /// public string Path { get; } + /// + public bool HandlesChildPaths => false; + /// public async ValueTask HandleMethodAsync(MethodContext context) { @@ -195,9 +196,6 @@ void Reply() } } - /// - public bool RunMethodHandlerSynchronously(Message message) => _runMethodHandlerSynchronously; - /// public void Add(IDBusInterfaceHandler item) { diff --git a/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.csproj b/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.csproj index 59bf62d..bcfe31c 100644 --- a/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.csproj +++ b/Tmds.DBus.SourceGenerator/Tmds.DBus.SourceGenerator.csproj @@ -17,7 +17,7 @@ - 0.0.22 + 0.0.23 Tmds.DBus.SourceGenerator affederaffe affederaffe