コード例 #1
0
ファイル: PerfTest.cs プロジェクト: sidlovskyy/NPerf
 public PerfTest()
 {
     this.name = null;
     this.runs = new PerfTestRunCollection();
     this.ignored = false;
     this.ignoredMessage = null;
 }
コード例 #2
0
ファイル: PerfTest.cs プロジェクト: sidlovskyy/NPerf
        public PerfTest(MethodInfo mi)
        {
            if (mi==null)
                throw new ArgumentNullException("mi");

            this.name = mi.Name;
            this.runs = new PerfTestRunCollection();

            this.ignored = TypeHelper.HasCustomAttribute(mi, typeof(PerfIgnoreAttribute));
            if (this.ignored)
            {
                PerfIgnoreAttribute attr = (PerfIgnoreAttribute)
                    TypeHelper.GetFirstCustomAttribute(mi,typeof(PerfIgnoreAttribute));
                this.ignoredMessage=attr.Message;
            }
            else
                this.ignoredMessage = null;
        }
コード例 #3
0
 /// <summary>
 /// Initializes a new instance of the PerfTestRunCollection class, containing elements
 /// copied from another instance of PerfTestRunCollection
 /// </summary>
 /// <param name="items">
 /// The PerfTestRunCollection whose elements are to be added to the new PerfTestRunCollection.
 /// </param>
 public PerfTestRunCollection(PerfTestRunCollection items)
 {
     this.AddRange(items);
 }
コード例 #4
0
 /// <summary>
 /// Adds the elements of another PerfTestRunCollection to the end of this PerfTestRunCollection.
 /// </summary>
 /// <param name="items">
 /// The PerfTestRunCollection whose elements are to be added to the end of this PerfTestRunCollection.
 /// </param>
 public virtual void AddRange(PerfTestRunCollection items)
 {
     foreach (PerfTestRun item in items)
     {
         this.List.Add(item);
     }
 }
コード例 #5
0
 public Enumerator(PerfTestRunCollection collection)
 {
     this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator();
 }