共用方式為


WorkflowHelpers.GetProcessParameterValue<T> Method

Gets the value of the specified process parameter. If the process parameter does not exist the default value is returned.

Namespace:  Microsoft.TeamFoundation.Build.Workflow
Assembly:  Microsoft.TeamFoundation.Build.Workflow (in Microsoft.TeamFoundation.Build.Workflow.dll)

Syntax

'Declaration
Public Shared Function GetProcessParameterValue(Of T) ( _
    rootActivity As Activity, _
    propertyName As String, _
    defaultValue As T _
) As T
public static T GetProcessParameterValue<T>(
    Activity rootActivity,
    string propertyName,
    T defaultValue
)
public:
generic<typename T>
static T GetProcessParameterValue(
    Activity^ rootActivity, 
    String^ propertyName, 
    T defaultValue
)
static member GetProcessParameterValue : 
        rootActivity:Activity * 
        propertyName:string * 
        defaultValue:'T -> 'T 
JScript does not support generic types or methods.

Type Parameters

  • T
    The expected type of the process parameter.

Parameters

  • propertyName
    Type: System.String

    The name of the property to get the value for.

  • defaultValue
    Type: T

    The value to return if the property value cannot be found.

Return Value

Type: T
The value of the process parameter if found or the specified default value if not found.

.NET Framework Security

See Also

Reference

WorkflowHelpers Class

Microsoft.TeamFoundation.Build.Workflow Namespace