示例#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);
 }
示例#2
0
 /// <summary>
 /// Removes a Continent from the NodeList.
 /// </summary>
 public virtual void Remove(Continent c)
 {
     data.Remove(c.Name);
 }
示例#3
0
 public virtual bool Contains(Continent c)
 {
     return ContainsContinent(c.Name);
 }
示例#4
0
 /// <summary>
 /// Adds a new Continent to the NodeList.
 /// </summary>
 public virtual void Add(Continent c)
 {
     data.Add(c.Name, c);
 }