internal cMessageBodyPart(cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, cEnvelope pEnvelope, cBodyPart pBody, cBodyPart pBodyStructure, uint pSizeInLines, cSinglePartExtensionData pExtensionData) : base(kMimeType.Message, kMimeSubType.RFC822, pSection, pParameters, pContentId, pDescription, pContentTransferEncoding, pSizeInBytes, pExtensionData) { Envelope = pEnvelope; mBody = pBody; BodyStructure = pBodyStructure; SizeInLines = pSizeInLines; }
internal cSinglePartBody(string pType, string pSubType, cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, cSinglePartExtensionData pExtensionData) : base(pType, pSubType, pSection) { Parameters = pParameters; ContentId = pContentId; Description = pDescription; ContentTransferEncoding = pContentTransferEncoding ?? throw new ArgumentNullException(nameof(pContentTransferEncoding)); if (ContentTransferEncoding.Equals("7BIT", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("8BIT", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("BINARY", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.none; } else if (ContentTransferEncoding.Equals("QUOTED-PRINTABLE", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.quotedprintable; } else if (ContentTransferEncoding.Equals("BASE64", StringComparison.InvariantCultureIgnoreCase)) { DecodingRequired = eDecodingRequired.base64; } else { DecodingRequired = eDecodingRequired.other; // note that rfc 2045 section 6.4 specifies that if 'unknown' then the part has to be treated as application/octet-stream } SizeInBytes = pSizeInBytes; ExtensionData = pExtensionData; }
internal cTextBodyPart(string pSubType, cSection pSection, cBodyStructureParameters pParameters, string pContentId, cCulturedString pDescription, string pContentTransferEncoding, uint pSizeInBytes, uint pSizeInLines, cSinglePartExtensionData pExtensionData) : base(kMimeType.Text, pSubType, pSection, pParameters, pContentId, pDescription, pContentTransferEncoding, pSizeInBytes, pExtensionData) { if (SubType.Equals("PLAIN", StringComparison.InvariantCultureIgnoreCase)) { SubTypeCode = eTextBodyPartSubTypeCode.plain; } else if (SubType.Equals("HTML", StringComparison.InvariantCultureIgnoreCase)) { SubTypeCode = eTextBodyPartSubTypeCode.html; } else { SubTypeCode = eTextBodyPartSubTypeCode.other; } SizeInLines = pSizeInLines; }
internal cBodyPartDisposition(string pType, cBodyStructureParameters pParameters) { Type = pType ?? throw new ArgumentNullException(nameof(pType)); Parameters = pParameters; if (Type.Equals("INLINE", StringComparison.InvariantCultureIgnoreCase)) { TypeCode = eDispositionTypeCode.inline; } else if (Type.Equals("ATTACHMENT", StringComparison.InvariantCultureIgnoreCase)) { TypeCode = eDispositionTypeCode.attachment; } else { TypeCode = eDispositionTypeCode.other; } }
internal cMultiPartExtensionData(cBodyStructureParameters pParameters, cBodyPartDisposition pDisposition, cStrings pLanguages, string pLocation, cBodyPartExtensionValues pExtensionValues) : base(pDisposition, pLanguages, pLocation, pExtensionValues) { Parameters = pParameters; }