using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace skyscraper5.DNS.Protocol.ResourceRecords.Records
{
	public class CanonicalNameResourceRecord : BaseResourceRecord, SimpleDnsRecord
	{
		public CanonicalNameResourceRecord(IResourceRecord record, byte[] message, int dataOffset)
			: base(record)
		{
			CanonicalDomainName = Domain.FromArray(message, dataOffset);
		}

		public Domain CanonicalDomainName { get; }

		public string GetDataAsString()
		{
			return CanonicalDomainName.ToString();
		}
	}
}
