static void TestDbusGetPropertyImpl(Udbus.Serialization.UdbusMessageBuilderTracker builder, Udbus.Core.IUdbusMessageVisitor visitor, Udbus.Serialization.UdbusConnector connector, System.Threading.ManualResetEvent stop, PreNextActionDelegate preNextAction) { preNextAction("GetProperty"); int result; Udbus.Serialization.NMessageStruct.UdbusMessageHandle recv; using (var msg = builder.UdbusMethodMessage( "com.citrix.xenclient.xenmgr", "/", "org.freedesktop.DBus.Properties", "Get").Message) { Udbus.Types.dbus_sig signature = Udbus.Types.dbus_sig.Initialiser; signature.a[0] = Udbus.Types.dbus_type.DBUS_STRING; signature.a[1] = Udbus.Types.dbus_type.DBUS_STRING; signature.a[2] = Udbus.Types.dbus_type.DBUS_INVALID; builder.SetSignature(ref signature) .BodyAdd(4096) .BodyAdd_String("com.citrix.xenclient.xenmgr.config") .BodyAdd_String("iso-path") ; result = connector.Send(msg); Console.WriteLine("GetProperty send result: {0}", result); Udbus.Core.UdbusVisitorFunctions.Visit(result, msg, new Udbus.Core.UdbusMessageVisitorDumpConsole()); } try { Udbus.Core.UdbusMessagePair recvData = Udbus.Core.UdbusVisitorFunctions.LoopUdbusFind(connector, visitor, Console.Out, stop); if (!recvData.QuEmpty) { recv = recvData.Data; if (recv.typefield.type != Udbus.Types.dbus_msg_type.DBUS_TYPE_ERROR) { Udbus.Serialization.UdbusMessageReader reader = new Udbus.Serialization.UdbusMessageReader(recvData.Handle); do { #if !READASVARIANT var variant = reader.ReadVariantValue(out result); Console.WriteLine("iso_path: {0}", variant.ToString()); //Udbus.Parsing.BuildContext context = new Udbus.Parsing.BuildContext(new Udbus.Parsing.CodeTypeNoOpHolder()); //Udbus.Serialization.Variant.UdbusVariantIn variantIn = new Udbus.Serialization.Variant.UdbusVariantIn(reader); //Udbus.Parsing.IDLArgumentTypeNameBuilderBase nameBuilder = new Udbus.Parsing.IDLArgumentTypeNameBuilderNoOp(); //Udbus.Types.dbus_sig sig = Udbus.Types.dbus_sig.Initialiser; //result = reader.ReadSignature(ref sig); //Udbus.Parsing.CodeBuilderHelper.BuildCodeParamType(variantIn, nameBuilder, sig.a, context); //Console.WriteLine("iso_path: {0}", variantIn.Variant.ToString()); #else // !READASVARIANT Udbus.Types.dbus_sig sig = Udbus.Types.dbus_sig.Initialiser; result = reader.ReadSignature(ref sig); if (result != 0) { Console.WriteLine("Error reading property variant signature: {0}", result); break; } string isopath; result = reader.ReadString(out isopath); if (result != 0) { Console.WriteLine("Error reading property variant string: {0}", result); break; } Console.WriteLine("iso_path: {0}", isopath); #endif // READASVARIANT } while (false); } } else { Console.WriteLine("Getting the property failed. Boooooo "); } } catch (System.Runtime.InteropServices.SEHException seh) { Console.WriteLine("Error: " + seh.ToString()); } }