Edit

Share via


ActivityTrackingCondition.Member Property

Definition

Gets or sets the name of the activity member that is to be compared with Value.

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

Property Value

The dot delineated name of the activity member.

Exceptions

The condition was evaluated and Member is a null reference (Nothing in Visual Basic).

The condition was evaluated and Member is incorrectly formed.

The condition was evaluated and Member does not refer to a valid activity member.

Examples

The following code sample demonstrates accessing the Member 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

You can specify an activity property or field, a member of an activity property or field, or a single element of an activity property or field (or a member of either) that implements the IEnumerable<T> interface. For example, you can specify a single element of a collection.

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

The value of the specified activity member is compared with Value by applying Operator.

Applies to