diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-05-11 05:55:46 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-11 13:55:46 +0200 |
| commit | e3f55a0c54a2517361c237543aba717fd2a16e69 (patch) | |
| tree | 699391d1880b265db662388c7b5c4823b53623ea /MediaBrowser.Controller/Drawing | |
| parent | a84e8c3884291acb721aeb202139372462e6c800 (diff) | |
Reduce warnings in MediaBrowser.Controller (#6006)
Co-authored-by: Patrick Barron <18354464+barronpm@users.noreply.github.com>
Diffstat (limited to 'MediaBrowser.Controller/Drawing')
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageCollageOptions.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Drawing/ImageStream.cs | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs b/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs index f06bbe4d0..e9c88ffb5 100644 --- a/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs +++ b/MediaBrowser.Controller/Drawing/ImageCollageOptions.cs @@ -1,5 +1,7 @@ #nullable disable +using System.Collections.Generic; + #pragma warning disable CS1591 namespace MediaBrowser.Controller.Drawing @@ -10,7 +12,7 @@ namespace MediaBrowser.Controller.Drawing /// Gets or sets the input paths. /// </summary> /// <value>The input paths.</value> - public string[] InputPaths { get; set; } + public IReadOnlyList<string> InputPaths { get; set; } /// <summary> /// Gets or sets the output path. diff --git a/MediaBrowser.Controller/Drawing/ImageStream.cs b/MediaBrowser.Controller/Drawing/ImageStream.cs index 591cc53d1..5ee781ffa 100644 --- a/MediaBrowser.Controller/Drawing/ImageStream.cs +++ b/MediaBrowser.Controller/Drawing/ImageStream.cs @@ -22,9 +22,15 @@ namespace MediaBrowser.Controller.Drawing public void Dispose() { - if (Stream != null) + Dispose(true); + GC.SuppressFinalize(this); + } + + protected virtual void Dispose(bool disposing) + { + if (disposing) { - Stream.Dispose(); + Stream?.Dispose(); } } } |
