Esempio n. 1
0
 public override async Task<OutputStruct> SendReceiveAsync(ProtocalUnit unit, InputStruct content)
 {
     if (!ProtocalLinker.IsConnected)
     {
         if (connectTryCount > 10) return null;
         return await await ConnectAsync().ContinueWith(answer => answer.Result ? base.SendReceiveAsync(unit, content) : null);
     }
     return await base.SendReceiveAsync(unit, content);
 }
Esempio n. 2
0
 public override async Task <OutputStruct> SendReceiveAsync(ProtocalUnit unit, InputStruct content)
 {
     if (ProtocalLinker != null && ProtocalLinker.IsConnected)
     {
         return(await base.SendReceiveAsync(unit, content));
     }
     if (_connectTryCount > 10)
     {
         return(null);
     }
     return(await await ConnectAsync().ContinueWith(answer => answer.Result ? base.SendReceiveAsync(unit, content) : null));
 }
Esempio n. 3
0
 private async Task <OutputStruct> ForceSendReceiveAsync(ProtocalUnit unit, InputStruct content)
 {
     return(await base.SendReceiveAsync(unit, content));
 }
Esempio n. 4
0
 public override OutputStruct SendReceive(ProtocalUnit unit, InputStruct content)
 {
     return(AsyncHelper.RunSync(() => SendReceiveAsync(unit, content)));
 }
Esempio n. 5
0
 private async Task<OutputStruct> ForceSendReceiveAsync(ProtocalUnit unit, InputStruct content)
 {
     return await base.SendReceiveAsync(unit, content);
 }
Esempio n. 6
0
 public override OutputStruct SendReceive(ProtocalUnit unit, InputStruct content)
 {
     return AsyncHelper.RunSync(() => SendReceiveAsync(unit, content));
 }