public static RemoteNode Create(IOperationTracker operationTracker, IPEndPoint endPoint) { var operation = operationTracker.BeginConnect(endPoint.ToString()); try { var node = CreatePrivate(operationTracker, endPoint); operation.Success(); return(node); } catch (Exception e) { operation.Failed(e); throw; } }
public static RemoteNode Create(IOperationTracker operationTracker, string address, TimeSpan connectTimeout) { var operation = operationTracker.BeginConnect(address); try { var node = CreatePrivate(operationTracker, address, connectTimeout); operation.Success(); return(node); } catch (SharpRemoteException e) { operation.Failed(e); throw new NotConnectedException(e); } catch (Exception e) { operation.Failed(e); throw; } }