Skip to content

Commit

Permalink
Update FileSystemLayoutProvider.cs
Browse files Browse the repository at this point in the history
Small warning improvement
  • Loading branch information
jas88 committed Sep 25, 2023
1 parent 29b1a94 commit efeaa84
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions BadMedicine.Dicom/FileSystemLayoutProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public FileInfo GetPath(DirectoryInfo root,DicomDataset ds)

switch(Layout)
{
case FileSystemLayout.Flat:
case FileSystemLayout.Flat:
return new FileInfo(Path.Combine(root.FullName,filename));

case FileSystemLayout.StudyYearMonthDay:

if(date.Length > 0)
{
return new FileInfo(Path.Combine(
Expand All @@ -37,9 +37,9 @@ public FileInfo GetPath(DirectoryInfo root,DicomDataset ds)
break;

case FileSystemLayout.StudyYearMonthDayAccession:

var acc = ds.GetSingleValue<string>(DicomTag.AccessionNumber);

if(date.Length > 0 && !string.IsNullOrWhiteSpace(acc))
{
return new FileInfo(Path.Combine(
Expand All @@ -59,9 +59,9 @@ public FileInfo GetPath(DirectoryInfo root,DicomDataset ds)
ds.GetSingleValue<DicomUID>(DicomTag.StudyInstanceUID).UID,
filename));

default: throw new ArgumentOutOfRangeException();
default: throw new ArgumentOutOfRangeException(nameof(Layout));
}

return new FileInfo(Path.Combine(root.FullName,filename));
}

Expand Down

0 comments on commit efeaa84

Please sign in to comment.