public PerfTest() { this.name = null; this.runs = new PerfTestRunCollection(); this.ignored = false; this.ignoredMessage = null; }
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; }
/// <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); }
/// <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); } }
public Enumerator(PerfTestRunCollection collection) { this.wrapped = ((System.Collections.CollectionBase)collection).GetEnumerator(); }