Class ExampleRandomScriptProbeAgent
Example random script probe agent. Will not defer delivery of surveys not selected for delivery.
Inheritance
Implements
Namespace: ExampleScriptProbeAgent
Assembly: ExampleScriptProbeAgent.dll
Syntax
public class ExampleRandomScriptProbeAgent : Object, IScriptProbeAgent
Constructors
ExampleRandomScriptProbeAgent()
Declaration
public ExampleRandomScriptProbeAgent()
Properties
DeliveryInterval
The delivery interval.
Declaration
public Nullable<TimeSpan> DeliveryInterval { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.TimeSpan> |
DeliveryIntervalToleranceAfter
Tolerance after.
Declaration
public Nullable<TimeSpan> DeliveryIntervalToleranceAfter { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.TimeSpan> |
DeliveryIntervalToleranceBefore
Tolerance before.
Declaration
public Nullable<TimeSpan> DeliveryIntervalToleranceBefore { get; }
Property Value
Type | Description |
---|---|
System.Nullable<System.TimeSpan> |
Description
Gets the description.
Declaration
public string Description { get; }
Property Value
Type | Description |
---|---|
System.String | The description. |
Id
Gets the identifier.
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String | The identifier. |
Methods
DeliverSurveyNowAsync(IScript)
Checks whether or not to deliver/defer a survey.
Declaration
public Task<Tuple<bool, Nullable<DateTimeOffset>>> DeliverSurveyNowAsync(IScript script)
Parameters
Type | Name | Description |
---|---|---|
IScript | script | Script. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Tuple<System.Boolean, System.Nullable<System.DateTimeOffset>>> | Deliver/defer decision. |
InitializeAsync(ISensusServiceHelper, IProtocol)
Initializes this IScriptProbeAgent. This is called when the IProtocol associated with this IScriptProbeAgent is started.
Declaration
public Task InitializeAsync(ISensusServiceHelper sensusServiceHelper, IProtocol protocol)
Parameters
Type | Name | Description |
---|---|---|
ISensusServiceHelper | sensusServiceHelper | A reference to the Sensus helper. |
IProtocol | protocol | A reference to the IProtocol associated with this IScriptProbeAgent. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ObserveAsync(IDatum)
Observe the specified datum.
Declaration
public Task ObserveAsync(IDatum datum)
Parameters
Type | Name | Description |
---|---|---|
IDatum | datum | Datum. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ObserveAsync(IScript, ScriptState)
Observe the specified script and state.
Declaration
public Task ObserveAsync(IScript script, ScriptState state)
Parameters
Type | Name | Description |
---|---|---|
IScript | script | Script. |
ScriptState | state | State. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
SetPolicyAsync(JObject)
Sets the policy.
Declaration
public Task SetPolicyAsync(JObject policy)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Linq.JObject | policy | Policy. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
ToString()
Returns a System.String that represents the current ExampleRandomScriptProbeAgent.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents the current ExampleRandomScriptProbeAgent. |