Exemple #1
0
        /// <summary>
        /// 调用这个方法以刷新闭合站和闭合差
        /// </summary>
        protected void RefreshClosed()
        {
            #region 用于枚举闭合环的本地函数
            SettlementPointBase[] Closed()
            {
                var list    = new LinkedList <SettlementPointBase>();
                var isFixed = this is SettlementPointFixed;

                foreach (var item in this.To <INode>().AncestorsAll.OfType <SettlementPointBase>())
                {
                    list.AddLast(item);
                    if (item.Name == Name || (isFixed && item is SettlementPointFixed))        //检查是否为闭合或附合
                    {
                        return(list.ToArray());
                    }
                }
                return(CreateCollection.Empty(list));
            }

            #endregion
            var closed = Closed();
            if (closed.Any())
            {
                var closedPoint = closed[^ 1];
 /// <inheritdoc cref="SettlementPointFixed(string, IUnit{IUTLength}?, IUnit{IUTLength}, INode?)"/>
 /// <param name="Known">索引本次沉降观测中,高程已知的点的名称和高程,
 /// 如果为<see langword="null"/>,则代表除基准点外没有已知点</param>
 public SettlementPointRoot(string Name, IUnit <IUTLength> High, IEnumerable <KeyValuePair <string, IUnit <IUTLength> > >?Known)
     : base(Name, null, High, null)
 {
     this.Known = (Known ?? CreateCollection.Empty(Known)).ToDictionary(false);
 }