BlogEngine.Core.Web.HttpHandlers.FileHandler.SetContentType C# (CSharp) Метод

SetContentType() приватный статический Метод

Sets the content type depending on the filename's extension.
private static SetContentType ( HttpContext context, string fileName ) : void
context System.Web.HttpContext /// The context. ///
fileName string /// The file Name. ///
Результат void
        private static void SetContentType(HttpContext context, string fileName)
        {
            context.Response.AddHeader(
                "Content-Type", fileName.EndsWith(".pdf") ? "application/pdf" : "application/octet-stream");
        }