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
tokenName
Type: System.StringName of the token to be replaced
tokenValue
Type: System.StringValue the token is replaced with
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.