public void AppendPointToPath(Point point) { Path = Path ?? new StringBuilder(); if (Path.Length >= 1800) { MemoryMappedFileManager = MemoryMappedFileManager ?? new MemoryMappedFileManager(); MemoryMappedFileManager.CreateNewMappedFile(this.Path.ToString()); Path = new StringBuilder(); } Path.Append($":{point.ToString()}"); }
/// <summary> /// Retrieves the next path segment from the stack as a string. /// Returns null if none exist. /// </summary> /// <returns></returns> public List <string> GetPathSegments() { if (Path != null) { PathSegments.Add(Path.ToString()); } if (MemoryMappedFileManager != null) { PathSegments.AddRange(MemoryMappedFileManager.GetFileContent()); } return(PathSegments); }