示例#1
0
        internal static bool TryConstruct(string pName, IList <byte> pValue, out cHeaderFieldMsgIds rMsgIds)
        {
            if (pValue == null)
            {
                rMsgIds = null; return(false);
            }

            List <string> lMsgIds = new List <string>();

            cBytesCursor lCursor = new cBytesCursor(pValue);

            while (true)
            {
                if (!lCursor.GetRFC822MsgId(out var lMsgId))
                {
                    break;
                }
                lMsgIds.Add(lMsgId);
            }

            if (lCursor.Position.AtEnd)
            {
                rMsgIds = new cHeaderFieldMsgIds(pName, new cBytes(pValue), new cStrings(lMsgIds));
                return(true);
            }

            rMsgIds = null;
            return(false);
        }
示例#2
0
 internal cEnvelope(DateTime?pSent, cCulturedString pSubject, string pBaseSubject, cAddresses pFrom, cAddresses pSender, cAddresses pReplyTo, cAddresses pTo, cAddresses pCC, cAddresses pBCC, cHeaderFieldMsgIds pInReplyTo, cHeaderFieldMsgId pMessageId)
 {
     Sent        = pSent;
     Subject     = pSubject;
     BaseSubject = pBaseSubject;
     From        = pFrom;
     Sender      = pSender;
     ReplyTo     = pReplyTo;
     To          = pTo;
     CC          = pCC;
     BCC         = pBCC;
     InReplyTo   = pInReplyTo;
     MessageId   = pMessageId;
 }