private getFormat ( string fileName ) : System.Text.Format | ||
fileName | string | |
return | System.Text.Format |
private Format getFormat(string fileName)
{
if (fileName.ToLower().EndsWith(".htm") || fileName.ToLower().EndsWith(".html"))
{
return Format.HTML;
}
if (fileName.ToLower().EndsWith(".xml") || fileName.ToLower().EndsWith(".xhtml") || fileName.ToLower().EndsWith(".ditamap") || fileName.ToLower().EndsWith(".dita"))
{
return Format.XML;
}
if (fileName.ToLower().EndsWith(".md") || fileName.ToLower().EndsWith(".markdown"))
{
return Format.Markdown;
}
return Format.Text;
}