Enable nullabe reference types for MediaBrowser.Model

This commit is contained in:
Bond_009
2020-04-05 18:10:56 +02:00
parent 29539174a3
commit 30ce346f34
208 changed files with 636 additions and 506 deletions

View File

@@ -1,26 +1,39 @@
namespace MediaBrowser.Model.IO
{
/// <summary>
/// Class FileSystemEntryInfo
/// Class FileSystemEntryInfo.
/// </summary>
public class FileSystemEntryInfo
{
/// <summary>
/// Gets or sets the name.
/// Initializes a new instance of the <see cref="FileSystemEntryInfo" /> class.
/// </summary>
/// <param name="name">The filename.</param>
/// <param name="path">The file path.</param>
/// <param name="type">The file type.</param>
public FileSystemEntryInfo(string name, string path, FileSystemEntryType type)
{
Name = name;
Path = path;
Type = type;
}
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
public string Name { get; }
/// <summary>
/// Gets or sets the path.
/// Gets the path.
/// </summary>
/// <value>The path.</value>
public string Path { get; set; }
public string Path { get; }
/// <summary>
/// Gets or sets the type.
/// Gets the type.
/// </summary>
/// <value>The type.</value>
public FileSystemEntryType Type { get; set; }
public FileSystemEntryType Type { get; }
}
}

View File

@@ -1,3 +1,4 @@
#nullable disable
#pragma warning disable CS1591
using System;

View File

@@ -1,3 +1,4 @@
#nullable disable
#pragma warning disable CS1591
using System;

View File

@@ -16,7 +16,6 @@ namespace MediaBrowser.Model.IO
/// <param name="isoPath">The iso path.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>IsoMount.</returns>
/// <exception cref="ArgumentNullException">isoPath</exception>
/// <exception cref="IOException">Unable to create mount.</exception>
Task<IIsoMount> Mount(string isoPath, CancellationToken cancellationToken);

View File

@@ -8,7 +8,7 @@ namespace MediaBrowser.Model.IO
public interface IIsoMount : IDisposable
{
/// <summary>
/// Gets or sets the iso path.
/// Gets the iso path.
/// </summary>
/// <value>The iso path.</value>
string IsoPath { get; }

View File

@@ -9,6 +9,12 @@ namespace MediaBrowser.Model.IO
{
public interface IIsoMounter
{
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
/// <summary>
/// Mounts the specified iso path.
/// </summary>
@@ -25,11 +31,5 @@ namespace MediaBrowser.Model.IO
/// <param name="path">The path.</param>
/// <returns><c>true</c> if this instance can mount the specified path; otherwise, <c>false</c>.</returns>
bool CanMount(string path);
/// <summary>
/// Gets the name.
/// </summary>
/// <value>The name.</value>
string Name { get; }
}
}

View File

@@ -14,6 +14,7 @@ namespace MediaBrowser.Model.IO
Task CopyToAsync(Stream source, Stream destination, int bufferSize, int emptyReadLimit, CancellationToken cancellationToken);
Task<int> CopyToAsync(Stream source, Stream destination, CancellationToken cancellationToken);
Task CopyToAsync(Stream source, Stream destination, long copyLength, CancellationToken cancellationToken);
Task CopyUntilCancelled(Stream source, Stream target, int bufferSize, CancellationToken cancellationToken);