Beispiel #1
0
 public void RemoveObject(ApolloObject obj)
 {
     if (obj == null)
     {
         return;
     }
     if (this.dictObjectCollection.ContainsKey(obj.ObjectId))
     {
         this.dictObjectCollection.Remove(obj.ObjectId);
         ApolloObjectManager.removeApolloObject(obj.ObjectId);
     }
 }
Beispiel #2
0
 public void ClearObjects()
 {
     using (Dictionary <ulong, object> .KeyCollection.Enumerator enumerator = this.dictObjectCollection.Keys.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             ulong        current      = enumerator.get_Current();
             ApolloObject apolloObject = this.dictObjectCollection[current];
             ApolloObjectManager.removeApolloObject(apolloObject.ObjectId);
         }
     }
     this.dictObjectCollection.Clear();
 }