Example #1
0
        /// <summary>
        /// Searches an XML file with an XPath expression
        /// </summary>
        /// <param name="context"></param>
        protected override void Execute(CodeActivityContext context)
        {
            // get the value of the FilePath
            var packageInfoFilePath = context.GetValue(PackageInfoFilePath);
            var packageIndex        = context.GetValue(PackageIndex);

            var outputDirectoryFromBldDef        = context.GetValue(OutputDirectoryFromBldDef);
            var switchInvokePushFromBldDef       = context.GetValue(SwitchInvokePushFromBldDef);
            var pushDestinationFromBldDef        = context.GetValue(PushDestinationFromBldDef);
            var switchInvokePowerShellFromBldDef = context.GetValue(SwitchInvokePowerShellFromBldDef);
            var versionFromBldDef = context.GetValue(VersionFromBldDef);

            var basePathFromBldDef             = context.GetValue(BasePathFromBldDef);
            var additionalOptionsFromBldDef    = context.GetValue(AdditionalOptionsFromBldDef);
            var powerShellScriptPathFromBldDef = context.GetValue(PowerShellScriptPathFromBldDef);


            var packageData = Execute(packageInfoFilePath, packageIndex, basePathFromBldDef, additionalOptionsFromBldDef,
                                      outputDirectoryFromBldDef, switchInvokePushFromBldDef,
                                      pushDestinationFromBldDef, switchInvokePowerShellFromBldDef, powerShellScriptPathFromBldDef, versionFromBldDef);

            Name.Set(context, packageData.Name);
            AdditionalOptions.Set(context, packageData.AdditionalOptions);
            BasePath.Set(context, packageData.BasePath);
            NuSpecFilePath.Set(context, packageData.NuSpecFilePath);
            PowerShellScriptPath.Set(context, packageData.PowerShellScriptPath);
            Version.Set(context, packageData.Version);

            OutputDirectory.Set(context, packageData.OutputDirectory);
            SwitchInvokePush.Set(context, packageData.SwitchInvokePush);
            PushDestination.Set(context, packageData.PushDestination);
            SwitchInvokePowerShell.Set(context, packageData.SwitchInvokePowerShell);
        }