static string GetContentType(WebResponseContentType contentType) { //TODO: review here again switch (contentType) { case WebResponseContentType.ImageJpeg: return("image/jpeg"); case WebResponseContentType.ImagePng: return("image/png"); case WebResponseContentType.ApplicationOctetStream: return("application/octet-stream"); case WebResponseContentType.ApplicationJson: return("application/json"); case WebResponseContentType.TextXml: return("text/xml"); case WebResponseContentType.TextHtml: return("text/html"); case WebResponseContentType.TextJavascript: return("text/javascript"); case WebResponseContentType.TextPlain: return("text/plain"); default: throw new NotSupportedException(); } }
static string GetContentType(WebResponseContentType contentType) { //TODO: review here again switch (contentType) { case WebResponseContentType.ImageJpeg: return "image/jpeg"; case WebResponseContentType.ImagePng: return "image/png"; case WebResponseContentType.ApplicationOctetStream: return "application/octet-stream"; case WebResponseContentType.ApplicationJson: return "application/json"; case WebResponseContentType.TextXml: return "text/xml"; case WebResponseContentType.TextHtml: return "text/html"; case WebResponseContentType.TextJavascript: return "text/javascript"; case WebResponseContentType.TextCss: return "text/css"; case WebResponseContentType.TextPlain: return "text/plain"; default: throw new NotSupportedException(); } }