MimeKit.Header.EncodeContentType C# (CSharp) Method

EncodeContentType() static private method

static private EncodeContentType ( ParserOptions options, MimeKit.FormatOptions format, Portable.Text.Encoding charset, string field, string value ) : byte[]
options ParserOptions
format MimeKit.FormatOptions
charset Portable.Text.Encoding
field string
value string
return byte[]
		static byte[] EncodeContentType (ParserOptions options, FormatOptions format, Encoding charset, string field, string value)
		{
			var contentType = ContentType.Parse (options, value);
			var encoded = contentType.Encode (format, charset);

			return Encoding.UTF8.GetBytes (encoded);
		}