Example #1
0
 private ParseState StateFromToken(MimeString token)
 {
     var crcI = token.ComputeCrcI();
     if (crcI <= 2556329580U) {
         if ((int) crcI == 271896810)
             return ParseState.OptInfo;
         if ((int) crcI == 2115158205 || (int) crcI == -1738637716)
             return ParseState.Domain;
     } else if ((int) crcI == -1177273070 || (int) crcI == -554265150 || (int) crcI == -18844241)
         return ParseState.OptInfo;
     return ParseState.None;
 }
Example #2
0
 private void FinishClause(ref MimeString param, ref MimeStringList value, bool allowUTF8)
 {
     if (param.Length == 0)
         return;
     var sz = value.GetSz();
     var str = sz == null ? null : Internal.ByteString.BytesToString(sz, allowUTF8);
     var crcI = param.ComputeCrcI();
     if (crcI <= 2556329580U) {
         if ((int) crcI != 271896810) {
             if ((int) crcI != 2115158205) {
                 if ((int) crcI == -1738637716)
                     fromValue = str;
             } else
                 byValue = str;
         } else
             forValue = str;
     } else if ((int) crcI != -1177273070) {
         if ((int) crcI != -554265150) {
             if ((int) crcI == -18844241)
                 idValue = str;
         } else
             viaValue = str;
     } else
         withValue = str;
     value.Reset();
     param = MimeString.Empty;
 }