mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-29 03:27:48 +00:00
Refactoring MtApi
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ namespace MTApiService
|
||||
|
||||
Log.DebugFormat("SendTask: begin. command = {0}", command);
|
||||
|
||||
ITaskExecutor executor = null;
|
||||
ITaskExecutor executor;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace MTApiService
|
||||
Log.Debug("DequeueTask: called.");
|
||||
|
||||
MtCommandTask task;
|
||||
int count = 0;
|
||||
int count;
|
||||
|
||||
lock (_locker)
|
||||
{
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user