private void SendDo(OtpMbox mbox, Erlang.Object code) { Otp.Erlang.Object reply = mbox.rpcCall( remote, "servant", "process_confirmation", new Otp.Erlang.List(code)); WriteLine("Do reply: {0}", reply); }
private IEnumerable<Tuple<String, object>> ListToMenuItems(Erlang.List list) { Erlang.Object itemPat = Erlang.Object.Format("{Text,Code}"); Erlang.VarBind binding; foreach (Erlang.Object item in list) { if (itemPat.match(item, (binding = new Otp.Erlang.VarBind()))) { Erlang.Object text = binding.find("Text"); string textStr = text.stringValue(); Erlang.Object code = binding.find("Code"); yield return new Tuple<String, object>(textStr, code); } } }