Skip to content

Commit

Permalink
Fix compilation of Tmds.DBus.Protocol example. (#188)
Browse files Browse the repository at this point in the history
Fixes #185.
  • Loading branch information
madewokherd committed Mar 12, 2023
1 parent df544c4 commit 57a211f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class AddImplementation : IMethodHandler
private const string Interface = "org.example.Adder";
public string Path => "/org/example/Adder";

bool RunMethodHandlerSynchronously(Message message) => true;
public bool RunMethodHandlerSynchronously(Message message) => true;

public ValueTask HandleMethodAsync(MethodContext context)
{
Expand All @@ -117,10 +117,10 @@ class AddImplementation : IMethodHandler
switch ((request.MemberAsString, request.SignatureAsString))
{
case ("Add", "ii"):
var reader = message.GetBodyReader();
var reader = request.GetBodyReader();
int i = reader.ReadInt32();
int j = reader.ReadInt32();
return Add(connection, i, j);
return Add(context, i, j);
}
break;
}
Expand All @@ -138,7 +138,7 @@ class AddImplementation : IMethodHandler

private void ReplyToAdd(MethodContext context, int sum)
{
using var writer = connection.CreateReplyWriter("i");
using var writer = context.CreateReplyWriter("i");
writer.WriteInt32(sum);
context.Reply(writer.CreateMessage());
}
Expand Down

0 comments on commit 57a211f

Please sign in to comment.