Cmd add modality - #340
Draft
jas88 wants to merge 2 commits into
Draft
Conversation
| } | ||
|
|
||
| var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); | ||
| var series = template.Tables.Single(t => t.TableName.Equals(SeriesTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
|
|
||
| var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); | ||
| var series = template.Tables.Single(t => t.TableName.Equals(SeriesTable)); | ||
| var image = template.Tables.Single(t => t.TableName.Equals(ImageTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
| private readonly DiscoveredDatabase _live; | ||
| private readonly LoadMetadata _lmd; | ||
| private readonly string _prefix; | ||
| private ExecuteCommandCreateNewImagingDatasetSuite _schemaCreationCommand; |
Check notice
Code scanning / CodeQL
Missed 'readonly' opportunity
Comment on lines
+37
to
+41
| catch (Exception ex) | ||
| { | ||
| SetImpossible($"Could not get single live server from the LoadMetadata {lmd} :" + ex); | ||
| return; | ||
| } |
Check notice
Code scanning / CodeQL
Generic catch clause
Comment on lines
+49
to
+56
| if (modality.EndsWith("_")) | ||
| { | ||
| _prefix = modality; | ||
| } | ||
| else | ||
| { | ||
| _prefix = modality + "_"; | ||
| } |
Check notice
Code scanning / CodeQL
Missed ternary opportunity
Comment on lines
+78
to
+85
| foreach (var n in new[] { StudyTable, SeriesTable, ImageTable }) | ||
| { | ||
| if (template.Tables.Any(t => t.TableName.Equals(n))) | ||
| { | ||
| SetImpossible($"Template did not contain an expected table name: {n}. Table names in template were {string.Join(",", template.Tables.Select(t => t.TableName))}"); | ||
| return; | ||
| } | ||
| } |
Check notice
Code scanning / CodeQL
Missed opportunity to use Where
| } | ||
| } | ||
|
|
||
| var study = template.Tables.Single(t => t.TableName.Equals(StudyTable)); |
Check warning
Code scanning / CodeQL
Useless assignment to local variable
jas88
marked this pull request as draft
March 20, 2023 18:11
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.
Add a function to populate a new modality