Exemplo n.º 1
0
 internal void Update(kcsapi_kdock[] source)
 {
     if (this.Docks.Count == source.Length)
     {
         foreach (var raw in source) this.Docks[raw.api_id]?.Update(raw);
     }
     else
     {
         foreach (var dock in this.Docks) dock.Value.SafeDispose();
         this.Docks = new MemberTable<BuildingDock>(source.Select(x => new BuildingDock(x)));
     }
 }
Exemplo n.º 2
0
 private void Update(kcsapi_kdock[] source)
 {
     if (this.Docks.Count == source.Length)
     {
         foreach (var raw in source)
         {
             var target = this.Docks[raw.api_id];
             if (target != null) target.Update(raw);
         }
     }
     else
     {
         this.Docks = new MemberTable<BuildingDock>(source.Select(x => new BuildingDock(x)));
     }
 }