/// <summary> /// Dispatches to the specific visit method for this MIME entity. /// </summary> /// <remarks> /// This default implementation for <see cref="MimeKit.TextPart"/> nodes /// calls <see cref="MimeKit.MimeVisitor.VisitTextPart"/>. Override this /// method to call into a more specific method on a derived visitor class /// of the <see cref="MimeKit.MimeVisitor"/> class. However, it should still /// support unknown visitors by calling /// <see cref="MimeKit.MimeVisitor.VisitTextPart"/>. /// </remarks> /// <param name="visitor">The visitor.</param> /// <exception cref="System.ArgumentNullException"> /// <paramref name="visitor"/> is <c>null</c>. /// </exception> public override void Accept (MimeVisitor visitor) { if (visitor == null) throw new ArgumentNullException (nameof (visitor)); visitor.VisitTextPart (this); }
/// <summary> /// Dispatches to the specific visit method for this MIME entity. /// </summary> /// <remarks> /// This default implementation for <see cref="MimeKit.MimeEntity"/> nodes /// calls <see cref="MimeKit.MimeVisitor.VisitMimeEntity"/>. Override this /// method to call into a more specific method on a derived visitor class /// of the <see cref="MimeKit.MimeVisitor"/> class. However, it should still /// support unknown visitors by calling /// <see cref="MimeKit.MimeVisitor.VisitMimeEntity"/>. /// </remarks> /// <param name="visitor">The visitor.</param> /// <exception cref="System.ArgumentNullException"> /// <paramref name="visitor"/> is <c>null</c>. /// </exception> public override void Accept(MimeVisitor visitor) { if (visitor == null) { throw new ArgumentNullException("visitor"); } visitor.VisitTextPart(this); }