From 32469b3f65596e115bb04427cd1e5daafbb69312 Mon Sep 17 00:00:00 2001 From: Bond_009 Date: Wed, 2 Jan 2019 12:15:05 +0100 Subject: [PATCH] Remove obsolete functions --- .../IO/SharpCifs/Smb/SmbFile.cs | 20 ---- .../Networking/IPNetwork/IPNetwork.cs | 106 +----------------- 2 files changed, 2 insertions(+), 124 deletions(-) diff --git a/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs b/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs index 151ec35c48..7fd9f0d84e 100644 --- a/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs +++ b/Emby.Server.Implementations/IO/SharpCifs/Smb/SmbFile.cs @@ -3380,26 +3380,6 @@ namespace SharpCifs.Smb SetAttributes(GetAttributes() & ~AttrReadonly); } - /// - /// Returns a - /// System.Uri - /// for this SmbFile. The - /// URL may be used as any other URL might to - /// access an SMB resource. Currently only retrieving data and information - /// is supported (i.e. no doOutput). - /// - /// - /// A new - /// System.Uri - /// for this SmbFile - /// - /// System.UriFormatException - [Obsolete(@"Use getURL() instead")] - public virtual Uri ToUrl() - { - return Url; - } - /// /// Computes a hashCode for this file based on the URL string and IP /// address if the server. diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs index 6d7785b906..8d0fb79971 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs @@ -189,7 +189,7 @@ namespace System.Net internal #endif - IPNetwork(BigInteger ipaddress, AddressFamily family, byte cidr) + IPNetwork(BigInteger ipaddress, AddressFamily family, byte cidr) { int maxCidr = family == Sockets.AddressFamily.InterNetwork ? 32 : 128; @@ -1164,18 +1164,6 @@ namespace System.Net } - [Obsolete("static Contains is deprecated, please use instance Contains.")] - public static bool Contains(IPNetwork network, IPAddress ipaddress) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Contains(ipaddress); - } - /// /// return true is network2 is fully contained in network /// @@ -1201,18 +1189,6 @@ namespace System.Net return contains; } - [Obsolete("static Contains is deprecated, please use instance Contains.")] - public static bool Contains(IPNetwork network, IPNetwork network2) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Contains(network2); - } - #endregion #region overlap @@ -1245,18 +1221,6 @@ namespace System.Net return overlap; } - [Obsolete("static Overlap is deprecated, please use instance Overlap.")] - public static bool Overlap(IPNetwork network, IPNetwork network2) - { - - if (network == null) - { - throw new ArgumentNullException("network"); - } - - return network.Overlap(network2); - } - #endregion #region ToString @@ -1341,18 +1305,6 @@ namespace System.Net || IPNetwork.IANA_CBLK_RESERVED1.Contains(this); } - [Obsolete("static IsIANAReserved is deprecated, please use instance IsIANAReserved.")] - public static bool IsIANAReserved(IPNetwork ipnetwork) - { - - if (ipnetwork == null) - { - throw new ArgumentNullException("ipnetwork"); - } - - return ipnetwork.IsIANAReserved(); - } - #endregion #region Subnet @@ -1371,16 +1323,6 @@ namespace System.Net return ipnetworkCollection; } - [Obsolete("static Subnet is deprecated, please use instance Subnet.")] - public static IPNetworkCollection Subnet(IPNetwork network, byte cidr) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.Subnet(cidr); - } - /// /// Subnet a network into multiple nets of cidr mask /// Subnet 192.168.0.0/24 into cidr 25 gives 192.168.0.0/25, 192.168.0.128/25 @@ -1402,16 +1344,6 @@ namespace System.Net return true; } - [Obsolete("static TrySubnet is deprecated, please use instance TrySubnet.")] - public static bool TrySubnet(IPNetwork network, byte cidr, out IPNetworkCollection ipnetworkCollection) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.TrySubnet(cidr, out ipnetworkCollection); - } - #if TRAVISCI public #else @@ -1476,12 +1408,6 @@ namespace System.Net return supernet; } - [Obsolete("static Supernet is deprecated, please use instance Supernet.")] - public static IPNetwork Supernet(IPNetwork network, IPNetwork network2) - { - return network.Supernet(network2); - } - /// /// Try to supernet two consecutive cidr equal subnet into a single one /// 192.168.0.0/24 + 192.168.1.0/24 = 192.168.0.0/23 @@ -1500,16 +1426,6 @@ namespace System.Net return parsed; } - [Obsolete("static TrySupernet is deprecated, please use instance TrySupernet.")] - public static bool TrySupernet(IPNetwork network, IPNetwork network2, out IPNetwork supernet) - { - if (network == null) - { - throw new ArgumentNullException("network"); - } - return network.TrySupernet(network2, out supernet); - } - #if TRAVISCI public #else @@ -1920,18 +1836,6 @@ namespace System.Net return sw.ToString(); } - [Obsolete("static Print is deprecated, please use instance Print.")] - public static string Print(IPNetwork ipnetwork) - { - - if (ipnetwork == null) - { - throw new ArgumentNullException("ipnetwork"); - } - - return ipnetwork.Print(); - } - #endregion #region TryGuessCidr @@ -2018,12 +1922,6 @@ namespace System.Net #region ListIPAddress - [Obsolete("static ListIPAddress is deprecated, please use instance ListIPAddress.")] - public static IPAddressCollection ListIPAddress(IPNetwork ipnetwork) - { - return ipnetwork.ListIPAddress(); - } - public IPAddressCollection ListIPAddress() { return new IPAddressCollection(this); @@ -2167,4 +2065,4 @@ namespace System.Net #endregion } -} \ No newline at end of file +}