mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-24 01:34:45 +03:00
Mayor code cleanup
Add Argument*Exceptions now use proper nameof operators. Added exception messages to quite a few Argument*Exceptions. Fixed rethorwing to be proper syntax. Added a ton of null checkes. (This is only a start, there are about 500 places that need proper null handling) Added some TODOs to log certain exceptions. Fix sln again. Fixed all AssemblyInfo's and added proper copyright (where I could find them) We live in *current year*. Fixed the use of braces. Fixed a ton of properties, and made a fair amount of functions static that should be and can be static. Made more Methods that should be static static. You can now use static to find bad functions! Removed unused variable. And added one more proper XML comment.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
|
||||
namespace Emby.Server.Implementations.Net
|
||||
{
|
||||
@@ -16,15 +16,17 @@ namespace Emby.Server.Implementations.Net
|
||||
/// <param name="disposing">True if managed objects should be disposed, if false, only unmanaged resources should be released.</param>
|
||||
protected abstract void Dispose(bool disposing);
|
||||
|
||||
|
||||
//TODO Remove and reimplement using the IsDisposed property directly.
|
||||
/// <summary>
|
||||
/// Throws and <see cref="System.ObjectDisposedException"/> if the <see cref="IsDisposed"/> property is true.
|
||||
/// Throws an <see cref="System.ObjectDisposedException"/> if the <see cref="IsDisposed"/> property is true.
|
||||
/// </summary>
|
||||
/// <seealso cref="IsDisposed"/>
|
||||
/// <exception cref="System.ObjectDisposedException">Thrown if the <see cref="IsDisposed"/> property is true.</exception>
|
||||
/// <seealso cref="Dispose()"/>
|
||||
protected virtual void ThrowIfDisposed()
|
||||
{
|
||||
if (this.IsDisposed) throw new ObjectDisposedException(this.GetType().FullName);
|
||||
if (IsDisposed) throw new ObjectDisposedException(GetType().Name);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user