Fix namespacing so it lines up properly with file names and paths (#715)

* Fix stupid namespacing so it lines up properly with file names and paths.
This commit is contained in:
Erwin de Haan 2019-02-09 10:10:33 +01:00 committed by Bond-009
parent 387b4dea25
commit f1ef0b0b4c
37 changed files with 56 additions and 48 deletions

View File

@ -12,7 +12,6 @@ using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Emby.Common.Implementations.Serialization;
using Emby.Dlna;
using Emby.Dlna.Main;
using Emby.Dlna.Ssdp;

View File

@ -17,7 +17,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.LiveTv;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Server.Implementations.LiveTv.Listings
namespace Emby.Server.Implementations.LiveTv.Listings
{
public class XmlTvListingsProvider : IListingsProvider
{

View File

@ -1,11 +1,10 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using System.Text;
namespace System.Net
namespace Emby.Server.Implementations.Networking.IPNetwork
{
using System;
using System.Numerics;
using System.Text;
/// <summary>
/// Extension methods to convert <see cref="BigInteger"/>
/// instances to hexadecimal, octal, and binary strings.

View File

@ -1,8 +1,10 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
using System.Numerics;
namespace System.Net
namespace Emby.Server.Implementations.Networking.IPNetwork
{
public class IPAddressCollection : IEnumerable<IPAddress>, IEnumerator<IPAddress>
{
@ -29,7 +31,7 @@ namespace System.Net
{
throw new ArgumentOutOfRangeException(nameof(i));
}
byte width = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128;
byte width = this._ipnetwork.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork ? (byte)32 : (byte)128;
var ipn = this._ipnetwork.Subnet(width);
return ipn[i].Network;
}

View File

@ -1,10 +1,12 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Sockets;
using System.Numerics;
using System.Text.RegularExpressions;
namespace System.Net
namespace Emby.Server.Implementations.Networking.IPNetwork
{
/// <summary>
/// IP Network utility class.
@ -60,7 +62,7 @@ namespace System.Net
get
{
int width = this._family == Sockets.AddressFamily.InterNetwork ? 4 : 16;
int width = this._family == System.Net.Sockets.AddressFamily.InterNetwork ? 4 : 16;
var uintBroadcast = this._network + this._netmask.PositiveReverse(width);
return uintBroadcast;
}
@ -73,7 +75,7 @@ namespace System.Net
{
get
{
if (this._family == Sockets.AddressFamily.InterNetworkV6)
if (this._family == System.Net.Sockets.AddressFamily.InterNetworkV6)
{
return null;
}
@ -88,7 +90,7 @@ namespace System.Net
{
get
{
var fisrt = this._family == Sockets.AddressFamily.InterNetworkV6
var fisrt = this._family == System.Net.Sockets.AddressFamily.InterNetworkV6
? this._network
: (this.Usable <= 0) ? this._network : this._network + 1;
return IPNetwork.ToIPAddress(fisrt, this._family);
@ -102,7 +104,7 @@ namespace System.Net
{
get
{
var last = this._family == Sockets.AddressFamily.InterNetworkV6
var last = this._family == System.Net.Sockets.AddressFamily.InterNetworkV6
? this._broadcast
: (this.Usable <= 0) ? this._network : this._broadcast - 1;
return IPNetwork.ToIPAddress(last, this._family);
@ -117,7 +119,7 @@ namespace System.Net
get
{
if (this._family == Sockets.AddressFamily.InterNetworkV6)
if (this._family == System.Net.Sockets.AddressFamily.InterNetworkV6)
{
return this.Total;
}
@ -136,7 +138,7 @@ namespace System.Net
get
{
int max = this._family == Sockets.AddressFamily.InterNetwork ? 32 : 128;
int max = this._family == System.Net.Sockets.AddressFamily.InterNetwork ? 32 : 128;
var count = BigInteger.Pow(2, (max - _cidr));
return count;
}
@ -161,7 +163,7 @@ namespace System.Net
IPNetwork(BigInteger ipaddress, AddressFamily family, byte cidr)
{
int maxCidr = family == Sockets.AddressFamily.InterNetwork ? 32 : 128;
int maxCidr = family == System.Net.Sockets.AddressFamily.InterNetwork ? 32 : 128;
if (cidr > maxCidr)
{
throw new ArgumentOutOfRangeException(nameof(cidr));
@ -930,7 +932,7 @@ namespace System.Net
/// return;
/// }
int maxCidr = family == Sockets.AddressFamily.InterNetwork ? 32 : 128;
int maxCidr = family == System.Net.Sockets.AddressFamily.InterNetwork ? 32 : 128;
if (cidr > maxCidr)
{
if (tryParse == false)
@ -1303,7 +1305,7 @@ namespace System.Net
return;
}
int maxCidr = network._family == Sockets.AddressFamily.InterNetwork ? 32 : 128;
int maxCidr = network._family == System.Net.Sockets.AddressFamily.InterNetwork ? 32 : 128;
if (cidr > maxCidr)
{
if (trySubnet == false)

View File

@ -1,8 +1,9 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
namespace System.Net
namespace Emby.Server.Implementations.Networking.IPNetwork
{
public class IPNetworkCollection : IEnumerable<IPNetwork>, IEnumerator<IPNetwork>
{
@ -25,7 +26,7 @@ namespace System.Net
IPNetworkCollection(IPNetwork ipnetwork, byte cidrSubnet)
{
int maxCidr = ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetwork ? 32 : 128;
int maxCidr = ipnetwork.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork ? 32 : 128;
if (cidrSubnet > maxCidr)
{
throw new ArgumentOutOfRangeException(nameof(cidrSubnet));
@ -61,7 +62,7 @@ namespace System.Net
throw new ArgumentOutOfRangeException(nameof(i));
}
var last = this._ipnetwork.AddressFamily == Sockets.AddressFamily.InterNetworkV6
var last = this._ipnetwork.AddressFamily == System.Net.Sockets.AddressFamily.InterNetworkV6
? this._lastUsable : this._broadcast;
var increment = (last - this._network) / this.Count;
var uintNetwork = this._network + ((increment + 1) * i);

View File

@ -281,7 +281,7 @@ namespace Emby.Server.Implementations.Networking
if (normalizedSubnet.IndexOf('/') != -1)
{
var ipnetwork = IPNetwork.Parse(normalizedSubnet);
var ipnetwork = IPNetwork.IPNetwork.Parse(normalizedSubnet);
if (ipnetwork.Contains(address))
{
return true;

View File

@ -3,9 +3,8 @@ using System.IO;
using System.Threading.Tasks;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
namespace Emby.Common.Implementations.Serialization
namespace Emby.Server.Implementations.Serialization
{
/// <summary>
/// Provides a wrapper around third party json serialization.

View File

@ -11,7 +11,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Querying;
namespace Emby.Server.Implementations.Photos
namespace Emby.Server.Implementations.UserViews
{
public abstract class BaseFolderImageProvider<T> : BaseDynamicImageProvider<T>
where T : Folder, new()

View File

@ -2,7 +2,7 @@ using System.Collections.Generic;
using System.Reflection;
using Emby.Server.Implementations;
using Emby.Server.Implementations.HttpServer;
using Jellyfin.SocketSharp;
using Jellyfin.Server.SocketSharp;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.System;
using Microsoft.Extensions.Logging;

View File

@ -1,7 +1,7 @@
using System.IO;
using MediaBrowser.Model.Services;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public class HttpFile : IHttpFile
{

View File

@ -7,7 +7,7 @@ using System.Text;
using System.Threading.Tasks;
using MediaBrowser.Model.Services;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public partial class WebSocketSharpRequest : IHttpRequest
{

View File

@ -5,7 +5,7 @@ using System.Threading.Tasks;
using Emby.Server.Implementations.Net;
using Microsoft.Extensions.Logging;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public class SharpWebSocket : IWebSocket
{

View File

@ -15,7 +15,7 @@ using MediaBrowser.Model.System;
using Microsoft.Extensions.Logging;
using SocketHttpListener.Net;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public class WebSocketSharpListener : IHttpListener
{

View File

@ -11,7 +11,7 @@ using IHttpRequest = MediaBrowser.Model.Services.IHttpRequest;
using IHttpResponse = MediaBrowser.Model.Services.IHttpResponse;
using IResponse = MediaBrowser.Model.Services.IResponse;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public partial class WebSocketSharpRequest : IHttpRequest
{

View File

@ -14,7 +14,7 @@ using IHttpResponse = MediaBrowser.Model.Services.IHttpResponse;
using IRequest = MediaBrowser.Model.Services.IRequest;
namespace Jellyfin.SocketSharp
namespace Jellyfin.Server.SocketSharp
{
public class WebSocketSharpResponse : IHttpResponse
{

View File

@ -3,6 +3,7 @@ using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
//TODO Fix namespace or replace
namespace Priority_Queue
{
/// <summary>

View File

@ -20,6 +20,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Music;
using MediaBrowser.Providers.TV;
using MediaBrowser.Providers.TV.FanArt;
namespace MediaBrowser.Providers.Movies
{

View File

@ -20,6 +20,7 @@ using MediaBrowser.Model.Net;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.TV;
using MediaBrowser.Providers.TV.FanArt;
namespace MediaBrowser.Providers.Music
{

View File

@ -18,6 +18,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Xml;
using MediaBrowser.Providers.TV;
using MediaBrowser.Providers.TV.TheTVDB;
namespace MediaBrowser.Providers.People
{

View File

@ -19,7 +19,7 @@ using MediaBrowser.Model.Net;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.FanArt
{
public class FanArtSeasonProvider : IRemoteImageProvider, IHasOrder
{

View File

@ -22,7 +22,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Music;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.FanArt
{
public class FanartSeriesProvider : IRemoteImageProvider, IHasOrder
{

View File

@ -16,6 +16,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.Globalization;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Xml;
using MediaBrowser.Providers.TV.TheTVDB;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV

View File

@ -14,7 +14,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Omdb;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.Omdb
{
class OmdbEpisodeProvider :
IRemoteMetadataProvider<Episode, EpisodeInfo>,

View File

@ -16,7 +16,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
public class MovieDbEpisodeImageProvider :
MovieDbProviderBase,

View File

@ -18,7 +18,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
class MovieDbEpisodeProvider :
MovieDbProviderBase,

View File

@ -12,7 +12,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
public abstract class MovieDbProviderBase
{

View File

@ -18,7 +18,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
public class MovieDbSeasonProvider : IRemoteMetadataProvider<Season, SeasonInfo>
{

View File

@ -14,7 +14,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
public class MovieDbSeriesImageProvider : IRemoteImageProvider, IHasOrder
{

View File

@ -20,7 +20,7 @@ using MediaBrowser.Model.Serialization;
using MediaBrowser.Providers.Movies;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheMovieDb
{
public class MovieDbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, IHasOrder
{

View File

@ -14,7 +14,7 @@ using MediaBrowser.Model.Entities;
using MediaBrowser.Model.IO;
using MediaBrowser.Model.Providers;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
public class TvdbEpisodeImageProvider : IRemoteImageProvider
{

View File

@ -18,7 +18,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
/// <summary>

View File

@ -19,7 +19,7 @@ using MediaBrowser.Model.Net;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
/// <summary>
/// Class TvdbPrescanTask

View File

@ -19,7 +19,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Xml;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
public class TvdbSeasonImageProvider : IRemoteImageProvider, IHasOrder
{

View File

@ -19,7 +19,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Xml;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
public class TvdbSeriesImageProvider : IRemoteImageProvider, IHasOrder
{

View File

@ -23,7 +23,7 @@ using MediaBrowser.Model.Providers;
using MediaBrowser.Model.Xml;
using Microsoft.Extensions.Logging;
namespace MediaBrowser.Providers.TV
namespace MediaBrowser.Providers.TV.TheTVDB
{
public class TvdbSeriesProvider : IRemoteMetadataProvider<Series, SeriesInfo>, IHasOrder
{

View File

@ -1,6 +1,7 @@
using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.Providers;
using MediaBrowser.Model.Entities;
using MediaBrowser.Providers.TV.TheTVDB;
namespace MediaBrowser.Providers.TV
{