ActivityTrackingCondition.Member Property

Definition

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

C#
public override string Member { get; set; }

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.

C#
/// <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;
    }
}

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

Product Versions
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1