Delen via


ServicingContext.AddTokenIfNotDefined Method

SetServicingToken is used to set a name value pair that is replaced in the step data before the step is executed. When calling this method only supply the token name itself. Tokens are referenced in servicing step data by including "$$" before and after the token name.

ex. Set with "ExampleToken", step data contains "$$ExampleToken$$".

Tokens are compared with a case-insensitive comparison, but replaced case-sensitively.

Namespace:  Microsoft.TeamFoundation.Framework.Server
Assembly:  Microsoft.TeamFoundation.Framework.Server (in Microsoft.TeamFoundation.Framework.Server.dll)

Syntax

'Declaration
Public Sub AddTokenIfNotDefined ( _
    tokenName As String, _
    tokenValue As String _
)
public void AddTokenIfNotDefined(
    string tokenName,
    string tokenValue
)
public:
void AddTokenIfNotDefined(
    String^ tokenName, 
    String^ tokenValue
)
member AddTokenIfNotDefined : 
        tokenName:string * 
        tokenValue:string -> unit
public function AddTokenIfNotDefined(
    tokenName : String, 
    tokenValue : String
)

Parameters

  • tokenValue
    Type: System.String

    Value the token is replaced with

.NET Framework Security

See Also

Reference

ServicingContext Class

Microsoft.TeamFoundation.Framework.Server Namespace