Exemple #1
0
        /// <summary>
        /// Gets Visual studio solution information. if <see cref="solutionFileName"/> is not specified solution file name is readed from <see cref="IBuildPropertiesContext"/> property <see cref="BuildProps.SolutionFileName"/>.
        /// </summary>
        /// <param name="context"></param>
        /// <param name="solutionFileName"></param>
        /// <returns></returns>
        public static VSSolution GetVsSolution(this IBuildPropertiesContext context, string solutionFileName = null)
        {
            var taskContext = context as ITaskContext;

            if (taskContext == null)
            {
                return(null);
            }

            return(ContextBaseExtensions.GetVsSolution(taskContext, solutionFileName));
        }
Exemple #2
0
 /// <summary>
 /// Gets all directories matching glob pattern.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="directory"></param>
 /// <param name="globPattern"></param>
 /// <returns></returns>
 public static List <FullPath> GetDirectories(this IBuildPropertiesContext context, string directory, GlobOptions globOptions = GlobOptions.None, params string[] globPattern)
 {
     return(ContextBaseExtensions.GetDirectories(directory, globOptions, globPattern));
 }
Exemple #3
0
 /// <summary>
 /// Gets all files matching glob pattern.
 /// See: https://github.com/kthompson/glob for supported pattern expressions and use cases.
 /// </summary>
 /// <param name="context"></param>
 /// <param name="directory"></param>
 /// <param name="globPattern"></param>
 /// <returns></returns>
 public static List <FileFullPath> GetFiles(this IBuildPropertiesContext context, string directory, params string[] globPattern)
 {
     return(ContextBaseExtensions.GetFiles(directory, globPattern));
 }