コード例 #1
0
 /// <summary>
 /// Adds the elements of an array to the end of this PerfTesterCollection.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the end of this PerfTesterCollection.
 /// </param>
 public virtual void AddRange(PerfTester[] items)
 {
     foreach (PerfTester item in items)
     {
         this.List.Add(item);
     }
 }
コード例 #2
0
ファイル: TextWriterTracer.cs プロジェクト: sidlovskyy/NPerf
        public void Attach(PerfTester tester)
        {
            if (tester==null)
                throw new ArgumentNullException("tester");

            tester.StartTest += new PerfTestEventHandler(this.StartTest);
            tester.FinishTest += new PerfTestEventHandler(this.FinishTest);
            tester.IgnoredTest += new PerfTestEventHandler(this.IgnoredTest);
            tester.StartRun += new PerfTestRunEventHandler(this.StartRun);
            tester.FinishRun += new PerfTestRunEventHandler(this.FinishRun);
        }
コード例 #3
0
 /// <summary>
 /// Adds an instance of type PerfTester to the end of this PerfTesterCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTester to be added to the end of this PerfTesterCollection.
 /// </param>
 public virtual void Add(PerfTester value)
 {
     this.List.Add(value);
 }
コード例 #4
0
 /// <summary>
 /// Initializes a new instance of the PerfTesterCollection class, containing elements
 /// copied from an array.
 /// </summary>
 /// <param name="items">
 /// The array whose elements are to be added to the new PerfTesterCollection.
 /// </param>
 public PerfTesterCollection(PerfTester[] items)
 {
     this.AddRange(items);
 }
コード例 #5
0
 /// <summary>
 /// Removes the first occurrence of a specific PerfTester from this PerfTesterCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTester value to remove from this PerfTesterCollection.
 /// </param>
 public virtual void Remove(PerfTester value)
 {
     this.List.Remove(value);
 }
コード例 #6
0
 /// <summary>
 /// Inserts an element into the PerfTesterCollection at the specified index
 /// </summary>
 /// <param name="index">
 /// The index at which the PerfTester is to be inserted.
 /// </param>
 /// <param name="value">
 /// The PerfTester to insert.
 /// </param>
 public virtual void Insert(int index, PerfTester value)
 {
     this.List.Insert(index, value);
 }
コード例 #7
0
 /// <summary>
 /// Return the zero-based index of the first occurrence of a specific value
 /// in this PerfTesterCollection
 /// </summary>
 /// <param name="value">
 /// The PerfTester value to locate in the PerfTesterCollection.
 /// </param>
 /// <returns>
 /// The zero-based index of the first occurrence of the _ELEMENT value if found;
 /// -1 otherwise.
 /// </returns>
 public virtual int IndexOf(PerfTester value)
 {
     return this.List.IndexOf(value);
 }
コード例 #8
0
 /// <summary>
 /// Determines whether a specfic PerfTester value is in this PerfTesterCollection.
 /// </summary>
 /// <param name="value">
 /// The PerfTester value to locate in this PerfTesterCollection.
 /// </param>
 /// <returns>
 /// true if value is found in this PerfTesterCollection;
 /// false otherwise.
 /// </returns>
 public virtual bool Contains(PerfTester value)
 {
     return this.List.Contains(value);
 }