Inheritance: BaseSphero, IConnectedSphero
コード例 #1
0
 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);
     }
 }
コード例 #2
0
ファイル: AvailableSphero.cs プロジェクト: jihlee/BallControl
        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);
            }
        }