mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-23 10:36:43 +00:00
More warnings (removed)
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
using System;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace MediaBrowser.Common.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Class BaseExtensions
|
||||
/// Class BaseExtensions.
|
||||
/// </summary>
|
||||
public static class BaseExtensions
|
||||
{
|
||||
@@ -30,10 +30,13 @@ namespace MediaBrowser.Common.Extensions
|
||||
/// <returns><see cref="Guid" />.</returns>
|
||||
public static Guid GetMD5(this string str)
|
||||
{
|
||||
#pragma warning disable CA5351
|
||||
using (var provider = MD5.Create())
|
||||
{
|
||||
return new Guid(provider.ComputeHash(Encoding.Unicode.GetBytes(str)));
|
||||
}
|
||||
|
||||
#pragma warning restore CA5351
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ namespace MediaBrowser.Common.Extensions
|
||||
/// <summary>
|
||||
/// Provides <c>CopyTo</c> extensions methods for <see cref="IReadOnlyList{T}" />.
|
||||
/// </summary>
|
||||
public static class CollectionExtensions
|
||||
public static class CopyToExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Copies all the elements of the current collection to the specified list
|
||||
@@ -14,7 +14,7 @@ namespace MediaBrowser.Common.Extensions
|
||||
/// <param name="source">The current collection that is the source of the elements.</param>
|
||||
/// <param name="destination">The list that is the destination of the elements copied from the current collection.</param>
|
||||
/// <param name="index">A 32-bit integer that represents the index in <c>destination</c> at which copying begins.</param>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <typeparam name="T">The type of the array.</typeparam>
|
||||
public static void CopyTo<T>(this IReadOnlyList<T> source, IList<T> destination, int index = 0)
|
||||
{
|
||||
for (int i = 0; i < source.Count; i++)
|
||||
|
||||
26
MediaBrowser.Common/Extensions/MethodNotAllowedException.cs
Normal file
26
MediaBrowser.Common/Extensions/MethodNotAllowedException.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Class MethodNotAllowedException.
|
||||
/// </summary>
|
||||
public class MethodNotAllowedException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MethodNotAllowedException" /> class.
|
||||
/// </summary>
|
||||
public MethodNotAllowedException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MethodNotAllowedException" /> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public MethodNotAllowedException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
26
MediaBrowser.Common/Extensions/RateLimitExceededException.cs
Normal file
26
MediaBrowser.Common/Extensions/RateLimitExceededException.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable SA1600
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Extensions
|
||||
{
|
||||
public class RateLimitExceededException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RateLimitExceededException" /> class.
|
||||
/// </summary>
|
||||
public RateLimitExceededException()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RateLimitExceededException" /> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public RateLimitExceededException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,9 @@
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Common.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Class ResourceNotFoundException
|
||||
/// Class ResourceNotFoundException.
|
||||
/// </summary>
|
||||
public class ResourceNotFoundException : Exception
|
||||
{
|
||||
@@ -14,7 +12,6 @@ namespace MediaBrowser.Common.Extensions
|
||||
/// </summary>
|
||||
public ResourceNotFoundException()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -24,66 +21,6 @@ namespace MediaBrowser.Common.Extensions
|
||||
public ResourceNotFoundException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Class MethodNotAllowedException
|
||||
/// </summary>
|
||||
public class MethodNotAllowedException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MethodNotAllowedException" /> class.
|
||||
/// </summary>
|
||||
public MethodNotAllowedException()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MethodNotAllowedException" /> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public MethodNotAllowedException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class RemoteServiceUnavailableException : Exception
|
||||
{
|
||||
public RemoteServiceUnavailableException()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public RemoteServiceUnavailableException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class RateLimitExceededException : Exception
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RateLimitExceededException" /> class.
|
||||
/// </summary>
|
||||
public RateLimitExceededException()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="RateLimitExceededException" /> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message.</param>
|
||||
public RateLimitExceededException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user