aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
diff options
context:
space:
mode:
authorShadowghost <Ghost_of_Stone@web.de>2023-02-18 14:42:35 +0100
committerShadowghost <Ghost_of_Stone@web.de>2023-03-10 15:27:17 +0100
commit0da5255f1291ba510f829d36a3ca1a9eb65590dc (patch)
tree52792d3cdd252c72eed5a5a50fe269b9f1bfd7be /MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
parent47aa07c3424ce0041e0a79eea1ab7f6621485b94 (diff)
Apply review suggestions
Diffstat (limited to 'MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs')
-rw-r--r--MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs81
1 files changed, 54 insertions, 27 deletions
diff --git a/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
index d55688e3d..9e7a1d50a 100644
--- a/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
+++ b/MediaBrowser.MediaEncoding/BdInfo/BdInfoFileInfo.cs
@@ -1,41 +1,68 @@
-#pragma warning disable CS1591
-
using System.IO;
using MediaBrowser.Model.IO;
-namespace MediaBrowser.MediaEncoding.BdInfo
+namespace MediaBrowser.MediaEncoding.BdInfo;
+
+/// <summary>
+/// Class BdInfoFileInfo.
+/// </summary>
+public class BdInfoFileInfo : BDInfo.IO.IFileInfo
{
- public class BdInfoFileInfo : BDInfo.IO.IFileInfo
- {
- private FileSystemMetadata _impl;
+ private FileSystemMetadata _impl;
- public BdInfoFileInfo(FileSystemMetadata impl)
- {
- _impl = impl;
- }
+ /// <summary>
+ /// Initializes a new instance of the <see cref="BdInfoFileInfo" /> class.
+ /// </summary>
+ /// <param name="impl">The <see cref="FileSystemMetadata" />.</param>
+ public BdInfoFileInfo(FileSystemMetadata impl)
+ {
+ _impl = impl;
+ }
- public string Name => _impl.Name;
+ /// <summary>
+ /// Gets the name.
+ /// </summary>
+ public string Name => _impl.Name;
- public string FullName => _impl.FullName;
+ /// <summary>
+ /// Gets the full name.
+ /// </summary>
+ public string FullName => _impl.FullName;
- public string Extension => _impl.Extension;
+ /// <summary>
+ /// Gets the extension.
+ /// </summary>
+ public string Extension => _impl.Extension;
- public long Length => _impl.Length;
+ /// <summary>
+ /// Gets the length.
+ /// </summary>
+ public long Length => _impl.Length;
- public bool IsDir => _impl.IsDirectory;
+ /// <summary>
+ /// Gets a value indicating whether this is a directory.
+ /// </summary>
+ public bool IsDir => _impl.IsDirectory;
- public Stream OpenRead()
- {
- return new FileStream(
- FullName,
- FileMode.Open,
- FileAccess.Read,
- FileShare.Read);
- }
+ /// <summary>
+ /// Gets a file as file stream.
+ /// </summary>
+ /// <returns>A <see cref="FileStream" /> for the file.</returns>
+ public Stream OpenRead()
+ {
+ return new FileStream(
+ FullName,
+ FileMode.Open,
+ FileAccess.Read,
+ FileShare.Read);
+ }
- public StreamReader OpenText()
- {
- return new StreamReader(OpenRead());
- }
+ /// <summary>
+ /// Gets a files's content with a stream reader.
+ /// </summary>
+ /// <returns>A <see cref="StreamReader" /> for the file's content.</returns>
+ public StreamReader OpenText()
+ {
+ return new StreamReader(OpenRead());
}
}