/// <summary> /// Adds the elements of an array to the end of this TargetCollection. /// </summary> /// <param name="items"> /// The array whose elements are to be added to the end of this TargetCollection. /// </param> public virtual void AddRange(Target[]items) { foreach (Target item in items) { this.List.Add(item); } }
/// <summary> /// Creates a new instance of <see cref="AsyncTargetWrapper"/> /// which wraps the specified target. /// </summary> /// <param name="wrappedTarget">The target to be wrapped.</param> /// <param name="queueLimit">Maximum number of requests in the queue.</param> /// <param name="overflowAction">The action to be taken when the queue overflows.</param> public AsyncTargetWrapper(Target wrappedTarget, int queueLimit, AsyncTargetWrapperOverflowAction overflowAction) { WrappedTarget = wrappedTarget; QueueLimit = queueLimit; OverflowAction = overflowAction; }
/// <summary> /// Creates a new instance of <see cref="AsyncTargetWrapper"/> /// which wraps the specified target. /// </summary> /// <param name="wrappedTarget">The target to be wrapped.</param> public AsyncTargetWrapper(Target wrappedTarget) { WrappedTarget = wrappedTarget; }
public static void Enqueue(Target target, MetricGroup metricGroup, ProbeResultingData newData) { var msg = new ProbeResultsDataMessage(target, metricGroup, newData); _dataQueue.Enqueue(msg); }
/// <summary> /// Initializes a new instance of the TargetCollection class, containing elements /// copied from an array. /// </summary> /// <param name="items"> /// The array whose elements are to be added to the new TargetCollection. /// </param> public TargetCollection(Target[]items) { this.AddRange(items); }
/// <summary> /// Removes the first occurrence of a specific Target from this TargetCollection. /// </summary> /// <param name="value"> /// The Target value to remove from this TargetCollection. /// </param> public virtual void Remove(Target value) { this.List.Remove(value); }
/// <summary> /// Inserts an element into the TargetCollection at the specified index /// </summary> /// <param name="index"> /// The index at which the Target is to be inserted. /// </param> /// <param name="value"> /// The Target to insert. /// </param> public virtual void Insert(int index, Target value) { this.List.Insert(index, value); }
/// <summary> /// Return the zero-based index of the first occurrence of a specific value /// in this TargetCollection /// </summary> /// <param name="value"> /// The Target value to locate in the TargetCollection. /// </param> /// <returns> /// The zero-based index of the first occurrence of the _ELEMENT value if found; /// -1 otherwise. /// </returns> public virtual int IndexOf(Target value) { return this.List.IndexOf(value); }
/// <summary> /// Determines whether a specfic Target value is in this TargetCollection. /// </summary> /// <param name="value"> /// The Target value to locate in this TargetCollection. /// </param> /// <returns> /// true if value is found in this TargetCollection; /// false otherwise. /// </returns> public virtual bool Contains(Target value) { return this.List.Contains(value); }
/// <summary> /// Adds an instance of type Target to the end of this TargetCollection. /// </summary> /// <param name="value"> /// The Target to be added to the end of this TargetCollection. /// </param> public virtual void Add(Target value) { this.List.Add(value); }