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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace IStation.Bimface
{
    /// <summary>
    ///  发起文件转化的请求数据
    /// </summary>
    public class FileTranslateRequest
    {
        public FileTranslateRequest()
        {
            this.priority = 2;
            this.callback = null;
        }
 
        public TranslateSource source { get; set; }
 
        /// <summary>
        /// 优先级,数字越大,优先级越低。只能是1, 2, 3。默认为2
        /// </summary>
        public int priority { get; set; }
 
        /// <summary>
        ///  Callback地址,待转换完毕以后,BIMFace会回调该地址
        /// </summary>
        public string callback { get; set; }
 
        /// <summary>
        /// 获取JSON字典
        /// </summary>
        /// <returns></returns>
        public virtual Dictionary<string, object> GetJsonDict()
        {
            var dic = new Dictionary<string, object>();
            dic.Add("source", this.source == null ? null : this.source.GetJsonDict());
            dic.Add("priority", this.priority);
            dic.Add("callback", this.callback);
            return dic;
        }
 
    }
}