internal MimePartInfo(Charset charset, MimePartInfo.Callback writerCallback, MimePartContentType contentType, AttachmentId attachmentId, MimePart skeletonPart, MimeDocument skeleton, MimePart smimePart, MimeDocument smimeDocument, ref int partIndex) { this.charset = charset; this.contentType = contentType; this.writerCallback = writerCallback; this.partIndex = partIndex++; this.attachmentId = attachmentId; this.skeletonPart = skeletonPart; this.skeleton = skeleton; this.smimePart = smimePart; this.smimeDocument = smimeDocument; this.bodyLines = -1; this.bodyBytes = -1; }
internal static string GetContentTypeName(MimePartContentType contentType) { switch (contentType) { case MimePartContentType.TextPlain: return("text/plain"); case MimePartContentType.TextHtml: return("text/html"); case MimePartContentType.TextEnriched: return("text/enriched"); case MimePartContentType.Tnef: return("application/ms-tnef"); case MimePartContentType.Calendar: return("text/calendar"); case MimePartContentType.FirstMultipartType: return("multipart/alternative"); case MimePartContentType.MultipartRelated: return("multipart/related"); case MimePartContentType.MultipartMixed: return("multipart/mixed"); case MimePartContentType.MultipartReportDsn: return("multipart/report"); case MimePartContentType.MultipartReportMdn: return("multipart/report"); } return(null); }
internal MimePartInfo(Charset charset, MimePartInfo.Callback writerCallback, MimePartContentType contentType, AttachmentId attachmentId, MimePart skeletonPart, MimeDocument skeleton, ref int partIndex) : this(charset, writerCallback, contentType, attachmentId, skeletonPart, skeleton, null, null, ref partIndex) { }
public MimePartInfo(Charset charset, MimePartInfo.Callback writerCallback, MimePartContentType contentType, ref int partIndex) : this(charset, writerCallback, contentType, null, null, null, ref partIndex) { EnumValidator.ThrowIfInvalid <MimePartContentType>(contentType, "contentType"); }