void SetSnapshot(DataRenderer dataRenderer, PackedMemorySnapshot snapshot) { if (snapshot == null) { m_RawSnapshot = null; m_RawSchema = null; SchemaToDisplay = null; UpdateTableSelectionNames(); return; } m_RawSnapshot = snapshot; ProgressBarDisplay.ShowBar(string.Format("Opening snapshot: {0}", System.IO.Path.GetFileNameWithoutExtension(snapshot.filePath))); var cachedSnapshot = new CachedSnapshot(snapshot); using (Profiling.GetMarker(Profiling.MarkerId.CrawlManagedData).Auto()) { var crawling = Crawler.Crawl(cachedSnapshot); crawling.MoveNext(); //start execution var status = crawling.Current as EnumerationStatus; float progressPerStep = 1.0f / status.StepCount; while (crawling.MoveNext()) { ProgressBarDisplay.UpdateProgress(status.CurrentStep * progressPerStep, status.StepStatus); } } ProgressBarDisplay.ClearBar(); m_RawSchema = new RawSchema(); m_RawSchema.SetupSchema(cachedSnapshot, dataRenderer); SchemaToDisplay = m_RawSchema; if (k_DefaultViewFilePath.Length > 0) { using (ScopeDebugContext.Func(() => { return("File '" + k_DefaultViewFilePath + "'"); })) { Database.View.ViewSchema.Builder builder = null; using (Profiling.GetMarker(Profiling.MarkerId.LoadViewDefinitionFile).Auto()) { builder = Database.View.ViewSchema.Builder.LoadFromXMLFile(k_DefaultViewFilePath); } if (builder != null) { using (Profiling.GetMarker(Profiling.MarkerId.BuildViewDefinitionFile).Auto()) { ViewSchema = builder.Build(m_RawSchema); } if (ViewSchema != null) { SchemaToDisplay = ViewSchema; } } } } UpdateTableSelectionNames(); }
protected SnapshotMode(SnapshotMode copy) : base(copy) { m_RawSnapshot = copy.m_RawSnapshot; m_RawSchema = copy.m_RawSchema; ViewSchema = copy.ViewSchema; SchemaToDisplay = copy.SchemaToDisplay; m_RawSchema.renderer.m_BaseRenderer.PrettyNamesOptionChanged += UpdateTableSelectionNames; }
void SetSnapshot(ObjectDataFormatter objectDataFormatter, QueriedMemorySnapshot snapshot) { if (snapshot == null) { m_RawSnapshot = null; m_RawSchema = null; SchemaToDisplay = null; UpdateTableSelectionNames(); return; } m_RawSnapshot = snapshot; ProgressBarDisplay.ShowBar(string.Format("Opening snapshot: {0}", System.IO.Path.GetFileNameWithoutExtension(snapshot.GetReader().FilePath))); var cachedSnapshot = new CachedSnapshot(snapshot); using (s_CrawlManagedData.Auto()) { var crawling = Crawler.Crawl(cachedSnapshot); crawling.MoveNext(); //start execution var status = crawling.Current as EnumerationStatus; float progressPerStep = 1.0f / status.StepCount; while (crawling.MoveNext()) { ProgressBarDisplay.UpdateProgress(status.CurrentStep * progressPerStep, status.StepStatus); } } ProgressBarDisplay.ClearBar(); m_RawSchema = new RawSchema(); m_RawSchema.SetupSchema(cachedSnapshot, objectDataFormatter); SchemaToDisplay = m_RawSchema; if (k_DefaultViewFilePath.Length > 0) { Database.View.ViewSchema.Builder builder = null; builder = Database.View.ViewSchema.Builder.LoadFromXMLFile(k_DefaultViewFilePath); if (builder != null) { ViewSchema = builder.Build(m_RawSchema); if (ViewSchema != null) { SchemaToDisplay = ViewSchema; } } } UpdateTableSelectionNames(); }