Exemplo n.º 1
0
Arquivo: ErlMsg.cs Projeto: mjaric/nfx
        /*
         * internal ErlMsg(Tag tag, ErlMsg msg)
         *  : this(tag, msg.Sender, msg.Recipient, msg.Ref, msg.Reason, msg.Payload,
         *         msg.m_Paybuf, msg.TraceToken)
         * {}
         */

        internal ErlMsg(Tag tag, IErlObject /* Pid or Atom */ from,
                        IErlObject /* Pid or Atom */ to, ErlRef?eref = null, IErlObject reason = null,
                        IErlObject payload = null, ErlInputStream paybuf = null,
                        ErlAtom?cookie     = null, ErlTrace trace        = null)
        {
            if (!(from is ErlPid || from is ErlAtom))
            {
                throw new ErlException(StringConsts.ERL_INVALID_VALUE_TYPE_ERROR.Args("sender", from.GetType().Name));
            }
            if (!(to is ErlPid || to is ErlAtom))
            {
                throw new ErlException(StringConsts.ERL_INVALID_VALUE_TYPE_ERROR.Args("recipient", from.GetType().Name));
            }

            m_From     = from;
            m_To       = to;
            Type       = tag;
            Paybuf     = paybuf;
            m_Payload  = payload;
            Reason     = reason;
            Ref        = eref.HasValue ? eref.Value : ErlRef.Null;
            Cookie     = cookie.HasValue ? cookie.Value : ErlAtom.Null;
            TraceToken = trace;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Write Erlang tuple to stream
 /// </summary>
 public void WriteTrace(ErlTrace tup)
 {
   WriteTuple(tup);
 }
Exemplo n.º 3
0
 /// <summary>
 /// Write Erlang tuple to stream
 /// </summary>
 public void WriteTrace(ErlTrace tup)
 {
     WriteTuple(tup);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Determine if two Erlang tuples are equal
 /// </summary>
 public bool Equals(ErlTrace o)
 {
     return(m_Items.SequenceEqual(o.m_Items));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Determine if two Erlang tuples are equal
 /// </summary>
 public bool Equals(ErlTrace o) { return m_Items.SequenceEqual(o.m_Items); }
Exemplo n.º 6
0
Arquivo: ErlMsg.cs Projeto: mjaric/nfx
 internal static ErlMsg Exit2TT(ErlPid from, ErlPid dest, IErlObject reason, ErlTrace traceToken)
 {
     return(new ErlMsg(Tag.Exit2TT, from, dest, reason: reason, trace: traceToken));
 }
Exemplo n.º 7
0
Arquivo: ErlMsg.cs Projeto: mjaric/nfx
 internal static ErlMsg RegSendTT(ErlPid from, ErlAtom dest, IErlObject msg,
                                  ErlTrace trace, ErlAtom?cookie = null)
 {
     return(new ErlMsg(Tag.RegSend, from, dest, payload: msg, cookie: cookie));
 }
Exemplo n.º 8
0
Arquivo: ErlMsg.cs Projeto: mjaric/nfx
 internal static ErlMsg SendTT(ErlPid dest, IErlObject msg, ErlTrace traceToken, ErlAtom?cookie = null)
 {
     return(new ErlMsg(Tag.SendTT, ErlPid.Null, dest, payload: msg, trace: traceToken, cookie: cookie));
 }