private void DoConnect(Action <IConnectedSphero> onSuccess, Action <Exception> onError) { try { var session = new EASession(Accessory, Constants.ProtocolName); var connected = new ConnectedSphero(Accessory, session); onSuccess(connected); } catch (Exception exception) { onError(exception); } }
private void DoConnect(Action<IConnectedSphero> onSuccess, Action<Exception> onError) { try { var session = new EASession(Accessory, Constants.ProtocolName); var connected = new ConnectedSphero(Accessory, session); onSuccess(connected); } catch (Exception exception) { onError(exception); } }