Beispiel #1
0
        public BeginRequestBody(Record record)
        {
            if (record.Type != RecordType.BeginRequest)
            {
                throw new ArgumentException(
                          Strings.BeginRequestBody_WrongType,
                          "record");
            }

            if (record.BodyLength != 8)
            {
                throw new ArgumentException(
                          Strings.BeginRequestBody_WrongSize, "record");
            }

            byte[] body = record.Body;
            role  = (Role)Record.ReadUInt16(body, 0);
            flags = (BeginRequestFlags)body [2];
        }
Beispiel #2
0
 public BeginRequestBody(byte[] body)
 {
     role  = (Role)Record.ReadUInt16(body, 0);
     flags = (BeginRequestFlags)body [2];
 }