Clean code
Remove unused usings Remove blank lines Fix style issues
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Configurations
|
||||
namespace DearFTP.Configurations
|
||||
{
|
||||
class ServerConfiguration
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace DearFTP.Configurations
|
||||
{
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace DearFTP.Configurations
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Configurations
|
||||
namespace DearFTP.Configurations
|
||||
{
|
||||
class User
|
||||
{
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Security;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class AuthCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class ClntCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class CwdCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
using DearFTP.Configurations;
|
||||
using DearFTP.Utils;
|
||||
using DearFTP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class FeaturesCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class HelpCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
interface ICommand
|
||||
{
|
||||
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class OptionsCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class ParentDirectoryCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class ProtectionBufferSizeCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class ProtectionCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class PwdCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class QuitCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class RestartCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class SiteCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using DearFTP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class SystemCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
class TypeCommand : ICommand
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using DearFTP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection.Commands
|
||||
{
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using DearFTP.Configurations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DearFTP.Connection
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.IO;
|
||||
|
||||
namespace DearFTP.Connection
|
||||
{
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection
|
||||
namespace DearFTP.Connection
|
||||
{
|
||||
public enum ResponseCode : uint
|
||||
{
|
||||
|
||||
@@ -2,13 +2,9 @@
|
||||
using DearFTP.Connection.Commands;
|
||||
using DearFTP.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Connection
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Security;
|
||||
using System.Net.Sockets;
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using DearFTP.Configurations;
|
||||
using DearFTP.Configurations;
|
||||
using DearFTP.Connection;
|
||||
using DearFTP.Connection.Commands;
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DearFTP
|
||||
{
|
||||
@@ -46,7 +43,6 @@ namespace DearFTP
|
||||
}
|
||||
|
||||
TcpLoop();
|
||||
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DearFTP.Configurations;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using DearFTP.Configurations;
|
||||
|
||||
namespace DearFTP
|
||||
{
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace DearFTP
|
||||
|
||||
@@ -3,7 +3,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Utils
|
||||
{
|
||||
|
||||
@@ -33,7 +33,6 @@ using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security;
|
||||
using System.Security.Cryptography;
|
||||
using System.Security.Cryptography.X509Certificates;
|
||||
using System.Text;
|
||||
|
||||
namespace DearFTP.Utils
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user