/// <summary> /// Adds an element with the specified key and value to this RunVertexDictionary. /// </summary> /// <param name="key"> /// The IRun key of the element to add. /// </param> /// <param name="value"> /// The RunVertex value of the element to add. /// </param> public void Add(IRun key, RunVertex value) { if (key == null) throw new ArgumentNullException("key"); if (value == null) throw new ArgumentNullException("value"); this.Dictionary.Add(key, value); }
public RunTree(TestFixturePatternAttribute fixturePattern) { if (fixturePattern==null) throw new ArgumentNullException("fixturePattern"); this.fixturePattern = fixturePattern; this.graph = new AdjacencyGraph( new RunVertex.Provider(), new EdgeProvider(), false); this.root = (RunVertex)this.graph.AddVertex(); }
public RunTree(TestFixturePatternAttribute fixturePattern) { if (fixturePattern == null) { throw new ArgumentNullException("fixturePattern"); } this.fixturePattern = fixturePattern; this.graph = new AdjacencyGraph( new RunVertex.Provider(), new EdgeProvider(), false); this.root = (RunVertex)this.graph.AddVertex(); }
public RunVertex Add(RunVertex parent, IRun run) { if (parent == null) { throw new ArgumentNullException("parent"); } if (run == null) { throw new ArgumentNullException("run"); } RunVertex v = this.runVertices[run]; if (v == null) { v = (RunVertex)this.graph.AddVertex(); v.Run = run; this.runVertices.Add(run, v); } this.graph.AddEdge(parent, v); return(v); }
/// <summary> /// Determines whether this RunVertexDictionary contains a specific value. /// </summary> /// <param name="value"> /// The RunVertex value to locate in this RunVertexDictionary. /// </param> /// <returns> /// true if this RunVertexDictionary contains an element with the specified value; /// otherwise, false. /// </returns> public bool ContainsValue(RunVertex value) { foreach (RunVertex item in this.Dictionary.Values) { if (item == value) return true; } return false; }
public RunVertex Add(RunVertex parent, IRun run) { if (parent==null) throw new ArgumentNullException("parent"); if (run==null) throw new ArgumentNullException("run"); RunVertex v = this.runVertices[run]; if (v==null) { v = (RunVertex)this.graph.AddVertex(); v.Run = run; this.runVertices.Add(run,v); } this.graph.AddEdge(parent, v); return v; }