/// <summary> /// Initializes a new instance of the <see cref="SerializedDomain"/> class /// with the specified contents and content type. /// </summary> /// <param name="contents">The contents of the serialized domain.</param> /// <param name="contentType">The content type of the serialized domain.</param> /// <exception cref="ArgumentNullException"> /// If <paramref name="contents"/> is <see langword="null"/>. /// <para>-or-</para> /// <para>If <paramref name="contentType"/> is <see langword="null"/>.</para> /// </exception> /// <exception cref="ArgumentException">If <paramref name="contents"/> is empty.</exception> public SerializedDomain(string contents, SerializedDomainFormat contentType) { if (contents == null) { throw new ArgumentNullException("contents"); } if (contentType == null) { throw new ArgumentNullException("contentType"); } if (string.IsNullOrEmpty(contents)) { throw new ArgumentException("contents cannot be empty"); } _contents = contents; _contentType = contentType; }
/// <inheritdoc/> protected override SerializedDomainFormat FromName(string name) { return(SerializedDomainFormat.FromName(name)); }