예제 #1
0
        private TokensList LocalModules()
        {
            var local     = new List <string>();
            var workspace = Helper.GetWorkspaceDirectory(Directory.GetCurrentDirectory());

            if (workspace != null)
            {
                Helper.SetWorkspace(workspace);
                local = modules.Where(Yaml.Exists).ToList();
            }
            return(TokensList.Create(local));
        }
예제 #2
0
        private TokensList RemoteBranches()
        {
            var moduleDirectory = Helper.GetModuleDirectory(Directory.GetCurrentDirectory());

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

            var repo     = new GitRepository(moduleDirectory, log);
            var branches = repo.GetRemoteBranches().Select(b => b.Name);

            return(TokensList.Create(branches));
        }
예제 #3
0
        private TokensList MoudleCsprojs()
        {
            var moduleDirectory = Helper.GetModuleDirectory(Directory.GetCurrentDirectory());

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

            var moduleName = Path.GetFileName(moduleDirectory);
            var files      = Yaml.GetCsprojsList(moduleName);

            return(TokensList.Create(CsprojsToShortFormat(files)));
        }
예제 #4
0
        private TokensList RefAddComplete()
        {
            var workspace = Helper.GetWorkspaceDirectory(Directory.GetCurrentDirectory()) ?? Directory.GetCurrentDirectory();

            Helper.SetWorkspace(workspace);

            var local = modules.Where(Yaml.Exists).ToList();

            if (lastToken.Contains("/") && local.Contains(lastToken.Split('/')[0]))
            {
                var name = lastToken.Split('/')[0];
                local.AddRange(
                    Yaml.ConfigurationParser(name).GetConfigurations().Select(c => $"{name}/{c}"));
            }

            return(TokensList.Create(local, MoudleCsprojs));
        }
예제 #5
0
 private TokensList AllModules()
 {
     return(TokensList.Create(modules));
 }
예제 #6
0
 private static TokensList ModuleConfigs(string moduleName)
 {
     return(TokensList.Create(
                Yaml.ConfigurationParser(moduleName).GetConfigurations()));
 }