コード例 #1
0
ファイル: ProjectLoader.cs プロジェクト: aries544/eXpand
 public void LoadProject(Options.SourceCodeInfo sourceCodeInfo, IList<AssemblyReference> assemblyReferences, int i1,Action<string> notFound ) {
     var readStrings = Options.Storage.ReadStrings(Options.ProjectPaths, String.Format("{0}_{1}", i1, sourceCodeInfo.ProjectRegex));
     Log.Send("ProjectsCount:"+readStrings.Count());
     for (int i = 0; i < readStrings.Count(); i++) {
         var strings = readStrings[i].Split('|');
         var assemblyPath = strings[1].ToLower();
         var assemblyReference = GetAssemblyReference(assemblyReferences, assemblyPath);
         if (assemblyReference != null) {
             Log.Send("Path found");
             if (!IsProjectLoaded(strings[0])) {
                 try {
                     CodeRush.Solution.Active.AddFromFile(strings[0]);
                     GetSolutionContext(strings[0], context => {
                         context.ShouldBuild = false;
                     });
                 }
                 catch (Exception e) {
                     Log.SendException(e);
                 }
             }
         }
         else {
             notFound.Invoke(assemblyPath);
         }
     }
 }
コード例 #2
0
ファイル: ProjectLoader.cs プロジェクト: testexpand/eXpand
 void LoadProject(Options.SourceCodeInfo sourceCodeInfo, IEnumerable<AssemblyReference> assemblyReferences, int i1) {
     var readStrings = Options.Storage.ReadStrings(Options.ProjectPaths, i1+"_"+sourceCodeInfo.ProjectRegex);
     Log.Send("ProjectsCount:"+readStrings.Count());
     for (int i = 0; i < readStrings.Count(); i++) {
         var strings = readStrings[i].Split('|');
         var assemblyPath = strings[1].ToLower();
         var assemblyReference = assemblyReferences.Where(reference => reference.FilePath.ToLower() == assemblyPath).FirstOrDefault();
         if (assemblyReference != null) {
             Log.Send("Path found");
             if (!IsProjectLoaded(strings[0])) {
                 try {
                     CodeRush.Solution.Active.AddFromFile(strings[0]);
                     GetSolutionContext(strings[0], context => {
                         context.ShouldBuild = false;
                     });
                 }
                 catch (Exception e) {
                     Log.SendException(e);
                 }
             }
         }
     }
 }