using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace IStation.Bimface { /// /// 转换源 /// public class TranslateSource { public TranslateSource() { this.compressed = false; this.rootName = null; } /// /// 文件Id,即调用上传文件API返回的fileId /// public long fileId { get; set; } /// /// 是否为压缩文件,默认为false /// public bool compressed { get; set; } /// /// 如果是压缩文件,必须指定压缩包中哪一个是主文件。(例如:root.rvt)。 /// 如果不是压缩,则设置为 null /// public string rootName { get; set; } /// /// 获取JSON字典 /// /// public virtual Dictionary GetJsonDict() { var dic = new Dictionary(); dic.Add("fileId", this.fileId); dic.Add("compressed", this.compressed); if (!string.IsNullOrEmpty(this.rootName)) { dic.Add("rootName", this.rootName); } return dic; } } }