Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
fixup! squash! proxy: Property get/set via CLR properties
Browse files Browse the repository at this point in the history
  • Loading branch information
arfbtwn committed Oct 11, 2017
1 parent 97c243e commit edaceea
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/ExportObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,15 @@ public virtual void HandleMethodCall (MessageContainer method_call)
private void HandlePropertyCall(MessageContainer method_call)
{
Message msg = method_call.Message;
MessageReader msgReader = new MessageReader(msg);
MessageWriter retWriter = new MessageWriter();
MessageReader msgReader = new MessageReader (msg);
MessageWriter retWriter = new MessageWriter ();

object[] args = MessageHelper.GetDynamicValues(msg);
object[] args = MessageHelper.GetDynamicValues (msg);

string face = (string)args[0];

if ("GetAll" == method_call.Member) {
conn.MaybeSendUnknownMethodError(method_call);
conn.MaybeSendUnknownMethodError (method_call);
return;
}

Expand Down Expand Up @@ -225,7 +225,7 @@ private void HandlePropertyCall(MessageContainer method_call)

Exception raisedException = null;
try {
pc(Object, msgReader, msg, retWriter, null);
pc (Object, msgReader, msg, retWriter, null);
} catch (Exception e) {
raisedException = e;
}
Expand All @@ -240,31 +240,31 @@ private void HandlePropertyCall(MessageContainer method_call)
ReplySerial = msg.Header.Serial
};
replyMsg = method_return.Message;
replyMsg.AttachBodyTo(retWriter);
replyMsg.AttachBodyTo (retWriter);
replyMsg.Signature = outSig;
}
else {
// BusException allows precisely formatted Error messages.
BusException busException = raisedException as BusException;
if (busException != null)
replyMsg = method_call.CreateError(busException.ErrorName, busException.ErrorMessage);
replyMsg = method_call.CreateError (busException.ErrorName, busException.ErrorMessage);
else if (raisedException is ArgumentException && raisedException.TargetSite.Name == mi.Name)
{
// Name match trick above is a hack since we don't have the resolved MethodInfo.
ArgumentException argException = (ArgumentException)raisedException;
using (System.IO.StringReader sr = new System.IO.StringReader(argException.Message))
using (System.IO.StringReader sr = new System.IO.StringReader (argException.Message))
{
replyMsg = method_call.CreateError("org.freedesktop.DBus.Error.InvalidArgs", sr.ReadLine());
replyMsg = method_call.CreateError ("org.freedesktop.DBus.Error.InvalidArgs", sr.ReadLine());
}
}
else
replyMsg = method_call.CreateError(Mapper.GetInterfaceName(raisedException.GetType()), raisedException.Message);
replyMsg = method_call.CreateError (Mapper.GetInterfaceName(raisedException.GetType()), raisedException.Message);
}

if (method_call.Sender != null)
replyMsg.Header[FieldCode.Destination] = method_call.Sender;

conn.Send(replyMsg);
conn.Send (replyMsg);
}

public object Object {
Expand Down

0 comments on commit edaceea

Please sign in to comment.