/// <inheritdoc /> public override Attachment Normalize() { string normalizedName = MarkupNormalizationUtils.NormalizeAttachmentName(Name); string normalizedContentType = MarkupNormalizationUtils.NormalizeContentType(ContentType); if (ReferenceEquals(Name, normalizedName) && ReferenceEquals(ContentType, normalizedContentType)) { return(this); } return(new BinaryAttachment(normalizedName, normalizedContentType, bytes)); }
/// <inheritdoc /> public override Attachment Normalize() { string normalizedName = MarkupNormalizationUtils.NormalizeAttachmentName(Name); string normalizedContentType = MarkupNormalizationUtils.NormalizeContentType(ContentType); string normalizedText = MarkupNormalizationUtils.NormalizeText(text); if (ReferenceEquals(Name, normalizedName) && ReferenceEquals(ContentType, normalizedContentType) && ReferenceEquals(text, normalizedText)) { return(this); } return(new TextAttachment(normalizedName, normalizedContentType, text)); }