/// <summary> /// Instantiates a message with the given header and question /// </summary> /// <param name="header">the header - take as is, assumed configured correctly</param> /// <param name="question">question to ask</param> protected DnsMessage(DnsHeader header, DnsQuestion question) { if (header == null || question == null) { throw new ArgumentNullException(); } m_header = header; m_header.QuestionCount = 1; m_question = question; }
/// <summary> /// Deserialize this message /// </summary> /// <param name="reader"></param> protected virtual void Deserialize(ref DnsBufferReader reader) { m_header = new DnsHeader(ref reader); m_question = new DnsQuestion(ref reader); }