private async Task <IProxy <CoordinationManagerSkeleton> > CreateProxyAsync(CancellationToken cancellation) { ProxyHost proxyHost = null; IProxy <CoordinationManagerSkeleton> proxy; try { proxyHost = await _debugConnection.GetProxyHostAsync(cancellation); proxy = await proxyHost.CreateAsync <CoordinationManagerSkeleton>(cancellation); } catch (OperationCanceledException) { proxyHost?.Dispose(); throw; } return(proxy); }
private async Task <IProxy <LogicalEndPointSkeleton> > CreateProxyAsync(CancellationToken cancellation) { ProxyHost proxyHost = null; IProxy <LogicalEndPointSkeleton> proxy; try { proxyHost = await _debugConnection.GetProxyHostAsync(cancellation); proxy = await proxyHost.CreateAsync <LogicalEndPointSkeleton>(new object[] { EndPoint }, cancellation); } catch (OperationCanceledException) { proxyHost?.Dispose(); throw; } return(proxy); }