lixiaojun
2023-03-20 14801a2e40bc79833c41151a37fe4cb0acbc5c7f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace IStation.Bimface
{
    /// <summary>
    /// 转换源
    /// </summary>
    public class TranslateSource
    {
        public TranslateSource()
        {
            this.compressed = false;
            this.rootName = null;
        }
 
        /// <summary>
        ///  文件Id,即调用上传文件API返回的fileId
        /// </summary>
        public long fileId { get; set; }
 
        /// <summary>
        ///  是否为压缩文件,默认为false
        /// </summary>
        public bool compressed { get; set; }
 
        /// <summary>
        ///  如果是压缩文件,必须指定压缩包中哪一个是主文件。(例如:root.rvt)。
        /// 如果不是压缩,则设置为 null
        /// </summary>
        public string rootName { get; set; }
 
        /// <summary>
        /// 获取JSON字典
        /// </summary>
        /// <returns></returns>
        public virtual Dictionary<string, object> GetJsonDict()
        {
            var dic = new Dictionary<string, object>();
            dic.Add("fileId", this.fileId);
            dic.Add("compressed", this.compressed);
            if (!string.IsNullOrEmpty(this.rootName))
            {
                dic.Add("rootName", this.rootName);
            }
            return dic;
        }
 
 
 
    }
}