示例#1
0
 public MessageParameters(MessageParameters oneToCopy)
 {
     body             = oneToCopy.body;
     type             = oneToCopy.type;
     version          = oneToCopy.version;
     action           = oneToCopy.action;
     headers          = oneToCopy.headers;
     headerComplexity = oneToCopy.headerComplexity;
     bodyContentSize  = oneToCopy.bodyContentSize;
     bodyComplexity   = oneToCopy.bodyComplexity;
     addComments      = oneToCopy.addComments;
 }
示例#2
0
        public bool MoveNext()
        {
            if (disposed)
            {
                throw new ObjectDisposedException("Object disposed!");
            }

            if (mp == null)
            {
                versionIndex = actionIndex = bodyIndex = bodySizeIndex = headersIndex = 0;
                typeIndex    = 0;
                mp           = new MessageParameters
                {
                    addComments     = addComments,
                    version         = versions[0],
                    action          = actions[0],
                    bodyContentSize = bodySizes[0],
                    headers         = headers[0]
                };

                if (bodies != null)
                {
                    mp.type = legalTypesForCustomBodies[0];
                    mp.body = bodies[0];
                }
            }
            else
            {
                MoveNextWithoutChecking();
            }

            // While the resultant combination is invalid, skip over it.
            // Of course we stop if we reach the end.
            while
            (
                !atEnd && (false ||
                           ((mp.type == MessageType.Empty) && (mp.bodyContentSize > 0)) ||
                           ((mp.type == MessageType.Empty) && (mp.bodyComplexity > 1)) ||
                           TypeNotAllowed(mp.type)
                           ))
            {
                MoveNextWithoutChecking();
            }

            return(!atEnd);
        }
示例#3
0
 public CustomGeneratedMessage(MessageParameters howToCreate)
     :
     this(howToCreate.version, howToCreate.action, howToCreate.bodyComplexity, howToCreate.bodyContentSize)
 {
     addComments = howToCreate.addComments;
 }
示例#4
0
 public CustomGeneratedBodyWriter(MessageParameters howToCreate)
     :
     this(howToCreate.bodyComplexity, howToCreate.bodyContentSize)
 {
     addComments = howToCreate.addComments;
 }
示例#5
0
 public CustomStringMessage(MessageParameters howToCreate)
     : this(howToCreate.version, howToCreate.action, howToCreate.body)
 {
     addComments = howToCreate.addComments;
 }