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;
|
}
|
|
}
|
}
|