Exemplo n.º 1
0
 public IEnumerable <FrameworkDir> GetFrameworkDirs()
 {
     return(new DirectoryInfo(LibDir).GetDirectories()
            .Select(_ => FrameworkDir.Get(_))
            .Where(_ => _ != null)
            .ToList());
 }
Exemplo n.º 2
0
                public static FrameworkDir Get(DirectoryInfo dir)
                {
                    var m = Regex.Match(dir.Name, @"([a-z]+)(\d+)(-\w+)?");
                    var f = new FrameworkDir();

                    f.directory = dir;
                    f.framework = m.Groups[1].Value;
                    f.version   = m.Groups[2].Value;
                    f.attribute = m.Groups[3].Value;
                    return(f);
                }