示例#1
0
 /// <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);
 }
示例#2
0
		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();		
		}
示例#3
0
        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();
        }
示例#4
0
        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);
        }
示例#5
0
 /// <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;
 }
示例#6
0
		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;
		}