This project has moved. For the latest updates, please go here.

DSL Library Methods

The full list of DSL methods can be found by inspecting the DSL library project.

MEF is used to load the DslLibrary assembly at runtime. This library can be extended or replaced, the only requirement for DSL Library is that it implements the IDslLibray interface. This requires four properties are set

  • TfsProvider  - Instance of TFS provider
  • EmailProvider - Instance of the Email provider
  • EventXml - The raw event Xml
  • ScriptFolder - ScriptFolder

The TFS DSL, at time of writing, provides the following methods

  • LogInfoMessage - Sends a message to the info level logger managed by nLog
  • LogDebugMessage - Sends a message to the debug level logger managed by nLog
  • LogErrorMessage - Sends a message to the error level logger managed by nLog
  • GetWorkItem - Gets a work item from TFS from its Id
  • GetParentWorkItem - Gets the parent work item from TFS for a workitem object (Added in 1.0.2.0)
  • GetChildWorkItems - Gets the child work items from TFS for a workitem object (Added in 1.0.2.0)
  • GetBuildDetails - Gets the details of a build from TFS
  • SetBuildRetension - Sets the build retention
  • GetChangeset - Gets a changeset from TFS
  • CreateWorkItem - Creates a work item
  • CurrentScriptFolder – Returns the folder the script engine is using to load scripts
  • SendEmail -  Send an email. This method appears in two forms, one that takes a set of string. The second uses a template file (see template format)
  • IncrementBuildNumber - Update a pair of build arguments to new values - this is very specific to our needs as it has hard coded custom arguments name, I would expect GetBuildArgument will be used in most scripts (Added in 1.0.1.0)
  • GetBuildArgument - Get a build argument value (Added in 1.0.1.0)
  • SetBuildArgument - Sets a build argument value
  • UpdateWorkItem - Saves a work item back to TFS

Last edited May 12, 2014 at 7:28 PM by rfennell, version 3