private static Org.Apache.Http.Entity.ContentType Create(HeaderElement helem) { string mimeType = helem.GetName(); NameValuePair[] @params = helem.GetParameters(); return(new Org.Apache.Http.Entity.ContentType(mimeType, @params != null && @params .Length > 0 ? @params : null)); }