ActivityTrackingCondition.Value Propriedade

Definição

O valor a ser comparado com 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

Valor da propriedade

O valor usado na comparação.

Exemplos

O exemplo de código a seguir demonstra o acesso à propriedade Value. Este exemplo é do exemplo do SDK do Designer de Perfil de Acompanhamento. Para obter mais informações, consulte Exemplo de Designer de Perfil de Acompanhamento.

/// <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

Comentários

Value é comparado com o valor de

Member aplicando Operator.

Se você usar o construtor sem parâmetros para ActivityTrackingCondition, deverá definir Valueexplicitamente .

Aplica-se a