Refactoring MtApi

This commit is contained in:
vdemydiuk
2016-11-26 19:27:09 +02:00
parent 88e2d22abe
commit 9a6968f618
4 changed files with 5 additions and 11 deletions
+2 -8
View File
@@ -100,7 +100,7 @@ namespace MTApiService
return;
}
var coonected = false;
bool coonected;
try
{
@@ -254,13 +254,7 @@ namespace MTApiService
public string Host { get; private set; }
public int Port { get; private set; }
private bool IsConnected
{
get
{
return _proxy.State == CommunicationState.Opened;
}
}
private bool IsConnected => _proxy.State == CommunicationState.Opened;
#endregion
+1 -1
View File
@@ -82,7 +82,7 @@ namespace MTApiService
Log.DebugFormat("SendTask: begin. command = {0}", command);
ITaskExecutor executor = null;
ITaskExecutor executor;
lock (_locker)
{
+1 -1
View File
@@ -153,7 +153,7 @@ namespace MTApiService
Log.Debug("DequeueTask: called.");
MtCommandTask task;
int count = 0;
int count;
lock (_locker)
{
+1 -1
View File
@@ -1780,7 +1780,7 @@ namespace MtApi
private void Disconnect(bool failed)
{
var state = failed ? MtConnectionState.Disconnected : MtConnectionState.Disconnected;
var state = failed ? MtConnectionState.Failed : MtConnectionState.Disconnected;
var message = failed ? "Connection Failed" : "Disconnected";
lock (_locker)