示例#1
0
        static void Init(string[] args)
        {
            ProjectPath = args.ElementAt(1);

            DirectoryInfo projDir = new DirectoryInfo(Path.GetDirectoryName(ProjectPath));

            while (projDir.Parent != null)
            {
                SolutionPaths = SolutionPaths.Union(Directory.EnumerateFiles(projDir.FullName, "*.sln")).ToArray();

                _bitConfigFilePath = Path.Combine(projDir.FullName, BitConfigFileName);

                if (File.Exists(_bitConfigFilePath))
                {
                    break;
                }

                projDir = projDir.Parent;
            }

            BeingCompiledProjectName = Path.GetFileNameWithoutExtension(ProjectPath);

            if (string.IsNullOrEmpty(_bitConfigFilePath))
            {
                throw new BitConfigNotFoundException("Could not find bit config");
            }

            foreach (string solutionPath in SolutionPaths)
            {
                AllProjectsPaths = AllProjectsPaths.Union(new Bit.Tooling.CodeGenerator.Implementations.SolutionInfo(solutionPath).GetProjects().Select(p => Path.GetFullPath(p.AbsolutePath))).ToArray();
            }
        }
示例#2
0
        static void InitPropjects()
        {
            if (string.IsNullOrEmpty(_bitConfigFilePath))
            {
                throw new BitConfigNotFoundException("Could not find bit config");
            }

            foreach (string solutionPath in SolutionPaths)
            {
                AllProjectsPaths = AllProjectsPaths.Union(new Bit.Tooling.CodeGenerator.Implementations.SolutionInfo(solutionPath).GetProjects().Select(p => Path.GetFullPath(p.AbsolutePath))).ToArray();
            }
        }
示例#3
0
        static void InitPropjects()
        {
            if (string.IsNullOrEmpty(_bitConfigFilePath))
            {
                throw new BitConfigNotFoundException("Could not find bit config");
            }

            foreach (string solutionPath in SolutionPaths)
            {
                AllProjectsPaths = AllProjectsPaths.Union(SolutionFile.Parse(solutionPath).ProjectsInOrder.Select(p => Path.GetFullPath(p.AbsolutePath))).ToArray();
            }
        }