Got a build definition template, with custom argument 'NpmEnabled' (if i look at the xml of the xaml template, it is a part of the
<x:Members>
<x:Property Name="NpmEnabled" Type="InArgument(x:Boolean)" />
</x:Members>
I can set the NpmEnable in my Build Definition.
Now i have a CustomActivity, and want to use this setting. How do I get this setting from the context?
The next code does not work...
[BuildActivity(HostEnvironmentOption.All)]
[ActivityTracking(ActivityTrackingOption.ActivityOnly)]
public sealed class NpmInstall : CodeActivity
{
public InArgument<string> NpmEnabled { get; set; }
public override void Execute(CodeActivityContext contect)
{
string x = context.GetValue<string>(this.NpmEnabled);
}
}
This way i need to set the NpmEnabled variable in the workflow template to a specific value, but i want the value of the setting I see in the build definition.