mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-21 01:24:44 +01:00
ReSharper conform to 'var' settings
This commit is contained in:
@@ -164,7 +164,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Adds the virtual child.
|
||||
/// </summary>
|
||||
/// <param name="child">The child.</param>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void AddVirtualChild(BaseItem child)
|
||||
{
|
||||
if (child == null)
|
||||
@@ -180,7 +180,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="id">The id.</param>
|
||||
/// <returns>BaseItem.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">id</exception>
|
||||
/// <exception cref="ArgumentNullException">id</exception>
|
||||
public BaseItem FindVirtualChild(Guid id)
|
||||
{
|
||||
if (id.Equals(Guid.Empty))
|
||||
|
||||
@@ -367,7 +367,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
}
|
||||
char thisCh = s1[thisMarker];
|
||||
|
||||
StringBuilder thisChunk = new StringBuilder();
|
||||
var thisChunk = new StringBuilder();
|
||||
|
||||
while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || SortHelper.InChunk(thisCh, thisChunk[0])))
|
||||
{
|
||||
@@ -548,9 +548,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
public static IMediaSourceManager MediaSourceManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String" /> that represents this instance.
|
||||
/// Returns a <see cref="string" /> that represents this instance.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="System.String" /> that represents this instance.</returns>
|
||||
/// <returns>A <see cref="string" /> that represents this instance.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
@@ -1661,7 +1661,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns><c>true</c> if [is parental allowed] [the specified user]; otherwise, <c>false</c>.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
public bool IsParentalAllowed(User user)
|
||||
{
|
||||
if (user == null)
|
||||
@@ -1811,7 +1811,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns><c>true</c> if the specified user is visible; otherwise, <c>false</c>.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
public virtual bool IsVisible(User user)
|
||||
{
|
||||
if (user == null)
|
||||
@@ -1971,7 +1971,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Adds a studio to the item
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void AddStudio(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
@@ -2004,7 +2004,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Adds a genre to the item
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void AddGenre(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
@@ -2028,7 +2028,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="datePlayed">The date played.</param>
|
||||
/// <param name="resetPosition">if set to <c>true</c> [reset position].</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public virtual void MarkPlayed(User user,
|
||||
DateTime? datePlayed,
|
||||
bool resetPosition)
|
||||
@@ -2065,7 +2065,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public virtual void MarkUnplayed(User user)
|
||||
{
|
||||
if (user == null)
|
||||
@@ -2104,7 +2104,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="type">The type.</param>
|
||||
/// <param name="imageIndex">Index of the image.</param>
|
||||
/// <returns><c>true</c> if the specified type has image; otherwise, <c>false</c>.</returns>
|
||||
/// <exception cref="System.ArgumentException">Backdrops should be accessed using Item.Backdrops</exception>
|
||||
/// <exception cref="ArgumentException">Backdrops should be accessed using Item.Backdrops</exception>
|
||||
public bool HasImage(ImageType type, int imageIndex)
|
||||
{
|
||||
return GetImageInfo(type, imageIndex) != null;
|
||||
@@ -2232,9 +2232,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="imageType">Type of the image.</param>
|
||||
/// <param name="imageIndex">Index of the image.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">
|
||||
/// <exception cref="InvalidOperationException">
|
||||
/// </exception>
|
||||
/// <exception cref="System.ArgumentNullException">item</exception>
|
||||
/// <exception cref="ArgumentNullException">item</exception>
|
||||
public string GetImagePath(ImageType imageType, int imageIndex)
|
||||
{
|
||||
var info = GetImageInfo(imageType, imageIndex);
|
||||
@@ -2294,7 +2294,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="imageType">Type of the image.</param>
|
||||
/// <param name="images">The images.</param>
|
||||
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
|
||||
/// <exception cref="System.ArgumentException">Cannot call AddImages with chapter images</exception>
|
||||
/// <exception cref="ArgumentException">Cannot call AddImages with chapter images</exception>
|
||||
public bool AddImages(ImageType imageType, List<FileSystemMetadata> images)
|
||||
{
|
||||
if (imageType == ImageType.Chapter)
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="item">The item.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.InvalidOperationException">Unable to add + item.Name</exception>
|
||||
/// <exception cref="InvalidOperationException">Unable to add + item.Name</exception>
|
||||
public void AddChild(BaseItem item, CancellationToken cancellationToken)
|
||||
{
|
||||
item.SetParent(this);
|
||||
@@ -1261,7 +1261,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="includeLinkedChildren">if set to <c>true</c> [include linked children].</param>
|
||||
/// <returns>IEnumerable{BaseItem}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public IEnumerable<BaseItem> GetRecursiveChildren(User user, bool includeLinkedChildren = true)
|
||||
{
|
||||
return GetRecursiveChildren(user, null);
|
||||
|
||||
@@ -175,9 +175,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
public Dictionary<string, string> ProviderIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns a <see cref="System.String" /> that represents this instance.
|
||||
/// Returns a <see cref="string" /> that represents this instance.
|
||||
/// </summary>
|
||||
/// <returns>A <see cref="System.String" /> that represents this instance.</returns>
|
||||
/// <returns>A <see cref="string" /> that represents this instance.</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
return Name;
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
IncludeItemTypes = new[] { typeof(Season).Name },
|
||||
IsVirtualItem = false,
|
||||
Limit = 0,
|
||||
DtoOptions = new Dto.DtoOptions(false)
|
||||
DtoOptions = new DtoOptions(false)
|
||||
{
|
||||
EnableImages = false
|
||||
}
|
||||
@@ -136,7 +136,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
{
|
||||
AncestorWithPresentationUniqueKey = null,
|
||||
SeriesPresentationUniqueKey = seriesKey,
|
||||
DtoOptions = new Dto.DtoOptions(false)
|
||||
DtoOptions = new DtoOptions(false)
|
||||
{
|
||||
EnableImages = false
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// </summary>
|
||||
/// <param name="newName">The new name.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public Task Rename(string newName)
|
||||
{
|
||||
if (string.IsNullOrEmpty(newName))
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Gets or sets the users 0-10 rating
|
||||
/// </summary>
|
||||
/// <value>The rating.</value>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException">Rating;A 0 to 10 rating is required for UserItemData.</exception>
|
||||
public double? Rating
|
||||
{
|
||||
get => _rating;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace MediaBrowser.Controller.IO
|
||||
/// <param name="flattenFolderDepth">The flatten folder depth.</param>
|
||||
/// <param name="resolveShortcuts">if set to <c>true</c> [resolve shortcuts].</param>
|
||||
/// <returns>Dictionary{System.StringFileSystemInfo}.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">path</exception>
|
||||
/// <exception cref="ArgumentNullException">path</exception>
|
||||
public static FileSystemMetadata[] GetFilteredFileSystemEntries(IDirectoryService directoryService,
|
||||
string path,
|
||||
IFileSystem fileSystem,
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns>Task{Year}.</returns>
|
||||
/// <exception cref="System.ArgumentOutOfRangeException"></exception>
|
||||
/// <exception cref="ArgumentOutOfRangeException"></exception>
|
||||
Year GetYear(int value);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="id">The id.</param>
|
||||
/// <returns>User.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
User GetUserById(Guid id);
|
||||
|
||||
/// <summary>
|
||||
@@ -73,16 +73,16 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="newName">The new name.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">user</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
Task RenameUser(User user, string newName);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the user.
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <exception cref="System.ArgumentNullException">user</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
void UpdateUser(User user);
|
||||
|
||||
/// <summary>
|
||||
@@ -90,8 +90,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>User.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">name</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
/// <exception cref="ArgumentNullException">name</exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
Task<User> CreateUser(string name);
|
||||
|
||||
/// <summary>
|
||||
@@ -99,8 +99,8 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">user</exception>
|
||||
/// <exception cref="System.ArgumentException"></exception>
|
||||
/// <exception cref="ArgumentNullException">user</exception>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
Task DeleteUser(User user);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// Adds the additional location.
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public void AddAdditionalLocation(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
@@ -173,7 +173,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>FileSystemInfo.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public FileSystemMetadata GetFileSystemEntryByName(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
@@ -189,7 +189,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// </summary>
|
||||
/// <param name="path">The path.</param>
|
||||
/// <returns>FileSystemInfo.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
public FileSystemMetadata GetFileSystemEntryByPath(string path)
|
||||
{
|
||||
if (string.IsNullOrEmpty(path))
|
||||
@@ -228,10 +228,10 @@ namespace MediaBrowser.Controller.Library
|
||||
#region Equality Overrides
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the specified <see cref="System.Object" /> is equal to this instance.
|
||||
/// Determines whether the specified <see cref="object" /> is equal to this instance.
|
||||
/// </summary>
|
||||
/// <param name="obj">The object to compare with the current object.</param>
|
||||
/// <returns><c>true</c> if the specified <see cref="System.Object" /> is equal to this instance; otherwise, <c>false</c>.</returns>
|
||||
/// <returns><c>true</c> if the specified <see cref="object" /> is equal to this instance; otherwise, <c>false</c>.</returns>
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return Equals(obj as ItemResolveArgs);
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">message</exception>
|
||||
/// <exception cref="ArgumentNullException">message</exception>
|
||||
Task SendAsync<T>(WebSocketMessage<T> message, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
@@ -79,7 +79,7 @@ namespace MediaBrowser.Controller.Net
|
||||
/// <param name="text">The text.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException">buffer</exception>
|
||||
/// <exception cref="ArgumentNullException">buffer</exception>
|
||||
Task SendAsync(string text, CancellationToken cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
Task OnPlaybackProgress(PlaybackProgressInfo info);
|
||||
|
||||
Task OnPlaybackProgress(PlaybackProgressInfo info, bool isAutomated);
|
||||
@@ -100,7 +100,7 @@ namespace MediaBrowser.Controller.Session
|
||||
/// </summary>
|
||||
/// <param name="info">The info.</param>
|
||||
/// <returns>Task.</returns>
|
||||
/// <exception cref="System.ArgumentNullException"></exception>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
Task OnPlaybackStopped(PlaybackStopInfo info);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -72,8 +72,8 @@ namespace MediaBrowser.Controller.Sorting
|
||||
char thisCh = s1[thisMarker];
|
||||
char thatCh = s2[thatMarker];
|
||||
|
||||
StringBuilder thisChunk = new StringBuilder();
|
||||
StringBuilder thatChunk = new StringBuilder();
|
||||
var thisChunk = new StringBuilder();
|
||||
var thatChunk = new StringBuilder();
|
||||
|
||||
while ((thisMarker < s1.Length) && (thisChunk.Length == 0 || InChunk(thisCh, thisChunk[0])))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user