示例#1
0
        internal static string GetHeaderValue(Header header, InboundConversionOptions options)
        {
            int lengthLimit = (options != null) ? options.Limits.MaxMimeTextHeaderLength : 2000;

            return(MimeHelpers.GetHeaderValue(header, lengthLimit));
        }
示例#2
0
 internal static string GetHeaderParameter(ComplexHeader header, string parameterName, InboundConversionOptions options)
 {
     return(MimeHelpers.GetHeaderParameter(header, parameterName, options.Limits.MaxMimeTextHeaderLength));
 }
示例#3
0
 internal static string GetHeaderValue(HeaderList headers, HeaderId headerId, InboundConversionOptions options)
 {
     return(MimeHelpers.GetHeaderValue(headers.FindFirst(headerId), options));
 }
示例#4
0
        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);
        }
示例#5
0
 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);
 }
示例#6
0
 protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime)
 {
 }
示例#7
0
 protected override void BuildAttachments(BodyConversionCallbacks callbacks, InboundConversionOptions optionsForSmime)
 {
     base.CopyAttachments(callbacks, this.originalItem.AttachmentCollection, this.newItem.AttachmentCollection, false, this.parameters.TargetFormat == BodyFormat.TextPlain, optionsForSmime);
 }