Beispiel #1
0
 public virtual Continent AddNode(Continent c)
 {
     if (!continents.ContainsKey(c.Name))
     {
         continents.Add(c);
         return c;
     }
     else
         throw new ArgumentException("There already exists a node in the graph with name " + c.Name);
 }
 /// <summary>
 /// Removes a Continent from the NodeList.
 /// </summary>
 public virtual void Remove(Continent c)
 {
     data.Remove(c.Name);
 }
Beispiel #3
0
 public virtual bool Contains(Continent c)
 {
     return ContainsContinent(c.Name);
 }
 /// <summary>
 /// Adds a new Continent to the NodeList.
 /// </summary>
 public virtual void Add(Continent c)
 {
     data.Add(c.Name, c);
 }