Edit

Share via


ActivityTrackingCondition.Value Property

Definition

The value that is to be compared with Member.

public:
 virtual property System::String ^ Value { System::String ^ get(); void set(System::String ^ value); };
public override string Value { get; set; }
member this.Value : string with get, set
Public Overrides Property Value As String

Property Value

The value used in the comparison.

Examples

The following code sample demonstrates accessing the Value property. This example is from the Tracking Profile Designer SDK sample. For more information, see Tracking Profile Designer Sample.

/// <summary>
/// Saves a tracking condition for an activity
/// </summary>
/// <param name="activity"></param>
/// <param name="key"></param>
/// <param name="member"></param>
/// <param name="op"></param>
/// <param name="value"></param>
internal void SaveTrackingCondition(Activity activity, ref ActivityTrackingCondition key, string member, ComparisonOperator op, string value)
{
    ActivityTrackPoint trackPoint = GetTrackPointForActivity(activity);
    if (trackPoint != null)
    {
        if (key == null)
        {
            key = new ActivityTrackingCondition();
            trackPoint.MatchingLocations[0].Conditions.Add(key);
        }
        key.Member = member;
        key.Value = value;
        key.Operator = op;
    }
}
' Saves a tracking condition for an activity
' <param name="activity"></param>
' <param name="key"></param>
' <param name="member"></param>
' <param name="op"></param>
' <param name="value"></param>
Friend Sub SaveTrackingCondition(ByVal activity As Activity, ByRef key As ActivityTrackingCondition, ByVal member As String, ByVal op As ComparisonOperator, ByVal value As String)
    Dim trackPoint As ActivityTrackPoint = GetTrackPointForActivity(activity)
    If trackPoint IsNot Nothing Then
        If (key Is Nothing) Then
            key = New ActivityTrackingCondition()
            trackPoint.MatchingLocations(0).Conditions.Add(key)
        End If
        key.Member = member
        key.Value = value
        key.Operator = op
    End If
End Sub

Remarks

Value is compared to the value of

Member by applying Operator.

If you use the parameterless constructor for ActivityTrackingCondition, you must explicitly set Value.

Applies to