Conversation
Add EventExportImportService for JSON export/import using metadata __RowIndex and __Timestamp to preserve order. Add DataGridViewHelper to serialize DataGridView rows to event dictionaries. Wire export/import events into IMainView/MainView and reference helper from MainPresenter. Add comprehensive EventExportImportService unit tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds robust support for exporting and importing profiler events in JSON format within the WinForms application. It introduces a new service for event serialization, integrates export/import functionality into the UI, and ensures that event data is correctly extracted and restored to/from the grid. The changes improve usability by allowing users to save and reload profiling sessions, and they handle errors gracefully throughout the process.
Event Export/Import Functionality:
EventExportImportServiceto handle exporting events to JSON and importing them back, preserving row order and extracting column names while excluding metadata fields.OnExportEventsandOnImportEventshandlers inMainPresenterto support exporting the current grid data to a JSON file and importing events from a JSON file, including dynamic column creation and error handling.UI Integration:
IMainViewinterface and its implementation to support new export/import events. [1] [2]Data Extraction Helper:
DataGridViewHelperfor extracting event data fromDataGridViewrows and columns, ensuring consistent serialization for export.Wiring and Presenter Updates:
MainPresenterconstructor and ensured grid state is managed correctly during import. [1] [2]