CheckBase.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* ==============================================================================
  2. * 功能描述:CheckBase
  3. * 创 建 者:Garrett
  4. * 创建日期:2019/6/11 16:01:26
  5. * ==============================================================================*/
  6. using System;
  7. using System.Collections.Generic;
  8. using Autodesk.Revit.DB;
  9. using Newtonsoft.Json;
  10. namespace ServiceRevitLib.Mode
  11. {
  12. /// <summary>
  13. /// CheckBase
  14. /// </summary>
  15. public class CheckBase:ResultBase
  16. {
  17. public CheckBase()
  18. {
  19. Content=new List<ResultBase>();
  20. }
  21. private string m_Name;
  22. /// <summary>
  23. /// 检查项名称
  24. /// </summary>
  25. public string Name
  26. {
  27. get { return this.GetType().Name; }
  28. }
  29. public List<ResultBase> Content { get; set; }
  30. /// <summary>
  31. /// 关联表的名称
  32. /// </summary>
  33. [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
  34. public string ReferenceSheet { get; set; }
  35. #region Method
  36. protected Document m_Doc { get; set; }
  37. public void SetDoc(Document doc)
  38. {
  39. m_Doc = doc;
  40. }
  41. public virtual void Check()
  42. {
  43. if(m_Doc==null)throw new NullReferenceException();
  44. Console.WriteLine(this.Name + "Checked");
  45. }
  46. #endregion
  47. }
  48. }