// Token: 0x060002FD RID: 765 RVA: 0x000108E8 File Offset: 0x0000EAE8
 public bool TryGetValue(DecodingOptions decodingOptions, out DecodingResults decodingResults, out string value)
 {
     if (decodingOptions.Charset == null)
     {
         decodingOptions.Charset = base.GetDefaultHeaderDecodingCharset(null, null);
     }
     if ((DecodingFlags.Rfc2231 & decodingOptions.DecodingFlags) != DecodingFlags.None)
     {
         if (this.segmentNumber == 0)
         {
             return(this.TryDecodeRfc2231(ref decodingOptions, out decodingResults, out value));
         }
         if (0 < this.segmentNumber)
         {
             throw new NotSupportedException(Strings.CantGetValueOfRfc2231ContinuationSegment);
         }
     }
     if (this.valueFragments.Length == 0)
     {
         decodingResults = default(DecodingResults);
         value           = ((this.decodedValue != null) ? this.decodedValue : string.Empty);
         return(true);
     }
     return(MimeCommon.TryDecodeValue(this.valueFragments, 4026531839U, decodingOptions, out decodingResults, out value));
 }
예제 #2
0
 // Token: 0x0600019D RID: 413 RVA: 0x00007500 File Offset: 0x00005700
 public bool TryGetDisplayName(DecodingOptions decodingOptions, out DecodingResults decodingResults, out string displayName)
 {
     if (this.displayNameFragments.Count == 0)
     {
         displayName     = this.decodedDisplayName;
         decodingResults = default(DecodingResults);
         return(true);
     }
     if (decodingOptions.Charset == null)
     {
         decodingOptions.Charset = base.GetDefaultHeaderDecodingCharset(null, null);
     }
     return(MimeCommon.TryDecodeValue(this.displayNameFragments, 4026531839U, decodingOptions, out decodingResults, out displayName));
 }
예제 #3
0
        // Token: 0x06000551 RID: 1361 RVA: 0x0001D13C File Offset: 0x0001B33C
        internal string GetDecodedValue(DecodingOptions decodingOptions, out DecodingResults decodingResults)
        {
            string result = null;

            if (base.Lines.Length == 0)
            {
                result          = ((this.decodedValue != null) ? this.decodedValue : string.Empty);
                decodingResults = default(DecodingResults);
                return(result);
            }
            if (decodingOptions.Charset == null)
            {
                decodingOptions.Charset = base.GetDefaultHeaderDecodingCharset(null, null);
            }
            if (!MimeCommon.TryDecodeValue(base.Lines, 4026531840U, decodingOptions, out decodingResults, out result))
            {
                result = null;
            }
            return(result);
        }