ToArray() публичный Метод

public ToArray ( ) : byte[]
Результат byte[]
Пример #1
0
        public byte[] ToArray()
        {
            UpdateHeader();
            ByteStream result = new ByteStream(Size);

            result
                .Append(header.ToArray())
                .Append(questions.Select(q => q.ToArray()))
                .Append(answers.Select(a => a.ToArray()))
                .Append(authority.Select(a => a.ToArray()))
                .Append(additional.Select(a => a.ToArray()));

            return result.ToArray();
        }
Пример #2
0
        public byte[] ToArray()
        {
            UpdateHeader();
            ByteStream result = new ByteStream(Size);

            result
                .Append(header.ToArray())
                .Append(questions.Select(q => q.ToArray()));

            return result.ToArray();
        }
Пример #3
0
        public byte[] ToArray()
        {
            ByteStream result = new ByteStream(Size);

            result
                .Append(domain.ToArray())
                .Append(Marshalling.Struct.GetBytes(new Tail { Type = Type, Class = Class }));

            return result.ToArray();
        }
Пример #4
0
        public byte[] ToArray()
        {
            ByteStream result = new ByteStream(Size);

            result
                .Append(domain.ToArray())
                .Append(Marshalling.Struct.GetBytes<Tail>(new Tail() {
                    Type = Type,
                    Class = Class,
                    TimeToLive = ttl,
                    DataLength = data.Length
                }))
                .Append(data);

            return result.ToArray();
        }