Show / Hide Table of Contents

    Class Trigger

    Represents a condition under which a scripted probe is run.

    Inheritance
    System.Object
    Trigger
    Namespace: Sensus.Probes.User.Scripts
    Assembly: SensusAndroid.dll
    Syntax
    public class Trigger : Object

    Constructors

    Trigger(Probe, PropertyInfo, TriggerValueCondition, Object, Boolean, Boolean, Boolean, TimeSpan, TimeSpan)

    Declaration
    public Trigger(Probe probe, PropertyInfo datumProperty, TriggerValueCondition condition, object conditionValue, bool change, bool fireRepeatedly, bool useRegularExpressions, TimeSpan startTime, TimeSpan endTime)
    Parameters
    Type Name Description
    Probe probe
    System.Reflection.PropertyInfo datumProperty
    TriggerValueCondition condition
    System.Object conditionValue
    System.Boolean change
    System.Boolean fireRepeatedly
    System.Boolean useRegularExpressions
    System.TimeSpan startTime
    System.TimeSpan endTime

    Properties

    Change

    Declaration
    public bool Change { get; set; }
    Property Value
    Type Description
    System.Boolean

    Condition

    Declaration
    public TriggerValueCondition Condition { get; set; }
    Property Value
    Type Description
    TriggerValueCondition

    ConditionValue

    Declaration
    public object ConditionValue { get; set; }
    Property Value
    Type Description
    System.Object

    ConditionValueEnumType

    This is a workaround for an odd behavior of JSON.NET, which serializes enumerations as integers. We happen to be deserializing them as objects into ConditionValue, which means they are stored as integers after deserialization. Integers are not comparable with the enumerated values that come off the probes, so we need to jump through some hoops during deserization (i.e., below and above). Below, gettings and setting the value works off of the enumerated type that should be used for the ConditionValue above. When either the below or above are set, they check for the existence of the other and convert the number returned by JSON.NET to its appropriate enumerated type.

    Declaration
    public string ConditionValueEnumType { get; set; }
    Property Value
    Type Description
    System.String

    DatumProperty

    Declaration
    public PropertyInfo DatumProperty { get; }
    Property Value
    Type Description
    System.Reflection.PropertyInfo

    DatumPropertyName

    Declaration
    public string DatumPropertyName { get; set; }
    Property Value
    Type Description
    System.String

    EndTime

    Declaration
    public TimeSpan EndTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    FireRepeatedly

    Declaration
    public bool FireRepeatedly { get; set; }
    Property Value
    Type Description
    System.Boolean

    FireValueConditionMetOnPreviousCall

    Declaration
    public bool FireValueConditionMetOnPreviousCall { get; set; }
    Property Value
    Type Description
    System.Boolean

    Probe

    Declaration
    public Probe Probe { get; set; }
    Property Value
    Type Description
    Probe

    RegularExpressionText

    Declaration
    public string RegularExpressionText { get; set; }
    Property Value
    Type Description
    System.String

    StartTime

    Declaration
    public TimeSpan StartTime { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    Methods

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean

    FireFor(Object)

    Declaration
    public bool FireFor(object value)
    Parameters
    Type Name Description
    System.Object value
    Returns
    Type Description
    System.Boolean

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32

    Reset()

    Declaration
    public void Reset()

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX