Ai
369 Star 3.2K Fork 876

dotNET China/DBCHM

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
DocFactory.cs 999 Bytes
一键复制 编辑 原始数据 按行查看 历史
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DocTools.DBDoc;
using DocTools.Dtos;
namespace DocTools
{
public class DocFactory
{
public static Doc CreateInstance(DocType type, DBDto dto)
{
switch (type)
{
case DocType.chm:
return new ChmDoc(dto);
case DocType.html:
return new HtmlDoc(dto);
case DocType.word:
return new WordDoc(dto);
case DocType.excel:
return new ExcelDoc(dto);
case DocType.pdf:
return new PdfDoc(dto);
case DocType.markdown:
return new MarkDownDoc(dto);
case DocType.xml:
return new XmlDoc(dto);
default:
return new ChmDoc(dto);
}
}
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/dotnetchina/DBCHM.git
git@gitee.com:dotnetchina/DBCHM.git
dotnetchina
DBCHM
DBCHM
master

搜索帮助