Esempio n. 1
0
 public RepositoryImporter(string repoName, string rootDirectory, AnalysisServices analysisServices)
 {
     AnalysisServices = analysisServices;
     FileSystem       = analysisServices.FileSystem;
     RepoName         = repoName;
     RootDirectory    = rootDirectory;
 }
Esempio n. 2
0
        public Repo(string repoName, string repoRoot, AnalysisServices analysisServices)
        {
            Debug.Assert(!string.IsNullOrEmpty(analysisServices.TargetIndex));
            Name             = repoName;
            AnalysisServices = analysisServices;
            Roots.AddRange(analysisServices.NamedRoots);

            Roots.Add(new NamedRoot("RepoRoot", repoRoot));
            Roots.Add(new NamedRoot("ProgramFiles", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles)));
            Roots.Add(new NamedRoot("ProgramFilesX86", Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86)));
            Roots.Add(new NamedRoot("System", Environment.GetFolderPath(Environment.SpecialFolder.System)));
            Roots.Add(new NamedRoot("SystemX86", Environment.GetFolderPath(Environment.SpecialFolder.SystemX86)));
            Roots.Add(new NamedRoot("Windows", Environment.GetFolderPath(Environment.SpecialFolder.Windows)));
            Roots.Add(new NamedRoot("Temp", Environment.GetEnvironmentVariable("Temp")));
            Roots.Add(new NamedRoot("UserProfile", Environment.GetFolderPath(Environment.SpecialFolder.UserProfile)));
            Roots.Add(new NamedRoot("ProgramData", Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)));
            Roots.Sort((m1, m2) => - m1.Path.Length.CompareTo(m2.Path.Length));
            Roots = Roots.Select(m => new NamedRoot(m.Name, PathUtilities.EnsureTrailingSlash(m.Path))).ToList();

            DefaultRepoProject = CreateRepoProject(GetRepoProjectName(repoName), repoRoot);
        }