Table of Contents

Class SwarmingHelper

Namespace
Skyline.DataMiner.Net.Swarming.Helper
Assembly
SLNetTypes.dll

Helper class for Swarming action in scripts. Create an instance by calling one of the static Create(IConnection) or Create(Func<DMSMessage, DMSMessage[]>) methods. Example usage:

First create a helper. This can be stored somewhere and reused between requests.

var helper = SwarmingHelper.Create(_connection);

Then do the actual swarming actions:

var results = helper
   .SwarmElement(elementId)
   .ToAgent(targetAgentId);

Note: The ToAgent call does the actual swarming request.

public class SwarmingHelper : ISwarmingHelper, ITargetlessSwarmingHelper
Inheritance
SwarmingHelper
Implements
Extension Methods

Remarks

While instances of SwarmingHelper can be re-used, they are not thread-safe.

Methods

Create(IConnection)

Creates a new SwarmingHelper instance.

Create(Func<DMSMessage, DMSMessage[]>)

Creates a new SwarmingHelper instance.

SwarmBooking(Guid)

Prepares the helper to swarm one specific booking. Call ToAgent(int) on the result to do the actual swarming.

SwarmBookings(params Guid[])

Prepares the helper to swarm a series of bookings. Call ToAgent(int) on the result to do the actual swarming.

SwarmElement(ElementID)

Prepares the helper to swarm one specific element. Call ToAgent(int) on the result to do the actual swarming.

SwarmElement(int, int)

Prepares the helper to swarm one specific element. Call ToAgent(int) on the result to do the actual swarming.

SwarmElements(params ElementID[])

Prepares the helper to swarm a series of elements. Call ToAgent(int) on the result to do the actual swarming.

ToAgent(int)

Swarms the objects previously prepared by calling the SwarmElements or SwarmBookings methods to the specified Agent.