Ejemplo n.º 1
0
 /// <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);
     }
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
 /// <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;
 }
Ejemplo n.º 4
0
 public static void Enqueue(Target target, MetricGroup metricGroup, ProbeResultingData newData)
 {
     var msg = new ProbeResultsDataMessage(target, metricGroup, newData);
     _dataQueue.Enqueue(msg);
 }
Ejemplo n.º 5
0
 /// <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);
 }
Ejemplo n.º 6
0
 /// <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);
 }
Ejemplo n.º 7
0
 /// <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);
 }
Ejemplo n.º 8
0
 /// <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);
 }
Ejemplo n.º 9
0
 /// <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);
 }
Ejemplo n.º 10
0
 /// <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);
 }