// Token: 0x06000552 RID: 1362 RVA: 0x0001D1AB File Offset: 0x0001B3AB
 internal MimeStringList GetEncodedValue(EncodingOptions encodingOptions, ValueEncodingStyle encodingStyle)
 {
     if (string.IsNullOrEmpty(this.decodedValue))
     {
         return(base.Lines);
     }
     return(MimeCommon.EncodeValue(this.decodedValue, encodingOptions, encodingStyle));
 }
        // Token: 0x06000308 RID: 776 RVA: 0x00010F8C File Offset: 0x0000F18C
        private MimeStringList EncodeValue(string value, EncodingOptions encodingOptions)
        {
            this.valueFragments.Reset();
            int count = this.valueFragments.Count;

            if ((byte)(EncodingFlags.EnableRfc2231 & encodingOptions.EncodingFlags) != 0)
            {
                this.EncodeRfc2231(encodingOptions);
                return(this.valueFragments);
            }
            return(MimeCommon.EncodeValue(value, encodingOptions, ValueEncodingStyle.Normal));
        }
示例#3
0
        // Token: 0x060001A3 RID: 419 RVA: 0x00007708 File Offset: 0x00005908
        internal MimeStringList GetDisplayNameToWrite(EncodingOptions encodingOptions)
        {
            MimeStringList result = this.displayNameFragments;

            if (result.GetLength(4026531839U) == 0 && this.decodedDisplayName != null && this.decodedDisplayName.Length != 0)
            {
                string value;
                if ((byte)(encodingOptions.EncodingFlags & EncodingFlags.QuoteDisplayNameBeforeRfc2047Encoding) != 0 && this.IsQuotingRequired(this.decodedDisplayName, encodingOptions.AllowUTF8) && MimeCommon.IsEncodingRequired(this.decodedDisplayName, encodingOptions.AllowUTF8))
                {
                    value = this.QuoteString(this.decodedDisplayName);
                }
                else
                {
                    value = this.decodedDisplayName;
                }
                result = MimeCommon.EncodeValue(value, encodingOptions, ValueEncodingStyle.Phrase);
                this.displayNameFragments = result;
            }
            else if ((byte)(EncodingFlags.ForceReencode & encodingOptions.EncodingFlags) != 0)
            {
                result = MimeCommon.EncodeValue(this.DisplayName, encodingOptions, ValueEncodingStyle.Phrase);
            }
            return(result);
        }