internal static string GetHeaderValue(Header header, InboundConversionOptions options) { int lengthLimit = (options != null) ? options.Limits.MaxMimeTextHeaderLength : 2000; return(MimeHelpers.GetHeaderValue(header, lengthLimit)); }
internal static string GetHeaderParameter(ComplexHeader header, string parameterName, InboundConversionOptions options) { return(MimeHelpers.GetHeaderParameter(header, parameterName, options.Limits.MaxMimeTextHeaderLength)); }
internal static string GetHeaderValue(HeaderList headers, HeaderId headerId, InboundConversionOptions options) { return(MimeHelpers.GetHeaderValue(headers.FindFirst(headerId), options)); }
public static Charset ChooseCharset(string partCharset, string messageCharset, InboundConversionOptions conversionOptions) { Charset charset = MimeHelpers.GetValidAndTrustedCharset(partCharset, conversionOptions); if (charset != null) { return(charset); } charset = MimeHelpers.GetValidAndTrustedCharset(messageCharset, conversionOptions); if (charset != null) { return(charset); } charset = conversionOptions.DefaultCharset; if (charset != null && charset.IsAvailable) { return(charset); } return(Culture.Default.MimeCharset); }
public ICalInboundContext(Charset charset, IList <LocalizedString> errorStream, InboundAddressCache addressCache, InboundConversionOptions options, CalendarReader reader, uint?maxBodyLength, bool hasExceptionPromotion) : base(charset, errorStream, addressCache) { Util.ThrowOnNullArgument(options, "options"); if (!options.IgnoreImceaDomain) { Util.ThrowOnNullOrEmptyArgument(options.ImceaEncapsulationDomain, "options.ImceaEncapsulationDomain"); } Util.ThrowOnNullArgument(reader, "reader"); this.Options = options; this.Reader = reader; this.MaxBodyLength = maxBodyLength; this.HasExceptionPromotion = hasExceptionPromotion; this.DeclaredTimeZones = new Dictionary <string, ExTimeZone>(StringComparer.OrdinalIgnoreCase); }
protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime) { }
protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime) { base.CopyAttachments(callbacks, this.originalItem.AttachmentCollection, this.newItem.AttachmentCollection, false, this.parameters.TargetFormat == BodyFormat.TextPlain, optionsForSmime); }