public static void BeginAddOrUpdatePaths (IEnumerable<string> basePaths, bool skipFunctionBodies = false, ParseFinishedHandler finishedHandler = null) { if (basePaths == null) throw new ArgumentNullException ("basePaths"); if (System.Diagnostics.Debugger.IsAttached) { Console.WriteLine ("BeginAddOrUpdatePaths: "); foreach (var p in basePaths) Console.WriteLine (p); Console.WriteLine ("---------"); } GC.Collect (); parseCompletedEvent.Reset (); stopParsing = false; var c = basePaths.Count (); if (c == 0) { var im = new StatIntermediate(); if(finishedHandler!=null) im.parseSubTasksUntilFinished.Add (new ParseSubtaskContainer(1,finishedHandler)); im.completed.Set (); Interlocked.Increment (ref parsingThreads); noticeFinish (new ParseIntermediate (im, null, null)); return; } var countObj = new ParseSubtaskContainer (c, finishedHandler); foreach (var path in basePaths) { Interlocked.Increment (ref parsingThreads); basePathQueue.Push (new PathQueueArgs (path, skipFunctionBodies, countObj)); } preparationThreadStartEvent.Set (); LaunchPreparationThread (); }
public static void UpdateParseCacheAsync(IEnumerable <string> Cache, bool skipfunctionbodies = false, ParseFinishedHandler onfinished = null) { if (Cache == null) { throw new ArgumentNullException("Cache"); } GlobalParseCache.BeginAddOrUpdatePaths(Cache, skipfunctionbodies, onfinished); }
public ParseSubtaskContainer (int i, ParseFinishedHandler f) { this.i = i; this.finishedHandler = f; }
public static void UpdateParseCacheAsync(IEnumerable <string> Cache, string fallBack, string solutionPath, bool skipfunctionbodies = false, ParseFinishedHandler onfinished = null) { if (Cache == null) { throw new ArgumentNullException("Cache"); } GlobalParseCache.BeginAddOrUpdatePaths(Parser.DParserWrapper.EnsureAbsolutePaths(Cache, fallBack, solutionPath), skipfunctionbodies, finishedHandler: onfinished); }
public static void BeginAddOrUpdatePaths(IEnumerable <string> basePaths, bool skipFunctionBodies = false, ParseFinishedHandler finishedHandler = null) { if (basePaths == null) { throw new ArgumentNullException("basePaths"); } if (System.Diagnostics.Debugger.IsAttached) { Console.WriteLine("BeginAddOrUpdatePaths: "); foreach (var p in basePaths) { Console.WriteLine(p); } Console.WriteLine("---------"); } GC.Collect(); parseCompletedEvent.Reset(); stopParsing = false; var c = basePaths.Count(); if (c == 0) { var im = new StatIntermediate(); if (finishedHandler != null) { im.parseSubTasksUntilFinished.Add(new ParseSubtaskContainer(1, finishedHandler)); } im.completed.Set(); Interlocked.Increment(ref parsingThreads); noticeFinish(new ParseIntermediate(im, null, null)); return; } var countObj = new ParseSubtaskContainer(c, finishedHandler); foreach (var path in basePaths) { Interlocked.Increment(ref parsingThreads); basePathQueue.Push(new PathQueueArgs(path, skipFunctionBodies, countObj)); } preparationThreadStartEvent.Set(); LaunchPreparationThread(); }
public ParseSubtaskContainer(int i, ParseFinishedHandler f) { this.i = i; this.finishedHandler = f; }
public static void UpdateParseCacheAsync (IEnumerable<string> Cache, bool skipfunctionbodies= false, ParseFinishedHandler onfinished = null) { if (Cache == null) throw new ArgumentNullException ("Cache"); GlobalParseCache.BeginAddOrUpdatePaths (Cache, skipfunctionbodies, onfinished); }
public static void UpdateParseCacheAsync (IEnumerable<string> Cache, string fallBack, string solutionPath, bool skipfunctionbodies= false, ParseFinishedHandler onfinished = null) { if (Cache == null) throw new ArgumentNullException ("Cache"); GlobalParseCache.BeginAddOrUpdatePaths (Parser.DParserWrapper.EnsureAbsolutePaths(Cache, fallBack, solutionPath), skipfunctionbodies, finishedHandler:onfinished); }