Exemplo n.º 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 XPathExpression
            var fileNamePattern = FileNamePattern.Get(context);

            // get the value of the FilePath
            var searchFolder = SearchFolder.Get(context);

            var filePath = FindFile(fileNamePattern, searchFolder);

            context.WriteBuildMessage(string.Format("Path found: {0}", filePath), BuildMessageImportance.High);

            // return the value
            FullFilePath.Set(context, filePath);
        }