Пример #1
0
 public void RemoveGate(string id)
 {
     Gates?.RemoveAll(_ => _.ID == id);
     Bridges?.RemoveAll(_ => _.ID == id);
 }
Пример #2
0
 public void RemoveBridge(string id, string regId)
 {
     Bridges?.Where(b => b.ID == id).ToList().ForEach(_ => _.Links?.RemoveAll(r => r == regId));
     Bridges?.RemoveAll(_ => _.Links == null || _.Links.Count == 0);//删除空的关联列表
 }
Пример #3
0
 public void RemoveRegion(string id)
 {
     Regions?.RemoveAll(_ => _.ID == id);
     Bridges?.ForEach(_ => _.Links?.RemoveAll(r => r == id));
     Bridges?.RemoveAll(_ => _.Links == null || _.Links.Count == 0);
 }