Clean code

Remove unused usings
Remove blank lines
Fix style issues
This commit is contained in:
2019-07-20 16:16:23 +02:00
parent ffb62b7737
commit 94431aebb8
44 changed files with 37 additions and 176 deletions

View File

@@ -2,7 +2,6 @@
using System; using System;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates; using System.Security.Cryptography.X509Certificates;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Configurations
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Configurations
{ {
class ServerConfiguration class ServerConfiguration
{ {

View File

@@ -1,7 +1,4 @@
using System; using YamlDotNet.Serialization;
using System.Collections.Generic;
using System.Text;
using YamlDotNet.Serialization;
namespace DearFTP.Configurations namespace DearFTP.Configurations
{ {

View File

@@ -1,7 +1,4 @@
using System; using System.Security.Cryptography.X509Certificates;
using System.Collections.Generic;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using YamlDotNet.Serialization; using YamlDotNet.Serialization;
namespace DearFTP.Configurations namespace DearFTP.Configurations

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Configurations
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Configurations
{ {
class User class User
{ {

View File

@@ -1,10 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Net.Security;
using System.Security.Cryptography.X509Certificates;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class AuthCommand : ICommand class AuthCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class ClntCommand : ICommand class ClntCommand : ICommand
{ {

View File

@@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class CwdCommand : ICommand class CwdCommand : ICommand
{ {

View File

@@ -1,10 +1,7 @@
using DearFTP.Configurations; using DearFTP.Utils;
using DearFTP.Utils;
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class FeaturesCommand : ICommand class FeaturesCommand : ICommand
{ {

View File

@@ -1,9 +1,7 @@
using System; using System;
using System.Collections.Generic;
using System.Globalization; using System.Globalization;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class HelpCommand : ICommand class HelpCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
interface ICommand interface ICommand
{ {

View File

@@ -3,7 +3,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class OptionsCommand : ICommand class OptionsCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class ParentDirectoryCommand : ICommand class ParentDirectoryCommand : ICommand
{ {

View File

@@ -1,9 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class ProtectionBufferSizeCommand : ICommand class ProtectionBufferSizeCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class ProtectionCommand : ICommand class ProtectionCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class PwdCommand : ICommand class PwdCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class QuitCommand : ICommand class QuitCommand : ICommand
{ {

View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class RestartCommand : ICommand class RestartCommand : ICommand
{ {

View File

@@ -1,7 +1,5 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class SiteCommand : ICommand class SiteCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using DearFTP.Utils; using System.IO;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,9 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Sockets;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class SystemCommand : ICommand class SystemCommand : ICommand
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection.Commands
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection.Commands
{ {
class TypeCommand : ICommand class TypeCommand : ICommand
{ {

View File

@@ -1,8 +1,6 @@
using DearFTP.Utils; using DearFTP.Utils;
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Connection.Commands namespace DearFTP.Connection.Commands
{ {

View File

@@ -1,12 +1,7 @@
using DearFTP.Configurations; using System.IO;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net; using System.Net;
using System.Net.Security; using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DearFTP.Connection namespace DearFTP.Connection

View File

@@ -1,8 +1,6 @@
using System; using System;
using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net.Sockets;
using System.Text; using System.Text;
namespace DearFTP.Connection namespace DearFTP.Connection

View File

@@ -1,7 +1,4 @@
using System; using System.IO;
using System.Collections.Generic;
using System.IO;
using System.Text;
namespace DearFTP.Connection namespace DearFTP.Connection
{ {

View File

@@ -1,8 +1,4 @@
using System; namespace DearFTP.Connection
using System.Collections.Generic;
using System.Text;
namespace DearFTP.Connection
{ {
public enum ResponseCode : uint public enum ResponseCode : uint
{ {

View File

@@ -2,13 +2,9 @@
using DearFTP.Connection.Commands; using DearFTP.Connection.Commands;
using DearFTP.Utils; using DearFTP.Utils;
using System; using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Net; using System.Net;
using System.Net.Security; using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;
using System.Text;
namespace DearFTP.Connection namespace DearFTP.Connection
{ {

View File

@@ -1,5 +1,4 @@
using System; using System.IO;
using System.IO;
using System.Net; using System.Net;
using System.Net.Security; using System.Net.Security;
using System.Net.Sockets; using System.Net.Sockets;

View File

@@ -1,13 +1,10 @@
using System; using DearFTP.Configurations;
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.Connection; using DearFTP.Connection;
using DearFTP.Connection.Commands; using DearFTP.Connection.Commands;
using System;
using System.Net;
using System.Net.Sockets;
using System.Threading.Tasks;
namespace DearFTP namespace DearFTP
{ {
@@ -46,7 +43,6 @@ namespace DearFTP
} }
TcpLoop(); TcpLoop();
} }
public void Stop() public void Stop()

View File

@@ -1,8 +1,6 @@
using System; using DearFTP.Configurations;
using System.Collections.Generic; using System;
using System.IO; using System.IO;
using System.Text;
using DearFTP.Configurations;
namespace DearFTP namespace DearFTP
{ {

View File

@@ -2,8 +2,6 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
namespace DearFTP namespace DearFTP

View File

@@ -3,7 +3,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Text;
namespace DearFTP.Utils namespace DearFTP.Utils
{ {

View File

@@ -33,7 +33,6 @@ using System.IO;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Security; using System.Security;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text; using System.Text;
namespace DearFTP.Utils namespace DearFTP.Utils

View File

@@ -1,6 +1,4 @@
using System; using System.Linq;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;