Beispiel #1
0
        private static Func <byte[], Encoding, byte[]> GetByteDecoder(string contentTransferEncoding)
        {
            if (string.IsNullOrEmpty(contentTransferEncoding))
            {
                return(null);
            }

            switch (contentTransferEncoding.ToLower())
            {
            case "quoted-printable":
            case "7bit":
            case "8bit":
            case "binary":
                return(null);

            case "base64":
                return(DecodeFromBase64);

            default:
                throw XRoadException.ToetamataKodeering(contentTransferEncoding);
            }
        }